Skip to content

Conversation

@clauspruefer
Copy link
Owner

Pull Request

Description

Add an example which demonstrates a) load balancing and b) write balancing. The example is using multiple docker container and a simple ESB driven orchestrator to setup a PostgreSQL multi-master logical replication environment.

Type of Change

  • Example

@clauspruefer clauspruefer self-assigned this Jan 26, 2026
Copilot AI review requested due to automatic review settings January 26, 2026 10:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive example demonstrating PostgreSQL logical replication with load-balancing capabilities using Docker containers and a microservice-based ESB (Enterprise Service Bus) orchestrator.

Changes:

  • Adds Docker-based multi-master logical replication setup with configurable network topology
  • Implements JSON-RPC server infrastructure for managing database nodes
  • Provides orchestration scripts for automated container deployment and configuration

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
example/01-logical-replication/sysconfig.json System configuration defining network topology, roles, and scaling parameters
example/01-logical-replication/svc_call_metadata.py Service call metadata definitions for network topology updates and database initialization
example/01-logical-replication/orchestrator.py Main orchestration script that creates Docker containers and initializes the database cluster
example/01-logical-replication/run-container.sh Shell script for launching individual database node containers
example/01-logical-replication/docker-network.sh Script to create Docker network with custom subnet configuration
example/01-logical-replication/docker-build.sh Script to build the database node Docker image
example/01-logical-replication/docker-daemon/daemon.json Docker daemon configuration disabling iptables
example/01-logical-replication/db-node.dockerfile Dockerfile defining the PostgreSQL database node with JSON-RPC server
example/01-logical-replication/db-node-rpc/start-server.sh Script to start the JSON-RPC server in containers
example/01-logical-replication/db-node-rpc/service_properties.py Service property definitions for ESB validation
example/01-logical-replication/db-node-rpc/service_implementation.py ESB service handler implementations for database and network operations
example/01-logical-replication/db-node-rpc/json-rpc-server.py JSON-RPC server implementation for handling remote procedure calls
example/01-logical-replication/db-node-rpc/esbconfig.py ESB configuration for importing service classes
example/01-logical-replication/db-node-rpc/class_reference.py Class hierarchy definitions for service routing
example/01-logical-replication/db-node-rpc/class_mapping.py Mapping definitions between service names and implementation classes


network = sysconfig['system']['networks'][0]

network_id = network['id']
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable 'network_id' is assigned on this line but never used in the code. Consider removing it if it's not needed, or use it where intended.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants