Gearman<>Indigo Bridge Plugin

Posted on
Thu May 01, 2014 9:37 pm
matlock offline
Posts: 41
Joined: Apr 17, 2009
Location: Atlanta Georgia

Gearman<>Indigo Bridge Plugin

Anyone interested in a Gearman <> Indigo bridge plugin? I created a specialized "announcer" system that utilizes a few external programs, and I was finding that calling them from the Indigo process itself was causing problems -- namely that Python 2.5 was missing some things I needed, and it occasionally made the Indigo process freeze from time to time (SecuritySpy running on my Indigo box, a Mac Mini with a dual-core i5 with 16GB RAM, manages to use a lot of CPU... so being able to 'offload' to other systems (and processes) can be helpful).

In a nutshell, Gearman is an external job queue server.

I use Gearman for other Unix projects, so I thought it might be an interesting way for Indigo to interface with external processes, even on other machines, without Indigo having to do very much. Basically what my system does when it needs to talk (and play sounds, etc), is throws a job request into the Gearman queue. A worker process on another machine is subscribed to the queue on the Gearman server; it sees the request, executes a script, then returns the return value to the Gearman server. Indigo then sees the returned data, and pulls it in. This completely offloads work from Indigo, and jobs execute almost instantly, no matter what the load is on my Indigo box.

I've got this all in a series of scripts now; not plugin-ized, so it's not really very user friendly.

I was curious if anyone else out there might find this useful in any sort of way. If so, I'll try my hand at making my first real Indigo plugin around my scripts... :)

Posted on
Fri May 02, 2014 10:07 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Gearman<>Indigo Bridge Plugin

Interesting. I think it would be a cool plugin - I can think of several things it could be used for.

One thing comes to mind immediately: if you can figure out how to get a gearman client to send/receive apple events (AppleScripts) then it would be one way to distribute things like Airfoil control across the network. Even though AppleScript has built-in remote abilities, there are significant issues, not the least of which is that network timeouts are long and blocking to the script execution if the remote app isn't running or the mac is unreachable. Another issue is the growing "security" of Mac OS X and how it negatively effects remote scripting (and, unfortunately, scripting in general).

This, of course, would require a lot more work than just a plugin that communicates with a gearman server, but that would be a start. I could envision a special gearman client (and I suppose it could also manage the server on the Mac as well), probably built around libgearman, that was a Mac application that would allow you to specify scripts to handle the various events.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 42 guests