THE HISTORY OF THE REQUIREMENT :THE HISTORY OF THE REQUIREMENT :
MY PARTNER SEND cvs files via MFT to MY CLIENT , many times a day MY .
MY CLIENT has a listener ( cron job in linux and batch ) , when a file is received in a folder , hethe client consumes it and store it in database ( SQL SERVER)
Regarding data , the estimated trafic : 700 files a day Millions of lines in cvs file to be consumed
The new solution there is to transferno order in data via API and not MFT :, each time a file is received it is processed by batch .
The new solution is to transfer data via API REST CALL and not OLD MFT :
The need is to retrieve huge data from a partner by calling it'sAPI REST APIs (JSON) to finally store the result in our SQL database (not too much processing to do in between)
SOLUTION 1 : Event Driven Architecture :SOLUTION 1 : Event Driven Architecture and PARTNER EXPOSE API REST TO RETRIEVE DATA :
MY CLIENT : Based on this message , wemy client CALL the REST API ( GET exposed by our PARTNER ) to GET THE DATA FROM JSON RESPONSE of the call HTTP ( this will be implemented for example by spring batch )
SOLUTION 2 : THE PARTNER DO NOT EXPOSE API , MY CLIENT WILL DO THIS !SOLUTION 2 : THE PARTNER DO NOT EXPOSE API , MY CLIENT WILL DO THIS !
OUR PARTNER ==> THIS time , our Partner will call THIS POST API REST AND send all data in REQUEST BODY , as a result , the partner update our SQL DATABASE when he calls our API REST ( CLIENT CALL THE POST API WHEN HE WANTS TO UPDATE DATA)
Notes :MY Notes :
My requirements : evaluates the pros and cons of these solutionsMy requirements : evaluates the pros and cons of these solutions
For my part, I opt for the first solutionSOLUTION 1 because :
pos1 : the processing will be asynchronous pos2 : we will be the master of our data to be added to our database (EDD is it good as an argument ? ) since pos3 : processing in almost real time cons1 : architecture is complex when in we move to cloud cons2 : Partner is not familiar perhaps with this solution
- the processing will be asynchronous
- and we will be the master of our data to be added to our database
- processing in almost real time
- architecture is complew
- Partner is not familiar perhaps with this solution
The second solution ( we expose API , the partner simply call it ) pos1: is rather light (less expensive) it is an advantage, cons1 : but has the disadvantage that the processing will be done synchronously cons2 : that we will not be master of the data to add to our REF (unless checks to be made in the POST action to be exposed) cons3 : call of API will be an additional charge by our partner
- is rather light (less expensive) it is an advantage,
- but has the disadvantage that the processing will be done synchronously - and that we will not be master of the data to add to our REF (unless checks to be made in the POST action to be exposed)
- call of API will be an additional charge by our partner
Thank you for your enrichmentsfeedbacks : (advantages / disadvantages) cordiallyRegards