[Gllug] Imposing a delay in a pipeline

Lesley Binks lesleyb at pgcroft.net
Tue Apr 13 19:32:28 UTC 2010


On Tue, Apr 13, 2010 at 06:30:13PM +0100, - Tethys wrote:
> On Tue, Apr 13, 2010 at 6:14 PM, Richard Jones <rich at annexia.org> wrote:
> 
> > This is more complex than it seems.
> >
> > I had a go at coding this up in Perl using nonblocking reads,
> > select(2), and timestamping each message as it comes in.  Well I got
> > bored and gave up :-(  But you'll need all of that, and non-blocking
> > writes, and an expandable buffer of messages (what if the write side
> > blocks?)
> 
> Yes, I know, that's why I was asking if anyone else had already done
> it. If I have to write it myself, it'll be in C.
> 
I have coded similar in C about 2 years ago so the specifics might be off a bit
but you need something to listen for the messages kicking off something to 
put the messages on a queue and then something else to take them off again.
If your data is required to be sequential you might have a lot of queueing 
waiting to add to the queue sequentially in the first place.  And you
might want to mutex across distinct processes - possibly a compiler 
characteristic.  Or not - as I said it was two years ago.

> > Since this is for delaying trades, isn't there a legal requirement to
> > get this right?  Maybe look at a real messaging system ...
> 
> Fortunately, no. This isn't something the FSA (currently) regulates.
> 
> Tet
> 
> -- 
> “It seems intuitively obvious to me, which means that it might be
> wrong.” -- Chris Torek
> -- 
> Gllug mailing list  -  Gllug at gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list