#Automatically render service

6 messages · Page 1 of 1 (latest)

sage rivet
#

you need a way to communicate from the server to the client. You have a few options:

  • websockets
  • long polling
  • periodically make a request from the client to the server i.e. every 10 seconds (not so nice)

good luck 😅

crimson vortex
sage rivet
#

you need a websockets, that will return an observable. But it's not as straight-forward as you think.

cold light
# crimson vortex With the observable is not possible?

An observable just represents a stream of data. If you make an HTTP request, you'll get a stream of one response. But you can, for example, create an observable that will do a request every 10 seconds. It's your job to do that though: it won't happen magically.

crimson vortex
sage rivet
#

yes. With websocket you have a bidirectional real-time communication between server and client. So the server will be able to send update events to the client.
if you want to do this, I suggest you to use Socket.IO as a library.