Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: SOAP::Lite and Win32::Daemon

by one4k4 (Hermit)
on Feb 04, 2004 at 15:47 UTC ( [id://326506]=note: print w/replies, xml ) Need Help??


in reply to SOAP::Lite and Win32::Daemon

I'm currently working on similar code.. Instead of using Win32::Daemon, I just have a script that runs in a while loop. It's not the cleanest thing in the world, but I can have a "daemon" running and processing messages as necessary. I know that SOAP::Lite can be run as a daemon..
my $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalAddr => '207.000.000.000', LocalPort => 80) -> dispatch_to('_Whatever')
That processes under sigint properly. It's what I'm using. The package it dispatches to is internal. All it has is two subroutines. One for stuffing messages into a table. One for picking them out of an outgoing messages table. The "deamon" mentioned above does the work of running under the while loop and grabbing the messages out of the db. It's not much, but it's just my two cents. I hope I could offer at least a view of what somebody else is trying out.

Replies are listed 'Best First'.
Re: Re: SOAP::Lite and Win32::Daemon
by bobtfish (Scribe) on Feb 04, 2004 at 18:04 UTC
    The problem with that is that I need this script to start at boot time and run without user intervention / ability for user to kill it off..
      If you're running at least Windows 2000 Server, just go into scheduled tasks, and create one for this process. Set its run time to "At system startup" and don't allow it to interact with the console. Users won't see it unless they look at the process list, and it will run even when no one is logged in. That's how we run our Wiki script. Much easier than a service wrapper if you just need to get it running quickly.

      Of course a service is the right way to go if you want remote start/stop and stuff.

      --
      Spring: Forces, Coiled Again!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://326506]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-29 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found