How to implement this design

I need to display a realtime wave through network.

Different users may connect to the same data source(a FPGA based hardware included the IP part) at the same time through IP. Though the case is rare. The traffice for one user is big. In order to lower the output network traffic of data source harware when multi connection was built up. Is it correct to add a server between data source and user as attached.

It may involve a lot of new works. Also, I am not very sure about the design of the server program. Is there any structure I can follow. Any idea of fhow to buffer the realtime data on the server.

Any suggestion, thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

if you have only one server for all data sources, this server could become a bottle neck. to reduce this risk each data source and each client (user) should be handled by a different thread,  if the total of threads would exceed a threshold (for example 64 what is dependent on the computer's potential and the allover traffic), you may consider using a so-called thread-pool where the whole work is divided into small tasks which would be processed by a fixed number of threads by means of a queue.

the connection to the clients would be standard client-server, means there is one thread in the server which permanently listens for new clients and creates a server-client connection via thread or thread-pool whenever a new client was accepted.

the clients would connect to the server instead to the data source and pass their requests to the server. here probably the request data needs to be marshaled (serialized) where you could use boost library if this part should be done in c++.

a request of a client would be unmarshaled by the server and passed to the data source. at this point the logging could happen. in a new task (thread) the server would receive data from data source and return them back to the client. here serialization probably is not necessary but the data could be transferred as raw binary given that client and server both are running on compatible hardware, operation systems, compilers and project settings to avoid alignment and encoding problems.

turbot_yuAuthor Commented:
May I know how to design a direct tunnel in server to pass through the data for each connection.

How to buffer the realtime data on server, how to manten the dynamic size of the buffer.

Any suggestion, thanks.
in my opinion you don't have tunnels cause in case two clients would connect to same data source you would have multiple tunnels from datasource to server what is difficult to synchronize. instead the server would buffer the returned data from data source and dispatch them to the threads (using one queue for each thread) which then redirect the results to the client which requested the data. dynamic size normally is handled that each packet has size information at begin such that the receiving thread could provide a buffer of sufficient size.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Network Architecture

From novice to tech pro — start learning today.