Handmade Network»Forums
Hui
3 posts
How to design a reliable and fast remote UI ?
Edited by Hui on
I have an app running on a server, It has two remote UIs, one is for developer, the other is for display only.


app_ui1 <--> app <--> app_ui2


I wonder what is a good way to architect the communication part to make it reliable and fast.


Thanks!
Simon Anciaux
1337 posts
How to design a reliable and fast remote UI ?
I know nothing about network programming, but this seems like too broad of a question and not much information. You probably need to experiment yourself first, and based on that experience come back with more precise question or problem.
183 posts / 1 project
How to design a reliable and fast remote UI ?
Lightweight method
Only send the data that needs to be displayed, then interpret it locally. Good for text and graphs like in Arduino's remote debugger but reversed. This allow the client side to have different programs for different hardware platforms without having to ever change the server program.

Example:
temperature: 24
temperature: 25
temperature: 27

Reusable method
Implement something close to the X11 protocol or a browser, so that you can reuse the same program for the client side even if the server program updates. Then use passive rendering to only redraw when something changes. Create an indexed image buffer for each reusable resource and then send draw commands to the final canvas with a minimum amount of data sent.

Example:
upload pixelData to resource 1
upload pixelData to resource 2
draw resource 1 to canvas at x1, y1
draw resource 2 to canvas at x2, y2
draw resource 1 to canvas at x1, y1
draw resource 2 to canvas at x2, y2
Hui
3 posts
How to design a reliable and fast remote UI ?
mrmixer
I know nothing about network programming, but this seems like too broad of a question and not much information. You probably need to experiment yourself first, and based on that experience come back with more precise question or problem.


Thanks for your reply.

I did some prototyping. It turns out that what I need is some middle ware, like rabbitmq but much more lightweight.

The middle ware implements publish/subscribe and request/reply pattern and it should support localhost(inter-process) setup and remote(via socket) setup easily.

I am still working on this. May update later when I have something useful.