[Spread-users] Multiple connections: how long between calls to SP_poll() ?

Ryan Caudy rcaudy at gmail.com
Fri Aug 31 00:37:41 EDT 2007


Spread doesn't have any sort of timeout regarding how long it will
hold messages before delivery.  "Delivery" basically means that Spread
has written the message to the client's socket.  If the buffer is
full, Spread will queue an additional number (1000, if I recall, but
it should be defined in one of the headers) before disconnecting the
client.

What this means is that you're probably better off using some sort of
I/O multiplexing, like John suggested.  If you don't, the ideal
timeout is really defined by your application's throughput and flow
control.

Cheers,
Ryan

On 8/30/07, matthew.garman at gmail.com <matthew.garman at gmail.com> wrote:
> On Thu, Aug 30, 2007 at 10:56:29AM -0400, John Robinson wrote:
> > Better wait a short time.
>
> How long is a "short time"?  :)
>
> > Or you can actually use the poll() (or select()) system call on
> > the collection of mboxes to wait until any of them has more for
> > you to process.  They behave like normal non-blocking fd's in this
> > respect.
> >
> > The event system packaged with spread can also help with this.
>
> That's probably the ideal solution, but for now we have an object
> wrapper around the spread interface that does not expose the mboxes.
> Of course there are still a lot of options, I'm just looking for the
> quickest and easiest!
>
> Thanks!
> Matt
>
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users
>




More information about the Spread-users mailing list