SaFi Bank Space : Idempotency Lib Enhancement

This is the original roadmap plan for enhancing the idempotency-lib with annotation support, automatic DB clean support, and coroutine support:

  1. Enhance idempotency-lib with annotation support:

    • Add support for annotations to mark endpoints that require idempotency.

    • Allow developers to specify the idempotency key and TTL (time-to-live) for each annotated endpoint.

    • Provide default TTL value if none is specified in the annotation.

    • Validate annotations at startup to ensure they are used correctly.

    • Generate error messages when the idempotency key is missing or expired.

  2. Enhance idempotency-lib with automatic DB clean support:

    • Add support for automatic database cleanup of expired keys.

    • Allow developers to configure the interval between cleanup runs.

    • Provide options for manual cleanup and retention of expired keys.

  3. Add coroutine support:

    • Refactor the library to support coroutines, making it easier to use in asynchronous code.

    • Introduce support for non-blocking ways to enable better concurrency and resource utilization.

    • Ensure that the idempotency guarantees are preserved even in a concurrent environment.

These enhancements will help to make the idempotency-lib more robust, efficient, and user-friendly, allowing developers to focus on their business logic instead of worrying about idempotency. For more details could also refer to SAF-470 - Enhance idempotency-lib Selected for Development