You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-7Lines changed: 36 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,47 @@
2
2
3
3
English | [简体中文](README_CN.md)
4
4
5
-
This is a fork of [https://github.com/langgenius/dify](https://github.com/langgenius/dify) . We made some modifications based on the original Dify project to enable it to use MySQL as the database.
5
+
## Why fork
6
+
7
+
Beginning in October 2024, we initiated a collaboration with the Dify Team. Given that MySQL is one of the most widely used databases worldwide, many users have expressed a strong desire for Dify to support MySQL. At the same time, owing to OceanBase’s high compatibility with MySQL, we submitted a pull request to the Dify project to introduce MySQL support. However, due to the Dify team’s ongoing commitments to their internal development milestones, they were unable to incorporate this contribution at the time.
8
+
9
+
Furthermore, through extensive discussions with numerous Dify users, we identified significant demand for several enterprise-level features. Fortunately, OceanBase is capable of delivering these capabilities. As a result, we have continued to maintain and enhance this branch independently to meet these enterprise requirements.
10
+
11
+
## Welcome contribution
12
+
We welcome any suggestions and greatly appreciate your contributions.
13
+
14
+
## Benefits
15
+
This branch can provide several enterprise features:
16
+
### High Availability
17
+
In a production environment, AI platforms must deliver 7x24 uninterrupted service. As the database is a critical component of the entire system, any failure in the database layer can severely disrupt service availability.
18
+
19
+
OceanBase ensures high availability through the Paxos consensus protocol. When deployed in cluster mode under production conditions, OceanBase remains fully operational even if individual nodes fail. It guarantees a Recovery Point Objective (RPO) of zero and achieves an industry-leading Recovery Time Objective (RTO) of under 8 seconds.
20
+
21
+
### Scalable
22
+
As operational time accumulates, the volume of data stored in the database continues to grow. In legacy systems, once data size exceeds the capacity of a single machine, scaling becomes significantly challenging.
23
+
24
+
OceanBase, as a distributed database, offers seamless scalability by allowing new nodes to be added to the cluster effortlessly. This enables automatic rebalancing of both data and workload. Moreover, the entire process remains completely transparent to the application.
25
+
26
+
### AI enhancement
27
+
Given that OceanBase also functions as a vector database, it offers powerful hybrid search capabilities. This enables support for multiple data types—including vector data, scalar data (traditional structured data in relational tables), GIS, and full-text content—within a single query.
28
+
29
+
Such integration enhances both the accuracy and performance of AI-driven queries, making it particularly valuable for Retrieval-Augmented Generation (RAG) systems.
30
+
31
+
### Reduce Cost
32
+
By replacing all databases currently used in Dify—including PostgreSQL, Weaviate, and Redis—with OceanBase, users can achieve more efficient resource utilization and significantly reduce hardware costs.
33
+
34
+
Furthermore, this consolidation simplifies database operations by eliminating the need to manage three distinct database systems, thereby streamlining maintenance and reducing operational complexity.
35
+
36
+
### Multi-Tenant
37
+
Due to OceanBase's native support for multi-tenancy, Dify users can now try multi-tenant by OceanBase's multi-tenantcy without compromising Dify’s existing multi-tenant rules.
6
38
7
-
This branch is based on the legacy version [https://github.com/oceanbase-devhub/dify](https://github.com/oceanbase-devhub/dify) and has been maintained since Dify 1.1.0. It will be released regularly before the official community implements MySQL adaptation.
8
39
9
40
## Quick start
10
41
11
42
> Before installing Dify, make sure your machine meets the following minimum system requirements:
12
43
>
13
44
> - CPU >= 2 Core
14
-
> - RAM >= 4 GiB
45
+
> - RAM >= 8 GiB
15
46
16
47
The easiest way to start the Dify server is through [docker-compose.yaml](docker/docker-compose.yaml).
17
48
@@ -23,14 +54,12 @@ bash setup-mysql-env.sh
23
54
docker compose up -d
24
55
```
25
56
57
+
After running, you can access the Dify dashboard in your browser at [http://localhost/install](http://localhost/install) and start the initialization process.
58
+
26
59
Note:
27
60
- setup-mysql-env.sh is a script for setting database parameters. It will update the parameters for database connection according to the user input and set OceanBase as the Vector Store.
28
61
- Dify 1.x introduced the plugin system. The plugin installation process will execute commands like `pip install -r requirements.txt` according to the plugin configuration, in order to speed up the installation process, the script has set `PIP_MIRROR_URL` to Tsinghua University Tuna Mirror Site.
29
-
- For users in China mainland, you can refer to https://github.com/dongyubin/DockerHub to set the docker mirror for a better image loading speed.
30
-
31
-
After running, you can access the Dify dashboard in your browser at [http://localhost/install](http://localhost/install) and start the initialization process.
32
62
33
-
For more information on using Dify, please refer to [https://dify.ai](https://dify.ai).
0 commit comments