Iguana Recipes

Iguana Apps are the focus of the masters integration classes we’ve been running. I’m a big believer in hands-on learning. The last thing I want is for people to feel bored while a lecturer reads through the same material we have online already.

We want you to get hands dirty doing real work with these apps, and we want you to leave the class with the skills to modify them to solve real problems for your organization. So we’re getting the class to divide into small groups of two to three people. (Or a group of one, if you prefer. We won’t force you to work in a team if you don’t want to!).

You will have to pick what problems you want to solve beforehand. The day will be spent hacking Lua and Javascript to make it happen. You’ll get a lot of help: all the lattes (we have an great little Jura machine) and food you want. Plus, a bunch of people from the core Iguana development team and I will be right in there with you, helping get it done.

Have some fun with it. The work can be done in our meeting room, or you’re welcome to spread out into other parts of our office, like the sunshine corner. The emphasis for the day will be on getting things working rather than on making beautiful code. If people come up with good ideas that belong in the public collection of apps, we’ll merge them in the week after training. We’ll clean up and refine the code then, which will provide another good opportunity to see best practices in action.

Now, your day job may not necessarily leave you full of creative energy,  so we’ve got some ideas for hacks that might interest you, along with suggestions for and how they might be done. If you like something here and want to run with it, by all means go ahead.

If you have ideas of your own that you really want to run with then by all means speak up, and we’ll help you do those. The main thing is to pick something that really interests you and that you’ll have fun working on.

Here’s one potential sequence of fun useful hacks to the channel manager:

  1. Get it to have a configuration file which specifies the location of the directory to export or import from.  That would make it possible to upgrade it without needing to edit the code each time. There is already the start of an implementation of that.  The manager just needs to check for the existence of that configuration file and create it if it doesn’t exist.  What would be really cool would be to be able to support several repository directories.
  2. It’s pain having to download that zip of a GitHub repository manually – wouldn’t it be cool if you could just click on a button and have it downloaded automatically? That’s easy since Iguana already has simple APIs to download resources via HTTP and inbuilt support for inflating zip archives.
  3. Upgrading the channel manager is a pain. Now you have all that cool stuff from 1 and 2 – wouldn’t it be neat to have a button in the channel manager to upgrade itself? It’s a little tricky but quite doable. You could start by using this module to add a new channel with a different name. Then you’d need to be a little creative on the Javascript side, making HTTP calls to stop the original Channel Manager channel, rename the new one, start it, and then, once it’s all working, delete the old channel manager.

That’s one set of changes. Other ideas separate from those are:

  1. Hack the channel manager so that instead of adding a channel to one Iguana instance it can push a channel definition into two Iguana instances (i.e. active/active HA configuration).
  2. It’s would be nice to know what files are changed with both importing and exporting translator instances.  The information is there, it is just a matter of displaying it.  If you wanted to get really fancy you could even splice in this code which could be used to tell you which Channels would impacted by a change to a shared module.
  3. The screen showing the list of channels you can import is pretty rough looking – you could have some fun swapping in a dashboard control that could have the names of the channels and their descriptions – and allow you to filter them.

Now let’s move on to the Global Dashboard.  Here some ideas:

  1. There is no way to delete a server from the watch list without getting under the hood and playing with the SQLlite database underneath. It would be good to add a button to do that.
  2. It’s nice to be able to see the status of the remote Iguana instances, but would you like to be able to do a few basic things like stop and start a channel? It’s quite doable; Art’s already done it with an iPhone app he whipped together for one of his Art-ful integrations. We can show you how.
  3. Want to get really fancy? How about making it possible to upgrade the agent code on the remote servers automatically? Quite doable.
  4. How about changing the configuration of a channel or upgrading it remotely? Also quite doable.
  5. How about powering some email alerts of the data?

Now what about regression testing? The example we have just does regression testing on filter style translators. But you know your interfaces. Would you like to extend that so it can test out your endpoints? Do you feed into a database or a web service? There are different ways to test those pieces. We can help you make them happen.

One of neat things about the regression test application is the spinner library.  It allows you to spin up a translator instance on a local or remote Iguana server, populate it with code and call it. You do all sorts of neat things with that. For example, if you have 100,000 test messages you want to test with, distribute them across a server farm and run the test in a very short time.

Leave A Comment?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.