I have a warehouse management app that I have written that handles batching of orders for batch picking, scanning of items for packing and accuracy. Part of this app is a Dash or control panel that the different managers in the warehouse work out of. It shows who's picking, packing, who's available, how many orders are available to be batched and a BUNCH of other details and controls. Right now i have an ajax call that checks a time stamp that runs every 30 seconds or so to see if the page should be updated (a change made on another managers workstation).

A manager does something that should be shown on all other workstations that are viewing the "dash". Maybe they batched some orders and pickers that were available are no longer available. Right now when the change is made i update a timestamp saved in a database. On the html page the timestamp that was in the db at last page load is saved in a hidden div. The javascript takes that timestamp and checks the database at an interval if its different the page updates.

Its a bit more complicated than this as sections of the page get changed not the whole thing but the description sums up the process.

This works but i don't like it. It requires a database hit from each workstation every 30 seconds. Seems overly complex. I am looking for some thoughts on how I might push a change as it occurs and minimize or eliminate some of the database interactions.


  • This requires both your database (pubsub) and your web server (websockets) to push data. Your technology stack may need changing
    – Raynos
    Commented Aug 3, 2011 at 17:03
  • This might help you: ape-project.org/ajax-push.html Commented Aug 3, 2011 at 21:21
  • Read sections 11.5 and 11.6 in Exploring Lift Commented Aug 5, 2011 at 23:32
  • I don't see why this is complex. It seems like the simplest possible solution. Other solutions may decrease the server load, but the implementation will be more complex. How many workstations are there? Commented Aug 6, 2011 at 4:49
  • 1
    Seems to me that a web interface isn't really the best solution for something like this. Kinda like using a screw driver as a hammer. If you set up a client/server application using a language such as Java you'd probably find your results to be better.
    – Kenneth
    Commented Aug 6, 2011 at 17:00

1 Answer 1


I know that yours sounds as it is not the best solution, but I do agree that is is the simplest that could be achieved with the current common technology resources available.

One of the approaches to make that more efficient and less server-heavy is the use of cache. Your cache could be updated directly when your manager makes changes AND in the database, so that the rest of the clients always (or most of the time) get their response from the cache.

Someone mentioned the use of web sockets and that's another great idea.

Also, I would make the application very rich in UI so all of these changes only mean a simple query to the backend and all of the data/UI/screen computation is done on the users client machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.