graph TD
A[用户请求] --> B{"参数校验"}
B -->|"通过"| C[发送至协议适配器]
B -->|"失败"| D[返回错误信息]
C --> E[根据协议类型转发至通信层]
E --> F[转发至 MQTT Broker]
F --> G[发送至设备]
G --> H[设备状态更新]
H --> I[发送回 Ditto]
I --> J{"状态校验"}
J -->|"校验成功"| K[同步状态至存储]
J -->|"校验失败"| L[返回错误信息]
K --> M[发送回客户端通知]
L --> M
M --> N[响应用户]
Eclipse Ditto™ is a technology in the IoT implementing a software pattern called “digital twins”.
A digital twin is a virtual, cloud based, representation of his real world counterpart (real world “Things”, e.g. devices like sensors, smart heating, connected cars, smart grids, EV charging stations, …).
An ever-growing list of adopters makes use of Ditto as part of their IoT platforms - if you’re as well using it, it would be super nice to show your adoption here.
You should be able to work with your locally running default using the local_ditto environment - and you can add additional environments to also work with e.g. with a deployed installation of Ditto.
Star History
Getting started
In order to start up Ditto via Docker Compose, you’ll need:
a running Docker daemon
Docker Compose installed
for a “single instance” setup on a local machine:
at least 2 CPU cores which can be used by Docker
at least 4 GB of RAM which can be used by Docker
You also have other possibilities to run Ditto, please have a look here to explore them.
Start Ditto
In order to start the latest built Docker images from Docker Hub, simply execute:
Additional deployment options are also available, if Docker Compose is not what you want to use.
Development Guide
If you plan to develop extensions in Ditto or to contribute some code, the following steps are of interest for you.
:warning: If you just want to start/use Ditto, please ingore the following sections!
Build and start Ditto locally
In order to build Ditto, you’ll need:
JDK >= 25
Apache Maven >= 3.9.x installed.
a running Docker daemon
In order to first build Ditto and then start the built Docker images.
1. Build Ditto with Maven
mvn clean install
Skip tests:
mvn clean install -DskipTests
2. Build local Ditto Docker snapshot images
./build-images.sh
If your infrastructure requires a proxy, its host and port can be set using the -p option like for example:
./build-images.sh -p 172.17.0.1:3128
Please note that the given host and port automatically applies for HTTP and HTTPS.
3. Start Ditto with local snapshot images
cd ../deployment/docker/
# the "dev.env" file contains the SNAPSHOT number of Ditto, copy it to ".env" so that docker compose uses it:
cp dev.env .env
docker-compose up -d
Check the logs after starting up:
docker-compose logs -f
You have now running:
a MongoDB as backing datastore of Ditto (not part of Ditto but started via Docker)
Ditto microservices:
Policies
Things
Things-Search
Gateway
Connectivity
an nginx acting as a reverse proxy performing a simple “basic authentication” listening on port 8080
评论