We have a process that runs a few times a day (via a Windows Service) and can also be invoked at anytime by an administrator level user (through a web app). This process gets a data set from a partner through a web service, then we merge this data with our local copy in our own format. Simple enough.
My question is how this fits into our application design. We have an fairly straight forward Application Services layer that interacts with our repository to deal with our domain objects. The domain is persistence ignorant.
How should this process fit into this architecture? Do we,
- Put most logic in the application service? Just have it invoke the 3rd party service, grab our local objects from the repository and do our updates/adds/etc and save back into the repository. Basically just treat the 3rd party service as another repository.
- Have the application service grab our local data (don’t worry about data volume for now), pass that into a Domain level service that will call the 3rd party service, merge data as needed, then return a new dataset to the app service to commit into the repository?
- Other options…