How to handle server-client requests
Posted
by Layne
on Stack Overflow
See other posts from Stack Overflow
or by Layne
Published on 2010-05-11T11:38:44Z
Indexed on
2010/05/11
11:44 UTC
Read the original article
Hit count: 210
Currently I'm working on a Server-Client system which will be the backbone of my application. I have to find the best way to send requests and handle them on the server-side.
The server-side should be able to handle requests like this one:
getPortfolio -i 2 -d all
In an old project I decided to send such a request as string and the server application had to look up the first part of the string ("getPortfolio"). Afterwards the server application had to find the correct method in a map which linked the methods with the the first part of the string ("getPortfolio"). The second part ("-i 2 -d all") got passed as parameter and the method itself had to handle this string/parameter.
I doubt that this is the best solution in order to handle many different requests.
Rgds Layne
© Stack Overflow or respective owner