I would like your opinion on the following situation and my solution:
I got 3 processes:
- Remote Server Application
- Local Server Application
- Local Client Application
Basically a got a list (sized around 100 items) of structs that look something like that:
struct Dummy {
float f[16];
}
My local server receives updates from the remote server, I've no control over the remote server, it sends its updates about 20 times a second ( 20 Hz
).
Then my local server needs up update my local client with the exact same data.
The local server & client are on the same machine.
I successfully implemented a very basic client-server-PoC for the locals using pipes. The client writes to the pipe requests and the local server writes back answers which it received from the remote server.
This is not optimized: in the real world there is no need to the client to send any request because it's known beforehand exactly what data it needs.
I thought of doing the following, and I wonder if that will be optimized (we are talking about around 100 x 4 x 16 = 6400 bytes
for a single data push, around 20-30 Hz
so around 150-200 kb per second
:
Local server creates a pipe and just updates it, around 20
times a second, around 6400 bytes
each time and the local client just pull the data as fast as it can.
I wonder if there might be a better way - that way is super simple and easy to implement but I wonder performance wise if that is the best way.