Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing Titanic Pattern in the Integration Manager #86

Open
brothercorvo opened this issue Aug 4, 2024 · 0 comments
Open

Implementing Titanic Pattern in the Integration Manager #86

brothercorvo opened this issue Aug 4, 2024 · 0 comments

Comments

@brothercorvo
Copy link
Contributor

brothercorvo commented Aug 4, 2024

Step 1: Message Storage

  • Database or File System: Integrate a simple database (SQLite) or a file system-based storage system within the Integration Manager to store incoming messages.
  • Unique Message IDs: check the unique ID to each message as it arrives, ensuring every message can be tracked and managed individually.

Step 2: Message Processing Workflow

  • Worker Dispatch: When a message is received, store it in the database (SQLite) and then dispatch it to the RoutingWorker for processing.
  • Acknowledgment Handling: After a worker processes a message, it should PUSH an acknowledgment action=received back to the Integration Manager.
  • Message Deletion: Upon receiving a successful acknowledgment, the Integration Manager marks the message as processed in the store or deletes it.

Step 3: Failure Recovery and Message Redelivery

  • Monitoring and Health Checks: Implement monitoring to detect any failures in message processing IN A SEPARATE THREAD.
  • Recovery Mechanism: In case of failure, the system should automatically retry puBLISHING messages that have not been acknowledged as processed.
  • Timeouts and Retry Logic: Define a strategy for how long to wait before retrying a message and how many retries should be attempted.

Step 4: Scaling and Performance Optimization

  • Load Balancing: Integrate load balancing mechanisms to distribute messages evenly across multiple workers, especially during high loads or retries.
  • Performance Optimization: Use indexing in the database for faster retrieval and update of message statuses

Step 5: Seamless Integration with Existing Architecture

  • Minimize Changes: Ensure that the new components integrate seamlessly with the existing parts of the DigitalPy architecture without requiring significant changes to the communication patterns.
  • Compatibility: Maintain compatibility with existing protocols and data formats used within the system to ensure that the new persistence features do not disrupt current operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant