Ask a Question related to UNIX Programming, Design and Development.
-
pmkasodh@unity.ncsu.edu #1
efficiently transferring data between network layers
Hi everyone,
What would be an efficient way to transfer data between 2
network layers ?.As I understand simple copying is grossly
inefficient. Also if i try to pass data by just passing pointer
between the layers then according to me we will encounter the
classical producer-consumer problem.
Any insights into techniques that can be used would be helpful
thanks
palash
pmkasodh@unity.ncsu.edu Guest
-
Form component not transferring data to CF
Hi everyone...hoping you guys can give me some feedback on the following. I'm stuck. I have a form that I can get to work using text input fields,... -
transferring data from 1 domain(url) to another(url withflash)
Hi There Have client who has website (which they are hosting themselves), which also contains a secure members only area. I.e you logon to this... -
Efficiently store an internal lookup table?
I need my app to be able to go to an internal lookup table to look up a couple of values (decimal, 2) based upon a third value (integer). This... -
Efficiently & safely (re)filling array from $_POST
I'm using a single script to generate a table with <input>s in each row. I fill the array with initial values, then write it out to the table and... -
Compare 2 tables efficiently.
Hi, I have received the challenge to compare a table and a view. What I need to do is to check on certain columns if all entries in view A are in... -
David Schwartz #2
Re: efficiently transferring data between network layers
<pmkasodh@unity.ncsu.edu> wrote in message
news:53df97e5.0307201138.6d9710b8@posting.google.c om...
I don't follow. Why would you have more of a producer-consumer problem> What would be an efficient way to transfer data between 2
> network layers ?.As I understand simple copying is grossly
> inefficient. Also if i try to pass data by just passing pointer
> between the layers then according to me we will encounter the
> classical producer-consumer problem.
if you pass a pointer than if you copy?
DS
David Schwartz Guest
-
Michael B Allen #3
Re: efficiently transferring data between network layers
On Sun, 20 Jul 2003 15:38:57 -0400, pmkasodh wrote:
You should be able to just decode and encode messages in the buffer used> Hi everyone,
> What would be an efficient way to transfer data between 2
> network layers ?.As I understand simple copying is grossly inefficient.
> Also if i try to pass data by just passing pointer between the layers
> then according to me we will encounter the classical producer-consumer
> problem.
>
> Any insights into techniques that can be used would be helpful
to read from or write to the socket. Coping is not necessary. I suppose
this might be what you consider "passing pointers" but I don't see how
this creates a "producer-consumer problem". If your code completely
decodes the message into an appropriate struct the buffer can be reused
to decode the next message. Or you could have a pool of buffers so that
new ones are only created when needed and can be reused.
Here is another related post about the technique I use for encoding and
decoding file formats and network messages.
[url]http://groups.google.com/groups?selm=20021117.034856.502278611.10307%40eski mo.com[/url]
The library mentioned is here:
[url]http://www.ioplex.com/~miallen/encdec/[/url]
Also this lib has a "pool" ADT:
[url]http://www.ioplex.com/~miallen/libmba/[/url]
Mike
Michael B Allen Guest



Reply With Quote

