Demoed: Processing Data with the MuleSoft’s Eclipse Tool Suite


Last Tuesday night’s  demonstration of the MuleSoft’s Tool Suite at the Vancouver Eclipse Demo Camp went well. I almost got Nerf-gunned for a (slight) overtime but the organizers’ mercifulness has allowed me reach the end of the demo with a running sample 🙂 For those who weren’t there, here is a summary of my presentation.

The challenge I’ve set to myself for this demonstration was the following: let’s figure out what’s the total length of roadworks currently happening in the city of Vancouver. Think of it as a reality check for your tax dollars at work!

Because Vancouver exposes plenty of its data on the web, this was really just a matter of pulling the right data source and transforming it to the desired output. Read on to find how I achieved this using Mule Data Integrator and Mule IDE

The following image is a graphical representation of the roadworks in Vancouver, where the work in process is represented as orange lines on top of the affected streets:

Vancouver roadworks

The data used to build this view is available on-line as a geo-tagged atom feed: each entry in the feed describes a roadwork, whether active or planned, and each roadwork bears a geolocation tag that is either a single pair of coordinates (a point) or a list thereof (forming a multi-segment line).

To handle the geolocation information, I have created a pair of POJOs that can represent a list of multi-segment lines out of their coordinates. These POJOs are also able to compute the total distance represented by the different geographical segments.

Here is the atom_to_java map I have created thanks to the Mule Data Integrator (click on the image to see it full size):


Notice that I have added a filter to the output loop. I am indeed only interested by mapping the atom feed’s entries that:

  • Represent roadwork in process, which is done by selecting the value found in the term attribute of the first (and only) category element of the entry and checking it is equal to ‘In Process’.
  • Has a georss:line element, as some entries only have a georss:point element (not very useful for calculating a distance!).

Using Mule IDE, I have created a new Mule project and a new configuration file, which is shown here:

Could not embed GitHub Gist 459280: Bad credentials. The API can't be accessed using username/password authentication. Please create a personal access token to access this endpoint:

The configuration itself is a simple HTTP bridge between a local server hosted on Mule and the live atom feed from The important part of the work happens in the response transformers stack, where the feed gets turned into POJOs by a Mule Data Integrator‘s transformer configured with the above map.

With this configuration running in Eclipse, here is what a call on the local server looks like:

Could not embed GitHub Gist 459290: Bad credentials. The API can't be accessed using username/password authentication. Please create a personal access token to access this endpoint:

Yep, that’s 32 kilometers of roadworks. Aren’t you glad public transit exists?

If you have Mule Data Integrator and Mule IDE installed on your machine, then grab the roadworks demo projects and have fun!

We'd love to hear your opinion on this post

2 Responses to “Demoed: Processing Data with the MuleSoft’s Eclipse Tool Suite”

  1. I tried the example but get all sorts of erros when opening the projects in MDI.
    Like when opening a structure;
    failed to open import object of type com.oaklandsw.transform.struc.cid version 18 import and version 17 is understood by software.
    Am i missing an MDI update?

  2. FYI. The MDI version I’m running is