MCPcopy Index your code
hub / github.com/eclipse-ditto/ditto

github.com/eclipse-ditto/ditto @helm-chart-4.3.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release helm-chart-4.3.0 ↗ · + Follow
52,845 symbols 314,265 edges 5,756 files 15,406 documented · 29%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Ditto Logo dark Ditto Logo light

Eclipse Ditto™

Join the chat at https://gitter.im/eclipse/ditto Build Status Maven Central Docker pulls License Lines of code

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.

Documentation

Find the documentation on the project site: https://www.eclipse.dev/ditto/

Eclipse Ditto™ explorer UI

Find a live version of the latest explorer UI: https://eclipse-ditto.github.io/ditto/

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

<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=eclipse-ditto/ditto&type=Date" />

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:

cd deployment/docker/
docker-compose up -d

Check the logs after starting up:

docker-compose logs -f

Open following URL to get started: http://localhost:8080

Or have a look at the "Hello World"

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 * including some static HTTP + API documentation on http://localhost:8080

Extension points exported contracts — how you extend this code

ThingPersistenceActorPropsFactory (Interface)
Factory of thing-persistence-actor. [120 implementers]
things/service/src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorPropsFactory.java
AttributesBuilder (Interface)
A mutable builder for a Attributes with a fluent API. [8 implementers]
things/model/src/main/java/org/eclipse/ditto/things/model/AttributesBuilder.java
ThingSudoCommand (Interface)
Aggregates all thing sudo commands. @param the type of the implementing class. [14 implementers]
things/api/src/main/java/org/eclipse/ditto/things/api/commands/sudo/ThingSudoCommand.java
MultipleEventFormElementOp (Interface)
MultipleEventFormElementOp is a container for multiple SingleEventFormElementOps. @since 2.4.0 [426 implementers]
wot/model/src/main/java/org/eclipse/ditto/wot/model/MultipleEventFormElementOp.java
ProtocolAdapterTest (Interface)
Super class of protocol adapter tests. [35 implementers]
protocol/src/test/java/org/eclipse/ditto/protocol/adapter/ProtocolAdapterTest.java
ResultGetter (Interface)
Interface defining a getter. @param the return type of the getter [83 implementers]
thingsearch/service/src/test/java/org/eclipse/ditto/thingsearch/service/persistence/util/ResultGetter.java
SizeOption (Interface)
The "size" option provides the number of results requested. [31 implementers]
thingsearch/model/src/main/java/org/eclipse/ditto/thingsearch/model/SizeOption.java
ThingSearchSudoCommand (Interface)
Interface for all Sudo Search Commands. @param the type of the implementing class. [14 implementers]
thingsearch/api/src/main/java/org/eclipse/ditto/thingsearch/api/commands/sudo/ThingSearchSudoCommand.java

Core symbols most depended-on inside this repo

map
called by 2161
protocol/src/main/java/org/eclipse/ditto/protocol/JsonifiableMapper.java
orElse
called by 2130
utils/result/src/main/java/org/eclipse/ditto/utils/result/Result.java
set
called by 2114
things/model/src/main/java/org/eclipse/ditto/things/model/Attributes.java
checkNotNull
called by 2029
base/model/src/main/java/org/eclipse/ditto/base/model/common/ConditionChecker.java
build
called by 1851
things/model/src/main/java/org/eclipse/ditto/things/model/ThingBuilder.java
getDittoHeaders
called by 1781
base/model/src/main/java/org/eclipse/ditto/base/model/headers/WithDittoHeaders.java
build
called by 1652
connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/client/HiveMqttClientPropertiesStepBuilder.java
set
called by 1402
json/src/main/java/org/eclipse/ditto/json/JsonObject.java

Shape

Method 45,269
Class 5,451
Interface 993
Function 853
Enum 279

Languages

Java98%
TypeScript2%
Ruby1%

Modules by API surface

connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/BaseClientActor.java178 symbols
json/src/test/java/org/eclipse/ditto/json/ImmutableJsonObjectTest.java98 symbols
internal/utils/persistent-actors/src/main/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceActor.java91 symbols
connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/persistence/ConnectionPersistenceActor.java91 symbols
wot/validation/src/test/java/org/eclipse/ditto/wot/validation/WotThingModelValidationFeatureLevelTest.java89 symbols
protocol/src/test/java/org/eclipse/ditto/protocol/adapter/things/ThingEventAdapterTest.java89 symbols
things/model/src/test/java/org/eclipse/ditto/things/model/ImmutableThingFromCopyBuilderTest.java88 symbols
connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/amqp/AmqpClientActor.java87 symbols
rql/query/src/test/java/org/eclipse/ditto/rql/query/things/ThingPredicateVisitorTest.java86 symbols
connectivity/service/src/main/java/org/eclipse/ditto/connectivity/service/messaging/mqtt/hivemq/message/publish/GenericMqttPublish.java84 symbols
protocol/src/main/java/org/eclipse/ditto/protocol/ImmutableTopicPath.java83 symbols
things/service/src/test/java/org/eclipse/ditto/things/service/persistence/actors/ThingPersistenceActorTest.java78 symbols

Datastores touched

(mongodb)Database · 1 repos
thingsDatabase · 1 repos
connectivityDatabase · 1 repos
dittoDatabase · 1 repos
iot-thingsDatabase · 1 repos
policiesDatabase · 1 repos

For agents

$ claude mcp add ditto \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact