- given customer is on carpoolin.com/someurl/results/123
- press a button, their Frontend sends it to their Backend, their frontend sends fare_id to SS and polls for the url
- in the meanwhile the user will see 'their' waiting page
- we return a url
- their frontend redirects/blanks new page whatever our url (our waiting page)
- as soon as we can we redirect/submit form with js to send the user to the agency
- user clicks purchase
- fare_id is sent to SearchService
- SS queues the job for BotQueen
- SS also makes a Redis key with the status of 'in_progress'
- BQ gets the job from the queue
- BQ uses SearchClient to request data from SS (segment, fare, etc.)
- SS handles this request, queries db, responds to BQ with results
- BQ sends info to bot
- bot constructs HTML, making requests to agency if necessary
- bot returns HTML to BQ
- BQ sets the key (previously created by SS in step 4) to the generated HTML
meanwhile, in the browser:
- browser polls for how to redirect user
- browser polls SS for HTML
- Each time SS is polled, SS asks Redis if HTML is available
- Poll until HTML is available
- HTML will redirect the user deep as possible into the payment process of the agency & ensure that the cookie is droped to track the sales