I have a service A that is essentially doing this:
- Fetches batch of events from external service B.
- Based on these events, transforms data from the database and persists it back to the database.
- Sends a confirmation that batch was successfully processed to service B.
I'm trying to implement this in a "clean architecture" manner.
Right now, I'm having trouble figuring out correct abstraction for the second step. Should this be a use case? How to call the transformation process (is it a Gateway/Adapter/Mapper)? Does clean architecture even apply to an infrastructure service?