Auto-Launching Headless Clients

Linux Desktop Apps

Auto-Launching Headless Clients

Postby dpharaoh » 2013-01-17 21:21

With the introduction of the new Headless Client type build, we have a lot more flexibility to run server logic than ever before. I'd like to examine launching headless clients as needed, for example to run server logic on instances of a game.

Right now we need to launch these manually. Ideally we'd be able to launch them from another job and pass in some parameters which tell the new process which area/session it needs to load up, or otherwise how to configure itself.

We don't have the ability that I can see to launch new programs/processes from within Shiva without a plugin, and plugins aren't available yet on Linux headless clients.

I was thinking at this point I'd need a separately written non-Shiva process which periodically polls a database to look for a record which indicates that a new headless client is needed. When it is found, it could then launch the new headless client process in the background. When the new headless client is launched, it can examine the database and grab the most recent configuration data, and then pop that data off the list.

Any other methods that you guys can think of?
dpharaoh
Platinum Boarder
Platinum Boarder
 
Posts: 1526
Joined: 2009-01-20 03:43
Location: New Bedford, MA

Re: Auto-Launching Headless Clients

Postby Maydayz » 2013-01-22 21:52

Hi, sorry at the moment I can not provide you a completely solution.
Maybe in some days/weeks.

But here the main idea:
-running a php script (or perl) via a cronjob (maybe each 10seconds or every minute)
-php script checking database
-if a new client is needed the php script runs a sh script that starts a new headless client
Maydayz
Expert Boarder
Expert Boarder
 
Posts: 108
Joined: 2010-03-07 17:02
Location: Germany

Re: Auto-Launching Headless Clients

Postby dpharaoh » 2013-01-22 21:56

Thanks for the thoughts. At this point I found out we *can* launch apps from within Shiva, so I'm monitoring a DB for changes with a monitoring app, then launching a new headless client. The headless client checks the database for its configuration values.
dpharaoh
Platinum Boarder
Platinum Boarder
 
Posts: 1526
Joined: 2009-01-20 03:43
Location: New Bedford, MA

Re: Auto-Launching Headless Clients

Postby Maydayz » 2013-01-22 23:01

Can you tell me how you launch the extra apps?
Maydayz
Expert Boarder
Expert Boarder
 
Posts: 108
Joined: 2010-03-07 17:02
Location: Germany

Re: Auto-Launching Headless Clients

Postby dpharaoh » 2013-01-22 23:13

dpharaoh
Platinum Boarder
Platinum Boarder
 
Posts: 1526
Joined: 2009-01-20 03:43
Location: New Bedford, MA

Re: Auto-Launching Headless Clients

Postby Maydayz » 2013-01-22 23:17

ah, you launch the shell script directly from shiva, interesting idea :)
Maydayz
Expert Boarder
Expert Boarder
 
Posts: 108
Joined: 2010-03-07 17:02
Location: Germany

Re: Auto-Launching Headless Clients

Postby dpharaoh » 2013-01-22 23:39

I didn't know we could, but Stonetrip support let me know.
If you use file:// it launches an app and not a URL :) Works fine in Linux
dpharaoh
Platinum Boarder
Platinum Boarder
 
Posts: 1526
Joined: 2009-01-20 03:43
Location: New Bedford, MA


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron