|Going Go: Running Go Programs in IronWorker|
William writes Going Go Programming which is a great resource for things Go related.
We're fans of the Go language (and Going Go). Not surprising, given we've been using Go in production for much of our backend for over two years (you can read about that here and here). We also run the GoSF meetup group which lets us connect with top Go developers in the city and around the world.
We can talk at length about IronWorker and its ability to run dynamic languages such as Ruby, Python, Java, Python, Node.js, or .NET as well as binaries and compiled languages like Go. But we do that a lot and so we'd like to pass the baton to William and share his thoughts.
|G+: William Kennedy|
Running Go Programs In IronWorker
[See the full blog post here]
The Test ProgramI have built a test application that we are going to run in IronWorker. To download the code and the IronWorker support files, run the following commands:
cd $HOME export GOPATH=$HOME/example go get github.com/goinggo/ironworker
This will copy, build and install the code into the example folder under $HOME. The program has been written to test a few things about the IronWorker Linux container environment. Let's review the code for the program first and test it locally.
For IronWorker to be really effective you want to build programs that perform a specific task. The program should be designed to be started on demand or on a schedule, run and then be terminated. You don't want to build programs that run for long periods of time. The test program runs for 60 seconds before it terminates.
There were two things I wanted to know about IronWorker that the program tests. First, I wanted to know how logging worked. Second, I wanted to know if the program would receive OS signals when I requested the running program to be killed.
[some code samples for testing Go tasks]
[amazing step-by-step instructions, log output, and screenshots]
[detailed description on IronWorker's remote build process]
ConclusionI just scratched the surface with how you can use IronWorker to run your applications. This is a really flexible environment with really no restrictions. You have access to download and install any packages you need, access to the local disk and integration to PaperTrail and a few other logging systems.
Though you don't need a Linux VM to use IronWorker, you may want to consider having one so you can stage and load your binary programs directly. Again, you have the flexibility to use IronWorker as you see fit.
I hope you try out the service. Use my application or build your own. Post a comment about your experience and anything new your learn. I plan on using IronWorker for two projects I am working on and expect only great things.
To say we're impressed with the detail and insights in this post is an understatement. Certainly worth taking a look at 1) if you're at all interested in using Go, 2) if you'd like to run lots of tasks concurrently in the cloud on an industrial-strength worker service, or 3) if you're a fan of technical posts.
To sign up for IronWorker, head to Iron.io and create a free account (it comes with a bunch of free hours per month.)
To get more information on IronWorker capabilities, check out our Dev Center.
To send a note of thanks to William Kennedy or comment on the post, head to his G+ page.