[Openmcl-devel] TIL that CCL's load function speaks HTTP

Max Rottenkolber max at mr.gy
Mon Jan 19 06:00:24 PST 2015


On Mon, 19 Jan 2015 14:24:19 +0100, Hans Hübner wrote:

> DEADLINE is the way to go, I think.

I have to disagree. Besides DEADLINE being seemingly unimplemented on 
most platforms, the nice way would be to use USOCKET's TIMEOUT (assuming 
SO_RCVTIMEO is sufficient) parameter and then be able to pass the open 
connection to Drakma to speak HTTP over it (I don't think Drakma can do 
that though). Why does Drakma need to hide the socket logic?

I still think the right way to do it currently is to go the hard way and 
implement a watchdog thread that kills off the request thread after a 
specified timeout. That way you have full control over the possibly 
blocking request thread and can specify a total "tolerance timeout". This 
could be implemented semi-safely in a portable way using BORDEAUX-THREADS.

The reason I root for this approach is that I *tried* most of the options 
discussed so far thinking that it only needs the right trick to get what 
I want, but long term testing has shown (me) that DRAKMA:HTTP-REQUEST 
*will* hang sometimes (indefinitely, I am guessing network partitioning). 
Even with CONNECTION-TIMEOUT provided. In a perfect world this would 
"simply work" but in practice this is a case where you want to be 
explicit about the fact that the request *will return* after a specified 
time. So rather brute force it than rely on a library to cover a hard to 
test case that really hurts your application when it fails.

I'm done trusting DRAKMA:HTTP-REQUEST to return at some point. ;)

Maybe when DEADLINE is implemented across most CL platforms I will give 
it another shot.




More information about the Openmcl-devel mailing list