Answer the question
In order to leave comments, you need to log in
How to sync 2 apps using API?
Hello.
Introductory such:
There are two applications with the databases (one web, the second corporate server application). Both applications have different databases. Both applications have an API. When adding information to a web application (for example, you can take the registration of a new user) - the data must first be sent to the server database, and then (or in parallel) to the corporate application database (naturally using the API). If some data is added in a corporate application, then they are respectively first saved to the database, and then a get request is sent to save this data to the web application database.
The question is how to implement the first part on the server (I use Apollo server, Node) as efficiently as possible - where the data changes on the site and, accordingly, you need to save it in both databases. I’ll make a reservation right away that the implementation should use the API, since it’s impossible to implement synchronization at the database level. There is very little knowledge of JS, so first of all I am looking for examples or detailed articles with the implementation of this.
Answer the question
In order to leave comments, you need to log in
In the simplest case, a separate synchronizer application is written, which receives requests from application 1/2 through the API and generates requests in the API of another application 2/1.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question