We have multiple, decoupled systems. These systems provide public APIs which are consumed by mobile apps and other client applications.
We now need these systems to internally communicate with each other during some calls (for whatever reason). I am torn between the possible solutions.
Create secure API calls
Hosting an internal ASP.NET Web API for each system so that they can expose data and functionality to each other.
- Advantage: Low coupling. As long as the API call structure doesn't change, the systems can evolve on their own.
- Disadvantage: Very slow. An HTTP request is deathly slow when compared to a database query. This could severely affect the speed of our public calls.
Reference repository projects between solutions
Sharing and include the Repository (data access) codebase between multiple projects.
- Advantage: Very fast. Retrieving the relevant data will be extremely fast as it would simply be a database query.
- Disadvantage: Highly coupling. A rebuild and release on system A would likely mean the same for system B as they will share common code.
Neither of these solutions seem ideal.
Is this a job for WCF?