It was Thursday, February 27, 2003 when Yannick Warnier took the soap box, saying: : Le jeu 27/02/2003 ? 15:11, Casey West a ?crit : : > It was Thursday, February 27, 2003 when Yannick Warnier took the soap box, saying: : > : Hi, : > : : > : I'm searching for some perl module to share a file on a network with : > : some concurent access management. : > : : > : So, the file should be on a system, be readable by the module (we : > : suppose it is) and then the module should read what's in the file (parse : > : it, but that's optional) and allow different perl scripts to access the : > : content of the image of the file. : > : > I'm afraid you're being way too ambiguous in your request. It kind of : > sounds like "I want this thing to get this other thing and allow those : > things to access part or all of the first thing." : > : > There are lots of parsing modules. They usually corrispond to a : > particular format such as XML, PDF, POD, etc. What you are : > describing, and the level of vagueness you use tells me that you : > probably have your own format, that's fine, but it will probably : > require a custom solution. : : Ok, so I'll try to be more precise. The problem is not the parsing, the : problem is ditributing a file so as it can be accessible from different : perl scripts. : : So, let's say, I have a file on one machine, on which my "distributing : deamon" is running. Now there is a cgi perl script on another machine : who wants to access that file (actually, there are more than one, and : that's what I need some distributing code to do it). : The file is a configuration file and the cgi script is a configuration : interface, in this case, but we could also have some other deamons : wanting to "actualize" their parameters by reading the file, or the : object being distributed.
Ok, now we're reaching full understanding. You need to look at a few protocols, such as XML-RPC, and SOAP. They would run from an Apache server, and if that's ok, the easiest way to achieve this might be using XML::RSS, nice and light. Now, if you need to be even lighter, you might consider using POE. Using POE, it's fairly simple to setup a daemon. There are components for TCP servers, HTTP servers, even a SOAP server. The TCP server is, of course, the lightest. You can get more information fromt he modules themselves, but ther is a cookbook at poe.perl.org that might help more. : So what I need is some code to read the file (not parse it, I don't care : for that now) and distribute a "in-memory" object version OR directly : the file, with appropriate locking so the many scripts/daemons/programs : accessing it don't do bad things. : : Yeah, sorry for the undetailed question, and thanks for the kind answer : (and the one which could be following), Thanks for giving me more information on this, I hope it goes well. I like helping. :-) Casey West -- Shooting yourself in the foot with HURD You'll be able to shoot yourself in the foot Real Soon Now. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]