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

Create Adapter for Redis Integration #76

Closed
koladev32 opened this issue Jul 6, 2024 · 0 comments · Fixed by #77
Closed

Create Adapter for Redis Integration #76

koladev32 opened this issue Jul 6, 2024 · 0 comments · Fixed by #77
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@koladev32
Copy link
Collaborator

Summary

We propose creating an adapter for Redis integration in the Sendhooks engine. This adapter will encapsulate all interactions with Redis, ensuring that Redis-specific code is decoupled from the main application logic. This change will make it easier to integrate new communication technologies in the future.

Motivation

The current implementation directly integrates Redis for handling webhook status updates. While Redis offers excellent performance and reliability, directly coupling it with our application code limits our flexibility to switch or add new communication technologies. By using an adapter, we enhance the modularity of our system, making it more maintainable and scalable. This approach will also streamline the process of integrating alternative solutions like RabbitMQ.

Proposed Solution

  • Create a Redis Adapter:
    • Develop an adapter that encapsulates all interactions with Redis.
    • Ensure the adapter provides methods for connecting to Redis, reading from and writing to Redis streams, and handling message persistence and recovery.
  • Refactor Existing Code:
    • Modify the existing code to use the new Redis adapter instead of direct Redis calls.
    • Ensure that all Redis-related configurations are passed through the adapter.
  • Configuration Management:
    • Ensure that the Redis adapter can read from the existing config.json file.
    • Validate SSL/TLS configurations within the adapter.

Alternatives Considered

  • Immediate Integration of Multiple Adapters:
    • Developing adapters for multiple communication technologies (e.g., RabbitMQ, Kafka) simultaneously would provide immediate flexibility but would require more initial development effort and complexity.

Additional Context (Optional)

This change aligns with our goal to create a more modular and extensible system. By using adapters, we can more easily integrate new communication technologies in the future, improving our ability to meet various deployment requirements.

Potential Impact (Optional)

This change will primarily affect the way Redis interactions are handled in the codebase. While it introduces an additional layer (the adapter), it simplifies future enhancements and integrations. There should be minimal impact on the existing functionality as the adapter will be designed to match the current Redis interface closely.

@koladev32 koladev32 added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 6, 2024
@koladev32 koladev32 self-assigned this Jul 6, 2024
@koladev32 koladev32 linked a pull request Jul 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant