SaFi Bank Space : Scheduled transaction manager - component description

General description

STM is handling the management of scheduled transactions and their execution by calling the transaction processor manager.

Context

STM exposes REST API for creating scheduled transactions that is similar to TPM with additional details for specifying the schedule. These schedules can be edited (only the note can be changed) or canceled.

The service processes customer and account snapshots for creating materialized views used for the verification of beneficiary phone/account numbers. There is also an internal Kafka command used for scheduled transaction execution.

STM integrates with the transaction processor manager using the generated REST client library to create the transactions.

Execution of schedules is triggered by the Google Cloud Composer (Airflow). This is done using DAG transactions_schedule_trigger which is executed daily at 1 a.m. PHT. This DAG calls the /schedule/run/batch POST endpoint. (Not implemented yet)

Idempotency is not yet implemented, but schedule creation, changes, and execution need to be idempotent.

Transaction processing

For schedule management, the transactions are created on the service level. For account and customer snapshots processing, the transactions are created for the saveOrUpdate functions.

Transactions are mandatory on the repository level.

Scalability

STM can run in multiple instances. For the schedule execution, there will be a single instance processing the initial batch trigger, but this instance will publish a separate command for each scheduled transaction that needs to be executed.

Approach to security

We are relying on the authorization library used throughout all SaFi back-end services and also Kafka ACL (managed outside STM scope).

Domain model

The domain model will be documented once the development is finished.

Current technical debt

This service is still in development.

Technical debt for parts that are finished:

  • Implement idempotent processing using the new common library

  • Improve logging in REST API calls