Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the fastest way to create a response Id?  RSS feed

Cindy Jones
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following requirement:
User makes a call to my service. My service makes a call to an external service, gets a response.
My service returns an internal responseId and the responseCode from the external service to the user.
My service should be highly scalable, with low latency, and should give a fast response.

There is no performance improvement I can make to the external service.
However I need to generate a response Id.
Is this approach the best -
Create 2 threads, the first one makes a call to the database to get the next number from a sequence.
The second one makes a call to the external service.

Are there any better solutions out there for getting the response Id?

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!