Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Elegant Client/Server?

Elegant Client/Server?

Scheduled Pinned Locked Moved C#
xmlwcfsysadmindata-structuresjson
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    methodincharge
    wrote on last edited by
    #1

    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.

    C 1 Reply Last reply
    0
    • M methodincharge

      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.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Sounds like you want to build a web service. Christian Graus - Microsoft MVP - C++

      M 1 Reply Last reply
      0
      • C Christian Graus

        Sounds like you want to build a web service. Christian Graus - Microsoft MVP - C++

        M Offline
        M Offline
        methodincharge
        wrote on last edited by
        #3

        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?

        C 1 Reply Last reply
        0
        • M methodincharge

          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?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          AFAIK, a web server responds to requests, and that's it. What are you trying to do, exactly ? Christian Graus - Microsoft MVP - C++

          M 1 Reply Last reply
          0
          • C Christian Graus

            AFAIK, a web server responds to requests, and that's it. What are you trying to do, exactly ? Christian Graus - Microsoft MVP - C++

            M Offline
            M Offline
            methodincharge
            wrote on last edited by
            #5

            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.

            C 1 Reply Last reply
            0
            • M methodincharge

              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.

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              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++

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups