0

This is probably an extremely naive question, but I'm a beginner in SSE as in like, just started researching the topic today beginner and I'm understanding the basics but can't find anything specifically relating to what I'm trying to do.

I'm in the beginning stages of creating a kitchen display system that takes orders and displays them on the screen. Right now I'm working from a fake data array of orders in php, converting it to JSON, and displaying them on the screen.

What I'm trying to accomplish is every time I add a new "order" to this array, the server notices that change, sends that new order and appends it onto the screen behind the previous orders in a "real-time/live" way.

Anyone have any resources I could look at that may help or know how I should go about doing this? Everything I've seen is just examples of sending string messages to the client side.

Emily
  • 43
  • 4
  • 1
    what does "sse" mean to you? – President James K. Polk Feb 16 '18 at 00:45
  • abbreviations.com/SSE – chiliNUT Feb 16 '18 at 01:07
  • 1
    @JamesKPolk: SSE also stands for [tag:server-sent-events] . I'm pretty sure from context this is what the OP wants. We get a couple questions a week about that mistagged with the SSE tag (x86 SIMD), but usually they use the phrase "server sent events" in the question, so it's easier to see. And also, x86 SIMD instructions *can* be used when parsing JSON ([for a vectorized `atoi`](https://stackoverflow.com/questions/35127060/how-to-implement-atoi-using-simd)), so the question title could have gone either way! – Peter Cordes Feb 16 '18 at 01:07
  • So sorry! Yes, server-side-events. I tagged it in the post but I didn't know there was something else that it could stand for. – Emily Feb 16 '18 at 01:15
  • You should consider using a database or file-based storage to make the server side to client side real-time update works easily. – cjatstackoverflow Feb 16 '18 at 02:27
  • If you don't want to use a database. You might want to declare an array variable on the javascript (client-side) to compare to a server-side array variable - this should be a session. – cjatstackoverflow Feb 16 '18 at 02:32

0 Answers0