Lance Levsen wrote:
> Aiyeee! That's brilliant! Sigh. Rewrite time. :) I agree on the
> lameness, that's why I thought moving to threads would help, but it's a
> façade, making an I/O intensive operation more efficient but not more
> elegant.
You could go a step further and have your RSS puller threads be behind
squid, so you wouldn't have to rewrite at all, since squid's
smart'n'stuff about doing head.
Adding another layer of abstraction is almost never hurtful ;)
(Note: it is in Win32 -- I should not have 27 parameters of NULL
everytime I make 1 call!).
> I'm much more worried about thread a writing to the db in row y and
> thread b writing to the db in row y then I am with a bungled read.
You mean an update to the same row twice? If you're doing only inserts,
this will never be an issue since PGSQL has interal locking to protect
that. If you're trying to have 2 threads execute the same update
statement at the same time, that could be an issue. I haven't looked at
the docs to see what that'd be, but I bet you can more easily simply not
use it that way.
> Having said all that, just checking the time on a head request is way
> more elegant. I may not even bother w/ threads . . . at least until I
> get that part working. :)
Received on Fri May 26 20:36:48 2006
This archive was generated by hypermail 2.1.8 : Fri Sep 08 2006 - 23:26:38 CST