4. Components and APIs¶
4.1. Components¶
Component | Repository / Main site | Documentation |
---|---|---|
MongoDB | MongoDB official site | MongoDB documentation |
postgres | PostgreSQL official site | PostgreSQL documentation |
Kong API gateway (Community Edition) | Kong official site | Kong documentation |
redis | Redis official site | Redis documentation |
zookeeper | Zookeeper official site | Zookeeper documentation |
Kafka | Kafka official site | Kafka documentation |
auth | GitHub - auth | readthedocs - auth |
History | GitHub - history | |
DeviceManager | GitHub - DeviceManager | readthedocs - DeviceManager |
Image manager | GitHub - image-manager | |
GUI | GitHub - GUI | |
Flow broker | GitHub - flowbroker | |
Data broker | GitHub - data-broker | |
iotagent-mosca | GitHub - iotagent-mosca | |
EJBCA-REST | GitHub - EJBCA-REST | |
Alarm manager | GitHub - alarm-manager |
4.2. Exposed APIs¶
Endpoint | Purpose | Component API | Repository |
/device | Device management | API - DeviceManager | GitHub - DeviceManager |
/template | Template management | API - DeviceManager | GitHub - DeviceManager |
/flows | Flow management | API - flowbroker | GitHub - flowbroker |
/auth | User authentication | API - auth | GitHub - auth |
/auth/revoke | User authentication | API - auth | GitHub - auth |
/auth/user | User authentication | API - auth | GitHub - auth |
/history | Device historical data | API - history | GitHub - history |
/gui | Graphical User Interface | GitHub - GUI | |
/sign | Public key signing | API - EJBCA-REST | GitHub - EJBCA-REST |
/ca | Certification-Auth. functions | API - EJBCA-REST | GitHub - EJBCA-REST |
/image | Device image management | API - image-manager | GitHub - image-manager |
The API gateway used in dojot reroutes some of these endpoints so that they become uniform: all of them are accessible through the same port (default is TCP port 8000) and have the same naming scheme. Each component, though, might have something different in its configuration and API documentation. The following table shows which endpoint exposed by the API gateway is mapped to which component endpoint.
Service | Original endpoint | Endpoint |
---|---|---|
DeviceManager | host:5000/device | host:8000/device |
DeviceManager | host:5000/template | host:8000/template |
mashup | host:3000/ | host:8000/flows |
auth | host:5000/ | host:8000/auth |
auth | host:5000/auth/revoke | host:8000/auth/revoke |
auth | host:5000/user | host:8000/auth/user |
STH | host:8666/ | host:8000/history |
GUI | host/ | host:8000/gui |
ejbca | host:5583/sign | host:8000/sign |
ejbca | host:5583/ca | host:8000/ca |
4.3. Kafka messages¶
These are the messages sent by components and their subjects. If you are developing a new internal component (such as a new IoT agent), see API - data-broker to check how to receive messages sent by other components in dojot.
Component | Message | Subject |
---|---|---|
DeviceManager | Device CRUD (Messages - DeviceManager) | dojot.device-manager.device |
iotagent-mosca | Device data update (Messages - iotagent-mosca) | device-data |
auth | Tenants creation/removal (Messages - auth) | dojot.tenancy |