Subject | Re: [ib-support] Serialization? |
---|---|
Author | Martijn Tonies |
Post date | 2002-07-05T15:20:10Z |
Hi,
or PRIMARY KEY constraint.
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> as I stated before, I'm writing my graduation thesis.Transactions and deadlocks... If the columns aren't too long, a UNIQUE
> Part of my thesis requires I realize a kind of "crawler", that is a
> "robot" that discover and retrieve documents from a network. This
> robot keeps the URL that finds in the documents in a Firebird DB.
>
> Due to netiquette policy, I want that if one thread is downloading a
> document from a host, no other thread should download documents from
> the same host.
>
> HOST is a separate table, so I can "mark" a row as "downloading"
> when assigned to a task and then mark it as "free" when the download
> process ends.
>
> Now the problem: let's imagine that two threads request a URL at the
> same time.
> 1. How can I avoid they get the same URL?
> 2. How can I avoid they get two different URLs lying on the same
> HOST?
or PRIMARY KEY constraint.
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."