[snmp] SNMP Set Response is lost / packet dropped by Westhawk API
Birgit Arkesteijn
birgit at westhawk.co.uk
Thu Jun 5 12:09:40 BST 2008
Hi Josh,
On 04/06/08 19:35, Josh Bers wrote:
> Birgit,
>
> In trying to understand why the stack might drop some responses, there are a
> few questions:
>
> 1. Are set requests retried the same way as get requests? Namely if a
> response is not received they are resent? (this might be risky for setting
> things that should only be set once...)
Yes, they are. The context that handles the retries is unaware of the
content that it sends.
> 2. If an observer for receiving PDU responses does a lot of processing, what
> happens to the receiver thread that is listening on the inbound socket?
>
> If answer to above is that the receiver thread and the thread that calls
> update on the observer are the same then there may be a problem of dropping
> UDP packets...
> Since there are no guarantees on UDP and there is a finite queue that the OS
> has for UDP sockets (I think 5 deep is the default), then the TCP/IP in the
> OS may well just drop response PDU's when there are a lot of them and the
> Observers are causing calls to receivePacket to be spaced out.
The receiver thread and the thread that calls update on the observer are
the same.
This does mean indeed that packets might be dropped if they come in
bigger numbers and/or the processing of the response takes longer.
BTW, in contrast, the ListeningContext fires a thread for every incoming
message.
> 3. If the answer to the above is that there is a separate thread to listen
> for response on the socket and a separate one that dispatches to observers,
> then there may be a queuing problem. How does the stack queue up these
> received packets?
This is not the case.
A queuing system (FIFO) might be an option to add to the stack, but it
does mean doubling the number of threads, which will cause other problems.
> Josh
It's a bit of a balancing act, but at least with the current solution
the user (programming the stack) has the option to add additional
threads, whereas with a queueing system, they are forced upon her/him.
Cheers, Birgit
--
-- Birgit Arkesteijn, birgit at westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
More information about the snmp
mailing list