Eclipse.org has been down ; how can we help ?

Our webmasters are having a rough time, the downloads area is down because there were recent issues with mirrors. All my sympathy goes to them.

I think we can help. I filed 266380 today:

Would it be feasible that we make I-builds and N-builds, that are most of the
time only available on the Canada website, to be available as torrents ?

People would help each other downloading them and depend a bit less on the
server.

I myself would be happy to set a high ratio on such torrents.

I think we could have a script to create torrent files in the same way we have a script to push files to mirrors. I welcome your feedback, and I hope we can all help eclipse.org stay up soon.

Da Open Source Executive Strategy Summit

Wow, I received an email to RSVP to ECSS, the EclipseCon Strategy Summit.

The program consists of an analyst report, a pound of legal advice, two servings of feedback on open source strategies and a final panel.

The content looks good, there’s plenty of good and experienced speakers, it’s all well scheduled and planned.

Though, I tend to believe this kind of day would be better served by an unconference style.
I think it would really be thrilling for executives to come down that day, listen to an analyst keynote to get in the mood, and then grab a whiteboard and make their agenda for the day.

I believe that my CEO would be absolutely thrilled to participate to a meeting like that : get to know more people, more projects, coordinate efforts, and maybe even discuss open source strategy.

Of course you should take all this with a grain of salt. Last time I checked there was still written “Software Engineer” on my name tag.

IRC and newsgroups

I just had this discussion with Remy Suen:

rcjsuen: toulmean: It is certainly nice that newsgroups answers can be archived whereas IRC isn't.
toulmean: rcjsuen: well. We could archive the IRC discussions with echelog to some extent ?
rcjsuen: toulmean: In a way. I guess part of the issue is that newsgroups postings are generally better formulated than IRC chat logs.
toulmean: rcjsuen: well, yeah, but I prefer IRC because of the human touch.
rcjsuen: But well, it isn't something we can do anything about anyway.
toulmean: yeah. You know eventually we could add a command to KOS-MOS: remember last 5 exchanges with x, y, z
toulmean: and post those exchanges to the newsgroup
toulmean: rcjsuen: then KOS-MOS would send back the url to the message it posted
rcjsuen: I don't know about that.
toulmean: rcjsuen: so all the guys asking hard questions can ask them, then we push the questions to the newsgroup, so there is no overlap.
toulmean: rcjsuen: otherwise people ask once, two, thee times in different places. It's hard.
rcjsuen: Right.
toulmean: rcjsuen: just an idea, do what you want with it.
rcjsuen: toulmean: When I remember to (which I usually don't), I try to put the question in the FAQ when it's been asked a lot.
toulmean: rcjsuen: let's about it again later ? let's let it sink a bit.

What do you think ? A keeper ?

Posted in Eclipse. 1 Comment »

CDT on IRC ?

CDT, as in C Development Tools, is currently under represented on IRC, as in Internet Relay Chat.

We get a lot of questions about it on the #eclipse channel on Freenode. Some people complain about content assist not working, some have more specific C questions, and so far it sounds like we can’t help with them.

CDT committers, if you have some bandwidth left, please come down here, it’s all fun and community gathering.

If you don’t have time, I understand.

The BPMN modeler is hosted on github. Fork it today.

Oisin hinted he was into experimenting with git:

Perhaps someone could come up with a github mirror of one of the components and we could see how that works?

Come fork me on github! I’ll try to keep in sync with the current trunk, which should work as long as no svn switch happens.

One member of the STP PMC reacted to my call. I am still waiting for others to show themselves and share their wisdom.

Next in line - pushing Babel over to github. Let’s see if Denis, our trusty webmaster, likes it!

Letter to the STP PMC: Please express interest over a DVCS

I sent out an email to the STP PMC yesterday night:

Hi all,

STP has proven to be cutting edge in many ways regarding the Eclipse development process. In particular, we were amongst the first to adopt a Subversion repository.

The reason why we went for those repositories are varied. First, I think most of us acknowledged that CVS was not fitting the bill so much anymore. We were also increasingly using SVN at work, and had gone through the hurdles of mastering it.

Some time passed. git and mercurial came along and revolutionized quite a few things. Just look at github and how the commit rate of rails changed since they moved there (around the 5th minute on this video of the Rails commit history [0])

I opened a bug about the possibility to move to git [1], and a webmaster hinted that supporting git would be considered if a couple of top level projects were asking for it.

That’s why I’m asking you to please cast an informal vote for this move. Please consider also voting on [1].

Thanks,

Antoine

[0]: http://vimeo.com/2979844?pg=embed&sec=2979844
[1]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=257706

Do you want to see DVCS support at Eclipse ? Please consider writing to your PMC today.

Yes, Intalio|Designer runs on your platform of choice.

Just to reassure everybody that Intalio|Designer runs on all the main platforms out there. Windows, of course, but also Linux and Mac, for both 32 and 64 architectures. Apparently that’s not so common, as a BPMN forum member reminded us !

If you’d like to have support for your platform of choice besides those, you should definitely open a demand driven development project about it.

This support for multiple platforms of course comes from our choice to develop on top of the Eclipse platform and SWT.

1st BPMN International Workshop

Just saw flying by a call for papers for the 1st BPMN International Workshop. It is happening in Postdam, and is housed by the Oryx team. I would have loved to participate but at that time I will be in Iceland enjoying my honeymoon. Too bad, for once I could have had a jetlag free presentation.

Intalio|BPP and XMPP

This subject is dear to my heart but frankly low level priority.

I looked at a way for our product, Intalio|BPP, to interact with a XMPP server. Apparently, there are some libraries that deal with this. The XMPP4R library, the XMPP lib that comes with ServiceMix, are two alternatives.

I tried to use XMPP4R with JRuby, but apparently there is a bug in JRuby that makes it hang. I never got the message through anyways.
I don’t feel like playing with ServiceMix.

So, to the heart of the matter: I asked the guys on jabber.org if they have a WSDL to interact with the server.
I understand that the server may have bindings with XMPP, eventually HTTP ?
I have seen reports about Axis2 supporting XMPP as transportation layer, so eventually we could get that.

What do you think ?

Now the folks on jabber.org never came back to me. Am I missing something ? Is there another place where I should be looking ?

Build a REST web service Royal Canin Style

Introduction

As an Intalio employee, I participate to the Intalio Dogfood project. I came too early to the office one morning, had an interesting discussion with the CEO that ended on his team.

The schedule for building our marketing process is aggressive as we want to maximize the ROI. At the same time, it makes use of a lot of technologies that will push our platform in all directions.

Later, on the very same day he had recruited me, he and showed me his first attempt at defining the process we would be working on. And well, instead of a BPMN diagram, he showed me a spreadsheet.

As David French says, that’s really not an “IT developer style of solution”. Yep, it’s business all the way, but my IT skills are there to make it happen. So…

At first, we thought it would be ok to generate a BPMN diagram, and then BPEL, from the spreadsheet, but that was too complex ; that also meant the spreadsheet would contain way more information, in particular the data and the mappings.

Rick Geneva joined our team then and proposed to go for a diagram that would poll the spreadsheet for data, and execute depending on the content of the cells. So it was that simple: I had to design a web service that would take the URL of the published spreadsheet and would turn it into XML data to be fed into the process.

Why REST ?

I have a little knowledge of building web services, I designed one for the Facebook application I had put online in 2007. It was smartly using FCGI and Ruby to produce SOAP messages. I had got the recipe from Pascal who had designed the Time Service in the same way.

However, the Dogfood project required that I integrate the application with our Java server, so I had to try new things.

I didn’t feel like writing the service in Java as I wanted it to be as short as possible. I have a good experience of Ruby now and wanted to see some of it in action.

As a matter of fact, the SOAP libraries in the Ruby world are not doing too well. Some are deprecated, some are still relevant but somehow they don’t inspire much confidence.

So I chose to build a REST service as there is more community around it, at least in the Ruby world.

Micro-frameworks

Assaf pointed me to Rack, a framework to run web applications. I didn’t want to run a full fledged Rails application for a simple web service that had no need for storing data or even html pages.

I first settled for Camping. It was a smart and good looking framework. It was looking enough like Rails, separating the models, the controllers and the views that I thought I would be safe with it. However it wasn’t possible for a controller to render text directly, so the code wasn’t too DRY, and I didn’t find a way to catch the body of the request.

I then approached Sinatra. What a cool framework. Sinatra defines a REST service in three lines:

get "/" do
  return "Hello world!"
end

On top of that, it is possible to gain access to the body of the request: url = @request.body.read

I designed my Sinatra application, then ran it very directly with ruby:

$>ruby lib/csv2xml.rb

To test your application while it is running, you can just send something via wget:

wget http://localhost:4567/ --post-data=your-data --header="Content-Type:text/xml"

Installing and running jruby-rack

The objective is to deploy on a Java web server, remember ? Assaf had pointed me to jruby-rack. The author of the library is Nick Sieger, a member of the JRuby team. The jruby-rack gem installs on top of JRuby and requires to have maven installed. It all went smoothly though.

Once installed, I went looking for examples in the github repository and found some instructions to bundle my Sinatra application:

1. add a config.ru file at the root of your repository. That file should contain the minimum set of instructions to run. See mine for example.
2. Run rackup config.ru to make sure everything works.

So far, so good. The hard part starts now.

Warble me already!

To transform your application into a war, Nick created a gem named warbler.
You run it like this on your application: jruby -S warble war

It’s going to create a .war file. Leave it there and take a little time to review the code dumped into tmp/war/.

  • First, check that web.xml doesn’t contain invalid characters. Your config.ru file was pasted in there, and the XML is escaped. I filed a bug for this, and Nick fixed it promptly, so you shouldn’t have to face it anymore hopefully.
  • Second, check the version of jruby-rack used in the lib folder. It must be at least 0.9.4 for everything to run smoothly. Otherwise, Sinatra will complain of a missing library.

If your need to, make changes and jar again the /tmp/war directory contents with

jar cf csv2xml.war  -C tmp/war .

Deploy to your server. For the Dogfood project, we will be using Tomcat. So I dropped the war in the webapps folder of Tomcat. It was recognized and expanded as a folder.

Then you can try the same operation on your server as the one you were doing when running the application locally:

wget http://localhost:4567/ --post-data=your-data --header="Content-Type:text/xml"

Integrating with Intalio|Designer

REST connector for Intalio|Designer 5.2.1

I discovered while trying to integrate with ODE that it would not be able to send plain-text requests, ie I can’t send “http://www.intalio.com” to a REST service because we have an issue extracting the text node from the element I pass to the service ; I filed a bug about it.

So for this service we will need to use XML all over. For the input, we just want to have an element wrapping a text node ; for the output we need to return a complete tree of the cells of the spreadsheet.

I wrote the xsd by hand in Intalio|Designer. I forgot the maxOccurs attribute :( but it was quickly fixed, thanks to Pascal. I particularly enjoyed writing my XSD directly as I could see the result in the process explorer every time I saved the file.

I used the REST connector that was added to Intalio|Designer as of 5.2.1 to design the WSDL of the service.
I just had to punch in the URL and the parameters I wanted to use.

I used a test diagram to run my service. It queries the service for me and returns its response to my console.

During that phase, I had to do some debugging. In that case, you should open the log4j.properties file of the server and change the org.apache.commons.httpclient category to DEBUG. That way you will see everything that gets in and out of the server.
I also pushed org.apache.ode to DEBUG to get more information on the process state.

My biggest obstacles were to parse the XML sent to get the text without doing any magic…
I settled for using REXML, and using this code does the trick:

url = @request.body.read # Get the request body
  url.gsub!(/\n/, '') #Remove any newline characters as REXML chokes on them.
  doc = REXML::Document.new url // create a new document
  url = REXML::XPath.first( doc, '////text()' ).to_s // look for the most embedded text() node

… and to return XML that was in the schema namespace.

I had to make sure I would use a prefix for each element (”csv2xml”) and that the target namespace and the namespace were both declared.

x.csv2xml :content, {"xmlns:csv2xml" => "http://www.intalio.com/csv2xml",
                       :targetNamespace => "http://www.intalio.com/csv2xml"}

And then it all worked… I got my XML back!

<?xml version="1.0"?>
<csv2xml:content targetNamespace="http://www.intalio.com/csv2xml" xmlns:csv2xml="http://www.intalio.com/csv2xml">
  <csv2xml:row>
    <csv2xml:cell/>
    <csv2xml:cell>B</csv2xml:cell>
    <csv2xml:cell>C</csv2xml:cell>
  </csv2xml:row>
  <csv2xml:row>
    <csv2xml:cell>1</csv2xml:cell>
    <csv2xml:cell>1-B</csv2xml:cell>
    <csv2xml:cell>1-C</csv2xml:cell>
  </csv2xml:row>
  <csv2xml:row>
    <csv2xml:cell>2</csv2xml:cell>
    <csv2xml:cell>2-B</csv2xml:cell>
    <csv2xml:cell>2-C</csv2xml:cell>
  </csv2xml:row>
</csv2xml:content>

All the code used in this blog post is available on Github under the GPL license.

Thanks for the help of nicksieger and rtomayko on #jruby and #sinatra.