Deploying Dependencies with Docker
Relevant source files
The following files were used as context for generating this wiki page:
SeaStreamer relies on several external data streaming backends to provide its core functionality. To facilitate development and testing, the project provides Docker configuration files for deploying these dependencies locally. This ensures a consistent environment for developers to run stream processors against Redis, Kafka, or Redpanda without manual installation.
The deployment of these dependencies is primarily handled through Docker Compose, targeting the specific requirements of each backend implementation in the SeaStreamer toolkit.
Sources: README.md:120-128, sea-streamer-redis/README.md:130-132
Infrastructure Overview
The SeaStreamer ecosystem supports multiple backends. While some backends like stdio and file are local and require no external services, the kafka and redis backends require live server instances.
The diagram shows how a SeaStreamer application interacts with different backends, highlighting those typically deployed via Docker.
Sources: README.md:155-165, sea-streamer-socket/Cargo.toml:40-50
Redis Deployment
The Redis backend is a high-performance implementation utilizing Redis Streams. It can be quickly deployed using the standard Redis Docker image.
Configuration Table
| Parameter | Value | Description |
|---|---|---|
| Image | redis:latest | The official Redis image |
| Default Port | 6379 | Standard Redis communication port |
| URI Format | redis://localhost:6379 | Format used by SeaStreamer to connect |
Sources: README.md:130-132, build-tools/docker-redis.yml
Deployment Command
To start a Redis instance for local development:
docker run -d --rm --name redis -p 6379:6379 redis
Sources: README.md:275-277, sea-streamer-redis/README.md:130-132
Kafka and Redpanda Deployment
SeaStreamer provides a unified interface for both Kafka and Redpanda backends via sea-streamer-kafka. These services are typically more complex than Redis and require orchestration of brokers and, in Kafka's case, Zookeeper.
Kafka Architecture Flow
The following sequence illustrates the connection establishment between the SeaStreamer Kafka client and the Dockerized services.
The sequence shows the internal dependency between Kafka and Zookeeper within the Docker environment and the subsequent application connection.
Sources: build-tools/docker-kafka.yml, README.md:215-225
Deployment Files
| Backend | Configuration File | Notes |
|---|---|---|
| Kafka | build-tools/docker-kafka.yml | Standard Kafka deployment with Zookeeper |
| Redpanda | build-tools/docker-redpanda.yml | Kafka-compatible streaming platform |
Sources: build-tools/docker-kafka.yml, build-tools/docker-redpanda.yml, sea-streamer-kafka/Cargo.toml:1-10
Implementation Context
The Docker-based dependencies are essential for the integration tests and executable examples provided in the repository. The SeaStreamer socket API allows switching between these Dockerized backends at runtime by changing the connection URI.
| URI Scheme | Target Backend | Required Docker Service |
|---|---|---|
redis:// | sea-streamer-redis | Redis container |
kafka:// | sea-streamer-kafka | Kafka or Redpanda container |
Sources: README.md:120-128, sea-streamer-socket/Cargo.toml:45-50
Summary
Deploying dependencies with Docker provides the necessary infrastructure for SeaStreamer's backend-agnostic architecture. By utilizing the provided YAML configurations and commands, developers can simulate complex streaming environments locally, ensuring that applications built with SeaStreamer are production-ready for Redis, Kafka, or Redpanda deployments.