Questions tagged [Server-Sent Events] (18)

2
answers

Event Sourcing transaction projections?

Hi all. Tell me, I have a Ui layer, where the controller sends a command in a layer application that generates the event and then projects it in normalisierung database. Faced with the problem when it comes to collinite when you create two identical users. In simple words, the first user is logged, the event is saved on the...
arvid_Dooley41 asked April 7th 20 at 09:55
1
answer

How to make HTTP SSE (Server Side Events) in PHP application?

In classic PHP application on Apache spinning there was a need to send data to clients in real time upon the occurrence of certain events. Specifically, to the application via the API contains the external system and add to it some data, the processor immediately processes them, and should at the same time notify all users ...
Michel asked April 3rd 20 at 16:33
2
answers

Whether the use of message queues and architecture with the event-driven model?

There is a service which accepts requests via the REST on some sample data. Changing and adding data is also done through it. You need to notify the services that subscribe to it, to change the data. Thought about the architecture of data Services -> Manager subscriptions (sortie takes and distributes messages in the que...
Mariane_Zboncak asked March 15th 20 at 23:13
1
answer

SSE vs SOCKET.IO

Please tell me what is the difference between SSE (Server-Sent Events) m SOCKET.IO that it is better to use ?
Justice asked October 2nd 19 at 22:29
0
answer

SSE, which determines the time of return, how much serious load on the server?

Started to dig in the direction of the SSE to return the game statistics. Actually considered an example ofpublic function actionIndex() { print(' <div id="help"></div> <script type="text/javascript"> var help = document.getElementById("help"); var source = new EventSource(\'/site/sse/server/\'); ...
Justice asked October 2nd 19 at 22:17
2
answers

How to determine the SSE request?

The problem is, you need to track which page the user visits. I'm using Yii and protected function beforeAction() { // call function that writes to the database url } So in parallel I'm using a library for working with SSE and for example when I visit the page in the database gets the record helpdesk/ask, but after 5 se...
Justice asked October 2nd 19 at 22:04
1
answer

SSE php and javascript

Work with the EventSource library. Need to update data on the page in realtime. Client:<script type="text/javascript"> var es = new EventSource("/games/game/updateProposal/?id=<?=$proposal->proposal_id?>"); var open = function (event) { console.log('Opening'); }; var listener = function (event) { c...
Justice asked October 2nd 19 at 15:27
1
answer

A few questions on working with the library EventSource?

Use this thing https://github.com/Yaffle/EventSource Less understood what was happening. But still there are several issues to understand. Question number 1, what cycle ?header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); header("Access-Control-Allow-Origin: *"); $start = time(); $lastEventId...
Justice asked October 2nd 19 at 13:48
5
answers

Why doesn't the flush()?

Use SEE and stumbled upon a school: On the local server everything works:public function actionUpdateProposals() { // game id $year = (isset($_GET['id']) && is_numeric($_GET['id'])) ? (int)$_GET['id'] : 0; set_time_limit(120); header('Content-type: text/html; charset=utf-8'); header('Content-Type: text/event-...
Justice asked October 2nd 19 at 13:31
3
answers

How to run the parser through the POST and giving it to events through evensource?

Greetings, dear, really need your help regarding server-side events. The problem is the following: On fronend is a form with parameters to run long-running the parser. As well, there is a textarea, which serves as a realtime log of this parser. The form is sent through POST request using ajax through jquery famous jquery pl...
Zachariah58 asked September 30th 19 at 23:45