|
-
Dec 26th, 2006, 09:40 PM
#1
Thread Starter
Lively Member
[2005] Client/Server Design Question
Hey PPL,
I post today to ask you opinions as I am a total noob in this area of programming.
I need to create a server client app. There may be many client connections at once (up to 10). The client is basically a mobile application to take customer order data and send it to a server for processing. So I face a few design decisions. I want to know when an order has been placed by a cleint app.
So the client will need to send a serialized object of order information to a server app where it is recievd and processed immediately. I need some kind of event to fire on the server when the client makes an order.
I have looked at remoting and a simple TCP Server/Client but am left asking questions.
Really there are only two requirements:
1) Send data to server
2) Server event for data received over the network.
I was thinking I will simply serialize my object and send it using TCP sockets but the server wont know when to check the stream for data, I would have to check it in a time loop. I would rather some sort of event fired that I can react to.
Is there a technology that will do this? I have briefly looked at remoting but am unsure if it will suffice.
Any thoughts, ideas or questions guys?
Thanks,
Matt
-
Dec 26th, 2006, 09:53 PM
#2
Re: [2005] Client/Server Design Question
First place I would start is to read up on Remoting from MSDN, a good place to start is below:
http://msdn2.microsoft.com/en-us/library/ms299079.aspx
I haven't ever messed with it so I can't be much help...
It requires several steps to achieve, for security reasons, which is why you can't simply serialize it and deserialize it at the server without implementing certain things, as explained in the link.
-
Dec 26th, 2006, 09:59 PM
#3
Thread Starter
Lively Member
Re: [2005] Client/Server Design Question
Yeah I think your right Gige, the more I read and learn the more I think this is what I want. When I first read about remoting it appeared to be for singleton classes living on the server process. This threw me as I need to deal with a serialised instance copy of the object, if I can figure this out Im set!
Thanks for the pointers gige, got me on the right track...
-
Dec 27th, 2006, 07:21 PM
#4
Thread Starter
Lively Member
Re: [2005] Client/Server Design Question
Hmmm not sold on remoting....
Thinking I will just serialize an object at the client and send it to the sever over a TCP connection. I'll just leave the listener in its own thread in an infinite loop. Each time it finds a connection it can react accordingily with the object that is sent...
Am I just describing my own version of remoting?
-
Dec 27th, 2006, 09:52 PM
#5
Re: [2005] Client/Server Design Question
Look up Web Services.... that sounds like what you need. An object that can sit on a server, allow you to connect to it, and send/receive data to/from it.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|