File Based – Source application generate file and destination system will consume that file. This way data can be shared between application. Things need to consider are file generation schedule, file format, layout etc. Changes will be communicated to other systems eventually after some time interval.
Shared database – Source and destination systems are using same database to share information. The moment one application writes information into database at the same time that information is available for destination application. Changes to other system are communicated immediately. This approach comes up with cons related to dirty reads, policies around transactions, locks etc. These need to be managed properly. If locks are applied it starts creating bottleneck. Scalability becomes an issue.
Remote Procedure Call (RPC) – Above two approaches are typically used to share data. In shared database you can share same stored procedure or other logic. The intention for RPC is to share code logic between system over standardized protocol like HTTP or TCP. API can be used to share information or trigger any action into other application. Most of the time these are synchronous calls which creates bottlenecks. Also, retrying certain action is trickier.
Messaging – Source and destination system talks with each other over message channel. It is not required for source and destination system to have knowledge of each other. These massages can be communicated to destination system through point to point communication channel or message can be published to multiple applications. Messages can share data in standardized format and also trigger action in destination application. Messaging comes up with cost. It requires reliable messaging system. More applications you add it requires more memory to hold messages and more processing power. Developers/Designers need to think in Asynchronous way as compared to typical synchronous thinking. For example, as a developer if I get request to implement write logic to process phone numbers from provided file. I will start writing API program which will read file, then process phone numbers and then return status. This way my API will have synchronous Phone number processing capability. If I want to write this functionality considering messaging system, I will write one API which will take request and put message on message channel. I will provide another API to communicate status. Client program will call this API periodically to check status of request. I will write another handler which is responsible for reading request from channel and then processing phone numbers and later putting status on message channel.