Today I was reading new feature of HTML 5 Server Side Events. I read an article and created a demo. But at the end I found that it is not as useful as I was thing it initially.
As I understand What it does is send notifictions or updates to client(browser), once client setup a connection with the URL in javascript.
I created an handler in asp.net and setup a connection from client. I started listening to that URL. I was getting updates also.
But problem occurs when I opened the same page in multiple tabs. Then I found that, that URL (code in that handler to send notifications) is executing for each opened tab and sending them data by different execution. It means if site grows and we get millions of online users then this code will execute millions of times rather than executing once and broadcast the event on all subscribed browsers.
This is what I understand about how it works. Please explain me that is this work in same fashion ? What are other options if we feel that it is too heavy operation if number of users grow.
Aucun commentaire:
Enregistrer un commentaire