Richard MetzlerClarity Expert
Bio

I'm a full stack developer: Frontend, Backend, Server, Devops. I mostly program in Ruby, Java, JavaScript.

I would give my advice for free. Link me on Twitter: @rmetzler


Recent Answers


How I would build this feature "take a number and go to the queue":

1. get a fast datastore central to you servers. All webservers have to look on the same central datastore, because this number has to be unique for each visitor. Redis would be perfect for this task.

2. you have to have a middleware layer in your Rails, Django or PHP setup. All HTTP-Requests have to go through this middleware layer. This middleware layer is reponsible for getting the ticket from Redis and set it as a cookie. If the browser has no cookie, it gets one. If you want to ensure that visitors can't fake the cookie, just add a secret to each cookie/ticket.
Doing this in another layer than middleware will result in bugs because you have to add the code at many different places.

3. Profit (as long as your caching etc. works and you don't get slash dotted)


Contact on Clarity

$ 1.67/ min

N/A Rating
Schedule a Call

Send Message

Stats

1

Answers

0

Calls


Access Startup Experts

Connect with over 20,000 Startup Experts to answer your questions.

Learn More

Copyright © 2024 Startups.com LLC. All rights reserved.