How to organize a data exchange to the service receiving new data every second?

In Laravale has a built-in supporting websocket. Question. Can I use this scheme and not choke part, given the fact that the data is received over the socket every second with third-party API.

Driving is such. Come the data on my client, the client writes them to the database. Larval keeps track of new entry and queues, to distribute this data to clients on a socket.

Cope if Larabel with this task given that the data are coming every second?
April 7th 20 at 11:57
2 answers
April 7th 20 at 11:59
Solution
Knight's move: emulate a database using API web socket server for their customers.
No delays and complete freedom of action.

The web socket - any.
Larval - here.

PS: remember that "cool" is not having the name Laravel(or any other) in your project, and good architecture and choice of optimal instruments for its implementation in the framework of the task.
Thank you, but I do not know yet how. The data arrives every second for example, and it is the graph.. for example to show the schedule for the week - all the same it is necessary somewhere the data to write. - Carmela.Stamm45 commented on April 7th 20 at 12:02
@Asa, if historical data is necessary to write, Yes.
But it can be done simultaneously with the sending of data on customers: parallel flow.

just don't understand yet how.
snifferdata traffic exchanges, and repeat the logic of the communication DB on your websocket.

The task of
Come the data on my client, the client writes them to the database.
to make wrote to the port the websocket server like a database server. - Brielle.Emmeri commented on April 7th 20 at 12:05
@Ed.Shanahancan tell. Here is my client receives the data. How do I make sent to my server, because now I'm connected to a third-party API server?
const ws = new WebSocket ( ' wss://stream...' );
ws.on('message', function incoming(data) {
 How do I make sent to my server, because now I'm connected to a third-party API server?
 });
- Carmela.Stamm45 commented on April 7th 20 at 12:08
@Asa, your do. It's not two lines! - Brielle.Emmeri commented on April 7th 20 at 12:11
April 7th 20 at 12:01
To use Laravel for such problems, the idea of working, but not very common. As for performance - it all depends on how much money you are willing to spend on infrastructure. And so will cope fine if clients are well up to 1000 online. Then you will start the problem of vertical scaling. You can still stall it, but still it will end at some point.
If you want to keep a lot of connections https://nchan.io/ will suit you perfectly.
Thank you. So it's in Laravel, or in gluttony, in the process described data exchange? If in Laravel then you may want to look in the direction of the micro-frameworks of the same SlimPHP. But with Laravel of course more comfortable. - Carmela.Stamm45 commented on April 7th 20 at 12:04
@Asa, receiving and forwarding streaming data is only the websocket server.

The log output and other operations with the display data from the database - php (take anything).

PS: remember that "cool" is not having the name Laravel(or any other) in your project, and good architecture and choice of optimal instruments for its implementation in the framework of the task. - Brielle.Emmeri commented on April 7th 20 at 12:07

Find more questions by tags LaravelWebSocket