Tuesday 24 April 2012

Liberty Pi - Running WebSphere on the Raspberry Pi


Firstly, this is the coolest thing I've done at IBM :o)  Working with two technologies that are really interesting, innovative and just fun to play with!  So how did this all start…

A while back, I got in contact with the great folks at Raspberry Pi, Eben and Liz Upton, and told them I wanted to run a proof of concept demo which runs lightweight software on lightweight hardware.  They were keen to get involved and sent me one of their little gems to play with.  The reasons I wanted to run the new Liberty Profile on the Raspberry Pi was because I saw a lot of similarities in the goal of providing a lightweight solution, an offering which developers would love to get their hands on, and sheer innovation and determination to deliver a real top class deliverable.

A Raspberry Pi is essentially a business card/credit card sized computer. They're a charity which have wonderful intentions to encourage programming among school children with a really affordable computer.  Here's what's on it:




The new Liberty Profile, which is part of WebSphere Application Server V8.5 offering, due for release June 15th 2012, has been designed around developer needs. As a result its a lightweight offering of the full WebSphere App Server that is composable, very fast and reactive to a developers needs.  A download and install from scratch for example would take little over 3 minutes.  This Liberty Profile still contains the top class containers and services full WAS profiles have used over the years.

To show these two technologies off, I wanted to show both the Liberty Profile running on an extremely small device, as well as the Raspberry Pi running substantial software, including a Debian OS, full JVM and Application Server.

Here's the demo in action:


This is my first pass at running an environment on the Raspberry Pi, so comments and suggestions about what I could try next would be very interesting.  I've already got a bunch of ideas i'm planning on trying but would love to hear your thoughts.

In this first pass, I decided to run with the recommended Linux distribution, Debian.  The Liberty Profile allows you to use your choice of JVM, from a supported list.  However, as this was on an ARM architecture, choices were slightly limited.  This time I decided to go for the OpenJDK.  Liberty was a straight forward download and unzip from WASdev.net.

Things I noticed straight away: 
Where has all my memory gone?!?  256MB has turned into 126MB straight away!   Digging a little further shows that an amount of this is taken up by the GPU, and there seem to be workarounds to better allocate the memory for what I want.
Wow, the X Server takes up 30% of my remaining memory!  In the future I'll be switching to a more minimal runlevel to make better use of the resources the Pi comes with.

Some of my planned next steps are to play with the J9 JVM on the Pi, upgrade to the released levels of the Liberty Profile and use a more interesting application.

For more information about the Liberty Profile check out the WAS development community at WASdev.net.  For more info on the Raspberry Pi, see raspberrypi.org.

8 comments:

  1. Very cool - something to try when I finally get my hands on one of these. Any view on porting MQTT across as well, or has someone in Hursely already done that :-)

    ReplyDelete
  2. Hi, yes, it's something that's on my list to try when I get back from the IBM Impact conf this week.

    ReplyDelete
  3. Just spotted your video with ASC showing MQTT, RSMB and Liberty - very cool. Just working on getting a stack going on my PI at the moment. Have MQTT running and hooked up to UIF to communicate with my Android Phone. Next step is to work on hooking up with GPIO. Was wondering if you done any work with the GPIO yet and if you can drive it from Java

    ReplyDelete
  4. I'd like to see this running on embeddedarm as well

    ReplyDelete
  5. repost from ibm site --->

    great work guys.. how do we do this for ourselves with liberty / (ideally get a pre-built image to install :) )

    i saw mention of the serverside article that you are putting MQTT on there too... this all reminds me of when i was at IBM about 8 years ago, hacking mqtt onto all sorts of devices, fun times visiting hursley. i bet dave cj (if still there?) is all over the possibilities with this. mine arrived today after a 4 month wait... this liberty profile/MQTT is about 5th/6th of my list of "things i want to do with the pi" but may jump up if there is an easy to install SD image for me to play about with quickly :)


    --> end of repost..

    please keep this updated with your progress in these areas and if you need anyone to test or help out let me know. im investigating a variety of uses for the pi for all sorts of uses (when i have time) but one of them due to my background in ibm sw, java, websphere, moble etc is how, especially when you start looking at liberty+osgi+mqtt bundling for example.. not to create "application servers" as such but more "networked applications" .. lots of possibilities

    ReplyDelete
  6. repost from ibm site --->

    great work guys.. how do we do this for ourselves with liberty / (ideally get a pre-built image to install :) )

    i saw mention of the serverside article that you are putting MQTT on there too... this all reminds me of when i was at IBM about 8 years ago, hacking mqtt onto all sorts of devices, fun times visiting hursley. i bet dave cj (if still there?) is all over the possibilities with this. mine arrived today after a 4 month wait... this liberty profile/MQTT is about 5th/6th of my list of "things i want to do with the pi" but may jump up if there is an easy to install SD image for me to play about with quickly :)


    --> end of repost..

    please keep this updated with your progress in these areas and if you need anyone to test or help out let me know. im investigating a variety of uses for the pi for all sorts of uses (when i have time) but one of them due to my background in ibm sw, java, websphere, moble etc is how, especially when you start looking at liberty+osgi+mqtt bundling for example.. not to create "application servers" as such but more "networked applications" .. lots of possibilities

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. How about installing a domino server on Rpi?

    ReplyDelete