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