Description
Since Vue2 is deprecated #358 we need to rewrite client. While we will be rewriting client, we could take a look at the server as well and finally join m1k1o/neko and demodesk/neko.
Main pain-points that should be solved by this rewrite:
- Client should be split to library typescript component that does not use vuejs or any library and can be imported by any project. It should be as easy to integrate into custom project as embedding video player. Similar to how demodesk/neko-client is built, but without VueJs.
- The connection, media streaming and control should be extracted as an interface, so that it can be implemented by various protocols, not just WebSockets+WebRTC. That would elevate this project from just a shared virtual environment to basically video streaming server with built in tools for feedback and out-of-band communication (such as natively binding to RDP/VNC protocols, controlling drones/robots/PTZ cameras/industrial devices remotely). Since the controlling layer could be just a plugin, it does not need to relay on only keyboard and mouse but would allow to plug in gamepads, joysticks or even Virtual Reality glasses (anything).
Connection:
Neko can connect to the backend using multiple channels. Therefore API users should not be exposed to WebSocket internals.
They should only care about the connection status:
- 'connected' - user is connected to the server
- 'connecting' - currently the client is attempting to establish connection to the server.
- 'disconnected' - user is disconnected from the server and there are no attempts to connect to the server. this should always be notified with a reason why it has been disconnected.
And about connection type:
- 'none' - no connection is currently used.
- 'short_polling' - every X ms the client requests the server for updates.
- 'long_polling' - http request is kept open until the server has updates to send to the client. then the client sends another request.
- 'sse' - server sends updates to the client using Server-Sent Events.
- 'websocket' - server sends updates to the client using WebSockets.
- ... others (e.g. mqtt...)
Media streaming
For media streaming, we implement a similar approach with the following streaming backends:
- 'none' - no media streaming is currently streamed.
- 'm3u8' - media is streamed using HLS.
- 'webrtc' - media is streamed using WebRTC.
- 'quic' - media is streamed using QUIC.
- ... others (e.g. rtsp, dash...)
Various media streaming backends can have various features. For example, WebRTC can have a feature to send media to the server, while HTTP can only receive media from the server.
They can be selected based on the user's device capabilities, network conditions, and server capabilities.
There must be a single interface that all streaming backends must satisfy and its their only communication channel with the rest of the system.
Control (Human interface device)
The user can control the target system using various human interface devices. The user can use a keyboard, mouse, gamepad, touch screen, or any other device that can be used to control the system. Custom or virtual devices can be used as well.
Normally in-band feedback should be provided to the user inside media stream. But there can be cases where out-of-band feedback is required.
- when the user is using a gamepad, in can be used to control the system, but the gamepad can also have a vibration feature that can be used to provide feedback to the user.
- cursors can be hidden on the screen, or for certain users therefore they need to be transmitted out-of-band.
- since there are multiple users all of them can have custom cursor shown on the screen, but only one cursor can be controlled by the user. Therefore the cursor position must be transmitted out-of-band.
- changing screen resolution, orientation, or other settings.
- changing the keyboard layout or modifier keys.
- setting a host - who is currently controlling the system based on priority and permissions.
Control can use both underlying connections or media streaming for transmitting and receiving control data. For example, WebRTC data channels can be used for transmitting control data in real-time.
Conclusion
In the first step we should create and agree on client's library API and create interfaces that will be used and implemented later.
More will follow, please let me know if you have any ideas. Stay tuned.
Todo
First phase - merge demodesk/neko
to m1k1o/neko
with legacy driver to emulate old API.
- see more details in Version 3 - Phase 1 #423
Second phase - merge demodesk/neko-client
to m1k1o/neko
while upgrading to vue3 and deprecate legacy API.
- Rebuild
m1k1o/neko
GUI from scratch on vue3 while usingdemodesk/neko-client
as core plugin.
Third phase - make the codebase modular (as mentioned above).
Metadata
Assignees
Labels
Projects
Status
No status