Skip to content

Websockets as EventSource is this possible? #94

Open
@petrospap

Description

@petrospap

After many attempts finally I decided that I use PHP-Websockets for a small chat application into my website.

Now I have an idea but I'm not sure if theoretically can be accomplished!!!

So, let’s say that I want to display some data in real-time (NOT CHAT)

If we have 1000 users in to website mean that we have 1000 connections in server, and if connect other 1000 users then is sure that server are going to crash!

My idea is to make a bot to act as user/client and to make a handshake with correct Sec-WebSocket-Key by sending headers with curl.

In this way, we need a single connection to display anything to all users, rather than connect all users to the server!

Theoretically speaking, can this idea be accomplished?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions