Elegant Client/Server?
-
I have been working on a client/server application model for a long time and am having a terrible time dealing with file transfer. The main problem is basically having to build and parse the messages myself. I have been looking through a lot of Remoting and other forms of client/server interaction and it seems like some of the ideas here would provide a much more efficient and elegant solution to a client/server program. What I have been kind of wandering is if there is a simple way to serialize data then send it to the server who in turn just channels it to the appropriate client after doing some basic extraction/parsing. From what I've seen if I could utilize XML and SOAP then the task shouldn't be too difficult, but as I am waiting for some books to arrive on the subjects, I am eager to get started. Can anyone lead me in the correct direction if I wanted to do the following: Serialize messages into XML format to send to the server Server receives the XML message, parses it, then sends it along to the approporiate client It seems intuitive that if, instead of streaming binary data to send files manually (which is how I am currently having to approach it) I could just serialize a byte array, or in the case of images, serialize a PictureBox, this whole mess could be cleaned up simply. Any assistance would be appreciated.
-
I have been working on a client/server application model for a long time and am having a terrible time dealing with file transfer. The main problem is basically having to build and parse the messages myself. I have been looking through a lot of Remoting and other forms of client/server interaction and it seems like some of the ideas here would provide a much more efficient and elegant solution to a client/server program. What I have been kind of wandering is if there is a simple way to serialize data then send it to the server who in turn just channels it to the appropriate client after doing some basic extraction/parsing. From what I've seen if I could utilize XML and SOAP then the task shouldn't be too difficult, but as I am waiting for some books to arrive on the subjects, I am eager to get started. Can anyone lead me in the correct direction if I wanted to do the following: Serialize messages into XML format to send to the server Server receives the XML message, parses it, then sends it along to the approporiate client It seems intuitive that if, instead of streaming binary data to send files manually (which is how I am currently having to approach it) I could just serialize a byte array, or in the case of images, serialize a PictureBox, this whole mess could be cleaned up simply. Any assistance would be appreciated.
Sounds like you want to build a web service. Christian Graus - Microsoft MVP - C++
-
Sounds like you want to build a web service. Christian Graus - Microsoft MVP - C++
Yeah, the premise of the Web Service is exactly what I need, but I haven't been able to figure out if I can use the Web Service to keep track of clients?
-
Yeah, the premise of the Web Service is exactly what I need, but I haven't been able to figure out if I can use the Web Service to keep track of clients?
AFAIK, a web server responds to requests, and that's it. What are you trying to do, exactly ? Christian Graus - Microsoft MVP - C++
-
AFAIK, a web server responds to requests, and that's it. What are you trying to do, exactly ? Christian Graus - Microsoft MVP - C++
Well I am basically working on a simplistic messaging program, which I have completed with success, however I need to have file transfer abilities. So far, all of my attempts have failed due to interleaving of messages of which I cannot seem to prevent. It would seem that there might be a better way of transferring data using XML and perhaps serialization that would alleviate the problems of having to custom build and parse my own messages. The whole idea of the web service is pretty much exactly what I am looking for, except the fact that it only response to clients per request. If there was a way to create a server using the same technology I would definitely like to attempt to do so.
-
Well I am basically working on a simplistic messaging program, which I have completed with success, however I need to have file transfer abilities. So far, all of my attempts have failed due to interleaving of messages of which I cannot seem to prevent. It would seem that there might be a better way of transferring data using XML and perhaps serialization that would alleviate the problems of having to custom build and parse my own messages. The whole idea of the web service is pretty much exactly what I am looking for, except the fact that it only response to clients per request. If there was a way to create a server using the same technology I would definitely like to attempt to do so.
I'd definately use FTP to transfer files, unless there are firewall issues. Just send your client an FTP address, and it FTP's back for it's file. That's what FTP is for, and converting a file into XML is going to make it bigger. Christian Graus - Microsoft MVP - C++