Skip to content

Example of integrating different applications for data exchange

License

Notifications You must be signed in to change notification settings

betofigueiredo/go-integrator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Integrator

Example of integrating different applications for data exchange.
(work in progress)

Video explanation (link)




Integration steps

🔹Request users list from API

      Concurrently, in chunks of 1000

🔹Map all users ID’s

      Save in a map, using mutex to handle async r/w

🔹Request additional info for each user

      Concurrently, in chunks to prevent API overflow

🔹Save additional info in the map

      Also using mutex to handle async r/w

🔹Send users data

      After processed, send to any selected external service


API



Endpoint: /users
API Schema 1

Endpoint: /users/{user_id}
API Schema 2


Integrator



Endpoint: /get-users
INTEGRATOR Schema


Usage

Start all services:

❯ make up

Load your database with some data using K6:

❯ k6 run k6/seed-test.js

Call Integrator endpoint to fetch data from API:

❯ curl http://localhost:3002/get-users