Concurency

Guillaume Filion <[email protected]> Sun, 29 Jun 2003 15:37:45 -0400
Newsgroups gmane.network.ubh
Message-ID <[email protected]>
Hi all,

I have a few ideas about concurrency and ubh:
1) Is is possible to run ubhdb while ubh is downloading articles and 
not corrupt the database? If so it would be possible to run it as a 
cron job a couple times a day, isn't it?

2) I am in the process of making a minimalistic PHP version of 
ubhcatalog. Here's a summary of how it works: it lists all of the 
articles in a newsgroup in a web browser, then the user clicks on the 
article to download, the php script launchs ubh in batch mode for 
this article and then redirects the browser to the downloaded file in 
the results directory. It's very simple (less than 100 lines of 
code), but it works (surprisingly) well.

One thing that does not work well with this PHP script is that I'm 
not able to download several files at the same time. I'd like to be 
able to specify a maximum number of connection for each server (in 
the servers table) and having the possibility of calling an arbitrary 
number of instances of ubh simultaneously. I also would like for ubh 
to keep its connections to the server open, so that I don't have to 
wait for a new connection when I download another file.

Here's how I see how it would work: ubh would be splitted into two 
programs, a back-end that I'll call ubhback and a front-end that I'll 
call ubhfront.

ubhback would be the connection/download manager. It would receive 
requests for articles to download and dispatch them downloading 
entities (childs). It would stay opened as long a we want to, so it 
could be considered as a daemon. It could open connections to the 
server only when there are requests in the queue.

ubhfront would have an interface similar to ubh but it's inner 
working would be different. It would mark articles to download in the 
database, wait for the requested download to be done, then decode 
them.

Right now, it is somewhat possible to do this by calling several 
instances of ubh but I have the feeling that my idea would be more 
flexible.

Ideas and comments are welcomed,
GFK's
-- 
Guillaume Filion
Logidac Tech., Beaumont, Québec, Canada - http://logidac.com/
PGP Key and more: http://guillaume.filion.org/

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Looking for the latest Free IT White Papers?
Visit SearchMobileComputing.com to access over 500 white papers.
Get instant access at SearchMobileComputing.com Today
http://us.click.yahoo.com/89UKOC/PLNGAA/fzPGAA/IHFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/