If you're processing 10k requests serially, then the database won't be your bottleneck. Since you'd be sorting by primary key, and that gets automatically indexed, your database won't even flinch at selecting the top row from 10k records. The real bottleneck is going to be the fact that you're processing one at a time, and that you have to wait to send the REST request and for it to return. And there's going to be no way (that I can see) to scale that until you rethink the architecture.
_Nik On 12/15/2012 6:27 AM, psychok7 wrote: > hey Nikolas, it looks like a solution that would work in fact, but > there are some limitations in terms of performance (i need my app to > be scalable). If for each request i sort my database it will > eventually become slow for 10.000 requests, so i was actually looking > for a more scalable solution. > > For know i can work with your idea, but wouldn't want it to be long > term. If you have any more ideas please share. > > On Monday, December 10, 2012 4:20:52 PM UTC, psychok7 wrote: > > So I have this 2 applications connected with a REST API (json > messages). One written in Django and the other in Php. I have an > exact database replica on both sides (using mysql). > > When i press "submit" on one of them, i want that data to be saved > on the current app database, and start a cron job with > celery/redis to update the remote database for the other app using > rest. > > /*My question is, how do i attribute the same worker to my tasks > in order to keep a FIFO order?*/ > > I need my data to be consistent and FIFO is really important. > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/dmZ0utouw48J. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

