Loading ...
Sorry, an error occurred while loading the content.

Re: beginner question.. global data with http::daemon

Expand Messages
  • tgregory.rm
    Since there doesn t seem to be a multithreaded server available, and fork emulation is iffy in perl currently, I ve decided to investigate using win32::process
    Message 1 of 4 , Nov 11, 2002
    • 0 Attachment
      Since there doesn't seem to be a multithreaded server available, and
      fork emulation is iffy in perl currently, I've decided to investigate
      using win32::process to make a multiprocess server.

      An initial problem seems to be passing the socket connection from the
      old process to the new process. Has anyone had success with this approach?

      Thanks,
      Trey


      --- In soaplite@y..., "tgregory.rm" <tgregory@r...> wrote:
      > Paul,
      >
      > Thanks for the fast response.
      >
      > I scoped a variable globally in my demo package, and that worked
      > perfectly. I noticed in the thread you pointed me to that you note
      > that this approach would not work on a forking server. This leads me
      > to 2 other questions:
      >
      > 1) On win32 (AS 633,v5.6.1), it seems to me that the default behaviour
      > for the HTTP::Daemon server is to handle requests one at a time. There
      > is no multithreading or multiprocessing. Is this correct?
      >
      > (As an aside, I did attempt to get ForkAfterProcessing working, but it
      > would hang after handling one request. I assumed this had something to
      > do with fork emulation)
      >
      > 2) Is there a win32 multithreaded server available? Or a higher
      > performance server which would not make my data persistence issues
      > more complicated?
      >
      >
      > Thanks again,
      > Trey
      >
      >
      >
      >
      >
      > --- In soaplite@y..., Paul Kulchenko <paulclinger@y...> wrote:
      > > Hi Trey,
      > >
      > > > I would like to implement a cache (as a hash) that would be
      > > > accessible
      > > > to all instantiations of a given type of object. They would all
      > > Shouldn't be difficult. Take a look at this thread:
      > > http://groups.yahoo.com/group/soaplite/message/359
      > >
      > > The key is singleton or file-scoped 'my $foo;'. Let me know if you
      > > need more concrete example.
      > >
      > > Best wishes, Paul.
      > >
      > > --- "tgregory.rm" <tgregory@r...> wrote:
      > > > Hi all,
      > > >
      > > > I just started using Soap::Lite and have the examples in the
      > > > distribution up and running. I searched the archive for an answer
      > > > to
      > > > my question, but didn't have any luck, so here goes.
      > > >
      > > > I would like to implement a cache (as a hash) that would be
      > > > accessible
      > > > to all instantiations of a given type of object. They would all
      > > > need
      > > > read/write access to the cache, as well see changes made by other
      > > > instantiations. Basically, I just want a global cache that all
      > > > instances can access. (I'm assuming there could be problems with
      > > > concurrent access, but I figure that is my next problem)
      > > >
      > > > How would one go about doing this using http::daemon?
      > > >
      > > > Thanks for any help.
      > > >
      > > > Trey
      > > >
      > > >
      > > > ------------------------ Yahoo! Groups Sponsor
      > > >
      > > > To unsubscribe from this group, send an email to:
      > > > soaplite-unsubscribe@y...
      > > >
      > > >
      > > >
      > > > Your use of Yahoo! Groups is subject to
      > > > http://docs.yahoo.com/info/terms/
      > > >
      > > >
      > >
      > >
      > > __________________________________________________
      > > Do you Yahoo!?
      > > HotJobs - Search new jobs daily now
      > > http://hotjobs.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.