[interfacekit] Re: BSession(NG)
- From: Adi Oanca <adioanca@xxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Sun, 09 May 2004 16:16:29 +0300
Hello people!
Ingo Weinhold wrote:
On 2004-05-08 at 02:34:45 [+0200], Marcus Overhagen wrote:
Pahtz <pahtz@xxxxxxxxxxxx> wrote:
If you don't split the message you don't need the packetlist BList
structure, and the code is much
simpler because you don't need to re-assemble the message or use multiple
buffers.
If you chose a good static buffer size, that has enough space for the
largest message,
you don't ever need to split/reassemble messages, or resize buffers.
Example:
Maximum message size it 600 byte.
Lets make a static buffer that is 2048 (can hold three of the large
messages, or many smaller ones)
Whenever you want to write a message to the buffer, first check if there is
enogh space left.
A) if there is, append the message.
B )If there is not, flush the buffer (which might not be completely filled,
but even in the large message
case it will already be filled 2/3, see above) by doing a write_port.
server can receive using read_port
into a fixed buffer. write the message to the (now empty) buffer..
Isn't the problem, that there is no maximum message size, since some messages
contain arguments of variable size (like BRegions)? So one either has to be
prepared to split messages or to resize the send/receive buffers.
I personally would favor a strategy employing a fixed transfer buffer and
passing larger messages via areas. Using the new syscall to transfer area
ownership, we will probably introduce, this should be pretty cheap.
An AreaLink class is already in our repository, still I don't know if
it works. But this too has the same problem as port communication - a
maximum size, and we again have to split messages.
Now, regarding the way app_server communicates with the client side...
aren't areas the fastest method? If then, why are we using ports? :-|
Adi.
---------------------------------------------------------------
Lucram pentru tine. Analizam. Cautam zilnic.
Alegem ceea ce te intereseaza. Te anuntam.
http://www.REDUCERI.ro/
- Follow-Ups:
- [interfacekit] Re: BSession(NG)
- From: Ingo Weinhold
- References:
- [interfacekit] Re: BSession(NG)
- From: Marcus Overhagen
- [interfacekit] Re: BSession(NG)
- From: Ingo Weinhold
Other related posts:
- » [interfacekit] BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
- » [interfacekit] Re: BSession(NG)
On 2004-05-08 at 02:34:45 [+0200], Marcus Overhagen wrote:
Pahtz <pahtz@xxxxxxxxxxxx> wrote:
If you don't split the message you don't need the packetlist BList structure, and the code is much
simpler because you don't need to re-assemble the message or use multiple buffers.
If you chose a good static buffer size, that has enough space for the largest message,
you don't ever need to split/reassemble messages, or resize buffers.
Example:
Maximum message size it 600 byte.
Lets make a static buffer that is 2048 (can hold three of the large messages, or many smaller ones)
Whenever you want to write a message to the buffer, first check if there is enogh space left.
A) if there is, append the message.
B )If there is not, flush the buffer (which might not be completely filled, but even in the large message
case it will already be filled 2/3, see above) by doing a write_port. server can receive using read_port
into a fixed buffer. write the message to the (now empty) buffer..
Isn't the problem, that there is no maximum message size, since some messages contain arguments of variable size (like BRegions)? So one either has to be prepared to split messages or to resize the send/receive buffers.
I personally would favor a strategy employing a fixed transfer buffer and passing larger messages via areas. Using the new syscall to transfer area ownership, we will probably introduce, this should be pretty cheap.
- [interfacekit] Re: BSession(NG)
- From: Ingo Weinhold
- [interfacekit] Re: BSession(NG)
- From: Marcus Overhagen
- [interfacekit] Re: BSession(NG)
- From: Ingo Weinhold