docs/modules/index.mdx
iii Architecture is very modular. Composed of a few Layers: Engine, Modules, Adapters.
Let's break down each layer:
The engine is the orchestration layer. Responsible for connecting the modules to the workers.
Built with Rust for exceptional speed and memory efficiency, Core Modules deliver top-tier performance.
Examples of Modules:
Within these modules, there's an Adapter Layer, where we can configure external services to be used as their backend. For example: in the Queue Module, you can configure Redis or RabbitMQ to manage queues.
Let's use the Stream Module as an example. The following file is the main configuration file for iii.
Add it to your project as iii-config.yaml and iii will automatically load the modules and adapters.
modules:
- class: modules::stream::StreamModule
config:
port: ${STREAM_PORT:3112}
host: 0.0.0.0
adapter:
class: modules::stream::adapters::RedisAdapter
config:
redis_url: ${REDIS_URL:redis://localhost:6379}
In the example above, we're configuring only the Stream Module in the Engine. We can configure the port to listen on and the host to listen on.
We're also configuring the adapter to use for the Stream Module. In this case, we're using the modules::stream::adapters::RedisAdapter.
We can configure the Redis URL to use for the RedisAdapter.