I'm wondering what design patterns and best practices are needed when building a application that needs to interact with a service. I am given an SDK that provides CRUD operations on data, data is stored/handled externally. I am tasked to generate records based on user input, the user will provide some input to generate large sets of data.
Some concerns to consider:
- There is a limit of concurrent operations to the service.
- I need to synchronize a portion of data from the service to know if the state of the service has changed. I need this cached locally because that would speed up local operations.
This has lead me to the follow considerations:
- Singleton message queue, to regulate the amount of messages passed between client and service.
- A cache for the synchronized data.
- A cache for the user created data, in case the user wants to close the application and start where he/she left off.
- A translation layer, translating the business creation logic code into requests.
- A handler that would be using a pub/sub design pattern, this is to notify subscribers of a state change or a failed/successful request.
Am I on the right path? What I am blurring on is how to design/structure the code in a way to send a request to create a record then have the response handled. Are there any resources that can detail more about how to design an application around request and handling? How about things around synchronizing data??
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire