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. COM
  4. Please help on sending text data efficiently

Please help on sending text data efficiently

Scheduled Pinned Locked Moved COM
questionhelpsysadmin
4 Posts 3 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.
  • F Offline
    F Offline
    FearlessBurner
    wrote on last edited by
    #1

    I have been thinking about this problem for days, and am unsure on the best way to proceed as I dont have enough experience. My problem is that I have a IDispatch server component sitting on a remote computer, running with DCOM, to which I need to send a very large (from 30KB upwards to about 2MB) string. Currently I have implemented this by calling my server method HRESULT ReceiveText( BSTR ) but I am concerned that this is not particularly efficient. Alternatively I can save the text to a networked shared file which the remote server could read, but that not be a good solution for when the remote server is too remote. However the advantage of using a file is that I can zip it, which reduces the text to approx 6-8% in size. My question is therefore what is the best way of sending/receiving text using DCOM and does anyone know of any components that I could use to zip/unzip the text before/after sending? I will be grateful for any comments and suggestions. Thank you.

    V S F 3 Replies Last reply
    0
    • F FearlessBurner

      I have been thinking about this problem for days, and am unsure on the best way to proceed as I dont have enough experience. My problem is that I have a IDispatch server component sitting on a remote computer, running with DCOM, to which I need to send a very large (from 30KB upwards to about 2MB) string. Currently I have implemented this by calling my server method HRESULT ReceiveText( BSTR ) but I am concerned that this is not particularly efficient. Alternatively I can save the text to a networked shared file which the remote server could read, but that not be a good solution for when the remote server is too remote. However the advantage of using a file is that I can zip it, which reduces the text to approx 6-8% in size. My question is therefore what is the best way of sending/receiving text using DCOM and does anyone know of any components that I could use to zip/unzip the text before/after sending? I will be grateful for any comments and suggestions. Thank you.

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      In terms of archiving, check out CodeProject code section. As for data sharing, one solution is TCP/IP. Kuphryn

      1 Reply Last reply
      0
      • F FearlessBurner

        I have been thinking about this problem for days, and am unsure on the best way to proceed as I dont have enough experience. My problem is that I have a IDispatch server component sitting on a remote computer, running with DCOM, to which I need to send a very large (from 30KB upwards to about 2MB) string. Currently I have implemented this by calling my server method HRESULT ReceiveText( BSTR ) but I am concerned that this is not particularly efficient. Alternatively I can save the text to a networked shared file which the remote server could read, but that not be a good solution for when the remote server is too remote. However the advantage of using a file is that I can zip it, which reduces the text to approx 6-8% in size. My question is therefore what is the best way of sending/receiving text using DCOM and does anyone know of any components that I could use to zip/unzip the text before/after sending? I will be grateful for any comments and suggestions. Thank you.

        S Offline
        S Offline
        Steve S
        wrote on last edited by
        #3

        If you have to use IDispatch, then you could take advantage of the fact that a BSTR isn't necessarily a string, but is a byte counted block of words. That would let you use zlib to compress the data in the sender, and to uncompress it in the receiver. Steve S

        1 Reply Last reply
        0
        • F FearlessBurner

          I have been thinking about this problem for days, and am unsure on the best way to proceed as I dont have enough experience. My problem is that I have a IDispatch server component sitting on a remote computer, running with DCOM, to which I need to send a very large (from 30KB upwards to about 2MB) string. Currently I have implemented this by calling my server method HRESULT ReceiveText( BSTR ) but I am concerned that this is not particularly efficient. Alternatively I can save the text to a networked shared file which the remote server could read, but that not be a good solution for when the remote server is too remote. However the advantage of using a file is that I can zip it, which reduces the text to approx 6-8% in size. My question is therefore what is the best way of sending/receiving text using DCOM and does anyone know of any components that I could use to zip/unzip the text before/after sending? I will be grateful for any comments and suggestions. Thank you.

          F Offline
          F Offline
          FearlessBurner
          wrote on last edited by
          #4

          Thanks to Kuphryn and Steve for both the replys. I intend to zip/unzip the string as suggested in order to save transmission time, and am incorporating some of the info from some of the helpful articles in CodeProject. I would also like to consider TCP/IP as a solution but that will be some steep learning so I will delay that for now. Thanks again.

          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