0

I need a notification system for manager of restaurant, when the stock of the item will be zero in database.

I found same question in stackoverflow for php. notifications without reloading the page (like facebook or google plus notifications)

Real time notification from web server to client bowers

Community
  • 1
  • 1
  • 1
    Sounds like you know the tech to use, here is a great resource for APEX. https://jsao.io/ Do you have a specific question? – Scott Jan 30 '17 at 03:59

2 Answers2

1

Is the APEX instance hosted in the restaurant? How many concurrent users are there?

Try to avoid over complicating things. WebSocket technology is great when you have lots of concurrent users as it can help avoid polling (which can result in a lot of wasted work).

If the instance is hosted in the restaurant or only one user (the manager) is using the system, then the easiest thing to do is just refresh the page or report every 10 seconds or so. It may not be as "sexy", but sometimes the simplest solution is the best.

Dan McGhan
  • 4,479
  • 1
  • 11
  • 15
1

I would just create a Datase trigger that fires on those conditions and calls a post REST Service