1) User completes sign up using regular sign up form. 2) we save the data in our DB. But right after that, with same profile we have to create user profile in the 3rd party system via API. Without creating profile in 3rd party system, user cannot move to next step. which means it is super critical to create user profile in 3rd party system. Approach 1: have a column in users table within our DB “isTPCreated” and fire an API request to 3rd party system. If response is “successful”, update isTPCreated to true. But if response is unsuccessful, I can do 3 retry. How to ensure the entry is created? Tech stack: RoR #tech 9yoe 300k
Paypal uses ROR?
You could store the reference Id of the third party profile in the user table instead of a Boolean! Also could add refid_created_at as date time How come you are getting 300 k mate 👀
Depends on what infra is available… you can stream process progress to the frontend as it’s being done Happy flow: “Creating entry… Setting preferences… linking account with 3rd Party Co…. Success!” Iff 3rd party error: “Creating entry… Setting preferences… linking account with 3rd Party Co…. Unable to reach 3rd Party Co. servers — account functionality limited until verified” Then a Retry API behind a Message Queue called by your User Creation API. This Retry API will retry the 3rd Party creation and update the DB on success. Scalability is limited by 3rd Party servers on how quickly they can create users, as Retry & User Creation can scale Message Queues horizontally and don’t need to keep state themselves EDIT: Pls critique my suggestions above, I’m practicing for SD interviews
Dude post this on stack overflow 😂😂
Question too broad. Closed. 😂
9yoe 😳
India
Yesterday
1241
Modi is a legend, will be remembered for centuries to come
Tech Industry
8h
937
Women, help me understand why this is inspirational
Tech Industry
Yesterday
1115
How common is it actually to earn more than 300K TC?
Tech Industry
40m
953
What happens when most of your team is Indian?
Cars
Yesterday
938
Do you really feel special in your Tesla?
You probably can’t? It’s a third party system which I assume is out of your control? Also why not save the data in DB after you receive a successful response?
What you mean? We have API key and permissions to create users in their system.
“Also why not save the data in DB after you receive a successful response?” What if the response is failure and we lose data as it is not in our DB?