Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
WebSocket Queuing regular messages vs callbacks to complete request processing before continuing

I have an odd scenario I think, or at least haven't had this much of a challenge with my Javascript or any language for that matter... The pseudo is messing me up basically/logic stuff.

So I want to run a queue/callback-bypass through web-socket so when a message comes in I can process it one by one but if it's a callback I let it run every-time.

The issue I run into is I store the messages in a queue and unsure how to program my nextMessage statement to handle running queued items but clearing a callback message and not losing order.

My code now is being modified on the go so posting it is tough,

But say if I wanted to allow regular messages that can have instant response run but callback messages maximum priority without screwing up the order.


I'm dealing with the issue where if too many messages are routing at once I may summon two or more messages and bring things out of sync. So if users who write games or do stateless operations got a perfect queuing method with brain power behind it with web-sockets willing to hear it out.

I'll be coding to sort this but working off a MessageHandle/NextMessage function but seeing I can't just call next every-time or need to re-think my setup a bit.

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!