|
|
|
|
|
by windows2020
1607 days ago
|
|
Best Practices The requirement was to ingest a CSV, transform it, and put it in a database somewhere. The solution was three microservices. The first read the data piece by piece (unit of work) and passed it to the second via HTTP. This was slow so it was threaded. The second provided an abstract class which was extended to facilitate string transformations. Each was accompanied by a unit test. Similarly, the result was passed along to the third service via HTTP. This was also threaded. The third put the data into a third-party queue which wrote into a database. It took nearly a half of a day for the process to complete. I rewrote it as an SQL script which read the CSV into the database directly, used SQL functions for the transformations and then stored its result. It took a few minutes to complete. But, this wasn't a best practice or popular, and what would the team work on? |
|