G
G
GrenaDK2016-12-04 10:41:42
Angular
GrenaDK, 2016-12-04 10:41:42

Which way to look realtime?

Happy Sunday dear gurus!
So I look at the beautiful dashboards ala lte and thought. And how is it all washed down then? counters, notifications, etc. so that the control panel turned out to the full extent.
If a little more seriously, then I have a bunch of angular 1.5 and laravel 5.2. Let's assume the most primitive task. My dashboard is open at this time a user is registering - an entry is created in the database. I want the number of registered users on my dashboard to change and the "such and such a Sebastian registered" light on, and there are custom actions right away. in general I want interactivity. Where to read? Redux socket.io pusher is it from here? gran merci.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
H
he he, 2016-12-04
@tosha_lol_daaa

To be honest, I worked with angular (1.5) for a long time, I don’t even remember how watchers are arranged there (if they update the home-element, do it on it).
If not, I would advise:
Node.js & socket.io & something else (I used redis, but memcache is better (there is a class for working with it in standard puffs)).
The server (nodejs) will be simple, the main logic is socket.io & caching.
Well, one more thing: the event should inherit || implement the broadcasting interface. I don't even remember what's there.
+If I'm not mistaken, you need to throw an event on the same registration in order to return something to the front.
(I could be wrong).

D
Dmitry Belyaev, 2016-12-04
@bingo347

If you need to track data changes in the database, I would advise you to look at rethinkdb as a database, well, plus what was advised before me

V
Vyacheslav Plisko, 2016-12-04
@AmdY

https://laracasts.com/discuss/channels/general-dis...

S
Stanislav Pochepko, 2016-12-04
@DJZT

There are two ways. Lon polling requests. That is, you send a request to update the data every couple of seconds. And if there are changes, then only the changed data comes to you. Or socket . You can use some pusher.io service for example. Break it down into widgets. And when the widget is initialized, you start the socket for listening.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question