Hi all. Today, I'd like to show you the power of pure HTTP stream, which allows us to do screen sharing, video chatting, real-time text messaging, ...
For further actions, you may consider blocking this person and/or reporting abuse
Wonderful, I love all of this!
Remote control for a Windows machine would a great addition though, not sure how realistic that would be to implement, guess I'll have to use Teamviewer/AnyDeks for now.
Another thing that spikes my interest is SSH in the browser, but I'm using key pairs instead of user:pass method, is that possible with this?
For SSH in the browser, yes, it is possible to use SSH keys. I support both methods in File Tracker:
file-tracker.cubiclesoft.com/
It uses a combination of (WebSocket-based):
github.com/cubiclesoft/php-app-ser...
And the beta async support from:
github.com/cubiclesoft/php-ssh
To provide two-way, async communication with a SSH host.
May be we can use robot.js alongside the screen share to transmit mouse and keyboard events.
Very cool! Websockets sucks because you need to do 2 things to sync the user: rest api request to get the initial data, and websocket connection to receive events. So you need to do 2 things to keep the user in sync. You can not push initial data via websocket when user connects because of websocket data framing.
This is also a good replacement for SSE.
I also hope http 3 support will be there soon, so there will be more stuff to explore for real time apps.
Unconventional niceeee ...
I can see a lot of potentials in this approach. Thanks for the detailed post and ready-to-use sample resources.
I have a few questions:
Wow!
Very good and informative article!
Thank you🙏
One question that popped into my mind during reading this is wether it's possible to transport tcp over Piping server, similary to ssh over http scenario?
This is fairly reminiscent of my PHP Cool File Transfer project where I did something similar a few years ago:
github.com/cubiclesoft/php-cool-fi...
One client basically creates a mini-TCP server inside a PHP script on the server and another client somewhere else connects to the mini-TCP server and receives the file as a direct transfer. PHP emits a byte every second to keep the connection alive for the person who is sending the file until the second client connects and accepts or rejects the file. If the file is accepted, then it starts transferring. The web server doesn't store any data - it just sends the data to the other side. The setup of a temporary TCP/IP server per file is somewhat exotic.
There is a slight gotcha with the approach: A GET method caller never finishes as can be seen in the "Simple text messaging" example for Piping Server where the loading indicator never stops spinning. That means onload won't fire in that case. In the instance of a file download, the download manager takes over and handles the request. The solution is to wait until the page has finished loading and then make a XHR request.
What a cool project.
That's the nice thing about tools that the leverage existing web ecosystem, the results can be really impressive while at the same time everyone is like "wait, yeah, of course, that should have been obvious".
Great work, Ryo! Thanks for sharing!
Nice work and great blog. Is it possible to implement peer to peer streaming, so the data traffic won't pass through server.
Nice work and interesting. Lot of depth in the article !!
Absolutely outstanding!!
Great article, very well written, useful and approachable.
Thanks you!!
Awesome 👏🏼. I am going to give it a try.
I am in awe of this project 😐 completely mind bogling
This is truly an awesome project
Great article, I'm literally going to keep 1 hour aside to go through this in-depth
This is great! Any observations on latency compared to websockets?
"Voice and video chatting" Example not working, anyone help ?
What kind of sorcery is this and why I haven't heard of this before?! (lol) I'm blown away! Good work, this is amazing! 😊
nice! i learned a lot today 😊 thanks!