Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

Archive for March, 2011

on Mar 18th, 2011Sovereign – clustering RAP applications

sovereign logo 11 300x167 Sovereign   clustering RAP applicationsOnly a few days remain until EclipseCon 2011 starts. We are eagerly anticipating our chance to present you an introduction to our ongoing research project Sovereign.

The talk, “Migrating Java Threads to Improve Availability of Web Applications” demonstrates an innovative solution how RAP applications can run on a cluster for failsafe operation.

After our first test run (75 minutes icon wink Sovereign   clustering RAP applications for a 20 minutes talk) we decided to put some of the technical details on our brand new Sovereign homepage, where you can have a look at them in a spare minute. This way we can stick with our two demonstrations that will provide you a better picture of what Sovereign really is about than just low level details.

Markus and Johannes hope to see you there…

on Mar 16th, 2011See you at EclipseCon 2011

web header logo 20111 See you at EclipseCon 2011Over the last few days I’ve read many blogs from folks who are speaking at EclipseCon next week in Santa Clara. Everytime I find it really interesting to hear about the ideas behind the talks. So, with this post I want to show you what you can expect from the EclipseSource folks at EclipseCon.

First we’ll have a chance to meet every morning. EclipseSource is the activity sponsor again this year. What does this mean? This means that the first 50 people will get a cool running shirt and everyone will get the opportunity to meet Eclipse committers away from the conference stress. After the jogging you won’t have to wait long to hear from us again.

The first event is on Tuesday at 2:00 pm. You can meet Ian Bull and listen to him speaking about growing an open source project. He will show you how easy it is to get in touch with your favorite open source project by contributing to it.  He will demo how to overcome the major hurdles to becoming a first class contributor.

If you can’t get enough of Ian you will have a second chance to listen to him after a short break. On Tuesday at 4:00 pm he will show you everything you need to know about p2 together with Kim Moir and Pascal Rapicault. They will show you how to get around the biggest pain points in p2 and pointers for best practices.

If p2 is not your favorite topic and you want to go deep into some hardcore stuff, then I recommend attending Johannes Eickhold’s talk. It’s in the same slot as the p2 talk and is entitled, “Sovereign: Migrating Java Threads to Improve Availability of Web Applications“.  Johannes will describe two technical strategies on how to improve availability in RAP, a very interesting problem with big implications for RAP.

rap See you at EclipseCon 2011Because EclipseCon is full of good talks, you don’t have to wait long for the next one. Take a look ahead at RAP together with Ralf Sternberg at 4:30 pm. He will take you on a tour inside our plans with RAP and show some really cool demos. This talk also marks the end of this packed Tuesday for us.

But luckily the Wednesday is not far away.  Meet Ian again at 5:30 pm icon wink See you at EclipseCon 2011 . He will show you some really cool demos on the hot new products showcase reception. This is a great opportunity to go into detail together with Ian.

After meeting Ian again you can take a break from us. But, only until 7:30 pm. Ralf will moderate the RAP BoF and right after this you can join me on the RTP BoF.  The BoFs will give us a full hour to propose ideas and discuss concepts or internals. So, don’t miss them.

RTP logo small See you at EclipseCon 2011Because RTP is a hot new Eclipse Project icon wink See you at EclipseCon 2011 , in addition to the BoF, you will also have the chance to attend a presentation by me on Thursday 2:30 pm.  As you might already know,  we created the RTP project to enable more developers to use EclipseRT. In my talk,  “Eclipse Runtimes out of the Box“, you can hearing everything there is to know about RTP in 20 minutes.

In addition to this schedule there is more. Of course, you will find all of us at the Hyatt every evening icon wink See you at EclipseCon 2011 .  I’m really looking forward to meeting you there…

on Mar 12th, 2011Eclipse 3.7 (Indigo) M6, available for download

Just in time for EclipseCon, the Eclipse and Equinox teams have delivered another milestone.  This time, Eclipse 3.7 (and 4.1) Milestone 6 are available for download.

You can now navigate JavaDoc easier (thanks to the JDT team)

code select inheritDoc Eclipse 3.7 (Indigo) M6, available for download

There are improvements to both MacOS and GTK widgets (Thanks to the SWT Team / PlatformUI team)

gtk datetime Eclipse 3.7 (Indigo) M6, available for download

There are numerous improvements to the PDE Launch dialogs such as real ‘headless launching’ — no more unwanted dependencies (Thanks to the PDE Team).

application Eclipse 3.7 (Indigo) M6, available for download

And you can now ‘tag’ your software configurations (thanks to the Equinox and p2 teams).

install history tag Eclipse 3.7 (Indigo) M6, available for download

Browse the New and Noteworthy yourself.

Or better yet, download Eclipse 3.7 M6 or Eclipse 4.1 M6 and give them a try.

Note: 4.1 M6 will be available shortly, I”ll update this post when the downloads are ready.

 

on Mar 8th, 2011Eclipse — Managing your upgrade path

What’s the latest version of Eclipse? Which version of Mylyn works well with Eclipse 3.6.2? How do you configure a toolchain for a project that was developed with Eclipse 3.5?

As an Eclipse committer I sometimes like to think the answer is simple: Use the latest milestone builds and the add-ons from the Indigo site. If that’s too bleeding edge then use Helios. While this simplistic advice is easy to follow, in many cases it’s not practical.  Many organizations have much stricter rules:

Development environments must be ‘reproducible’.  This is not as simple as each developer should use the same setup. This goes as far as to say, when working on legacy software, developers must use the exact same setup they did when the code was first written (say 5  years ago).

To achieve this, many organizations create VMWare images of their development environments and then share those among team members.  Workspaces settings are then managed by Zipping-up and Sharing the workspace directory.  While this chicken-wire and duct tape solution may work, it’s very difficult to propagate changes to your team.

duct Eclipse    Managing your upgrade path

This is the problem that Yoxos addresses and today I pushed the latest Eclipse release (3.6.2) to our Yoxos servers. With the latest version of the Yoxos Launcher you can now choose your upgrade path.  If you are happy with (or require Eclipse 3.6.1) you can now stick to that release.

3.6.1 Eclipse    Managing your upgrade path

On the other hand, you can stick to Eclipse 3.6.x, upgrading to new service releases as they become available.

3.6.2 Eclipse    Managing your upgrade path

Setting the appropriate upgrade path on your Yoxos profile will ensure that all your team members are using identical development environments and your current configuration will remain reproducible.  Team members simply need to install the Yoxos launcher and double click the profile.  This will get you up and running faster with Eclipse.

Yoxos supports 5 Different upgrade paths:

  1. Sticky: Sticky means that you will never upgrade, and you will work with this toolchain forever.  This is important for enterprise customers if they have to re-create the exact toolchain (bugs and all) that was used in the past.
  2. Critical: Critical means that nothing is removed, and only critical fixes are applied.  An example of this would be the upgrade from 3.6.1 to 3.6.1a (if a re-spin was needed for example).  If you set this, you will not get 3.6.2.
  3. Service: Service will take any critical updates as well as automatically moving you to the next service release. For example, from 3.6.1 to 3.6.2. However, you will not get 3.7. Service updates may (highly unlikely) remove functionality. For example, if a plug-in specifies an exact dependency on 3.6.1, then this plugin will be removed in 3.6.2.
  4. Minor: Minor updates will include all critical and service updates, as well as moving you to the next Minor release. For example, you will move from 3.6.1 to 3.6.2 to 3.7.0 (when 3.7 is released).
  5. Major: Major updates will always keep you on the latest Yoxos slice. You will move from 3.6.1 to 3.6.2 to 3.7.. however, if there is a 4.0 slice, you will be moved here instead.  This is for those people who always want the latest!

With the latest Yoxos repository, we now have 1,677 Components (features) and over 10,000 Eclipse plug-ins.

on Mar 4th, 2011Dining philosophers using OSGi (Equinox) data service locations

In p2, if you’ve ever tried to write to the same artifact.xml (artifact repository) from two different processes, you will quickly learn that this fails. In fact, both processes will start corrupting each others data and you will likely end up with an unusable artifact repo. This limitation is of particular concern if you wish to use proper bundle pooling (a single bundle pool for all your Eclipse installs). Of course, you could implement your own bundle pooling technology, but I’ve set out to fix this at the p2 level.

Java synchronization obviously doesn’t work in this case because we are talking about multiple processes (multiple VMs). Instead, we need some mechanism to communicate the locking between Java VMs. File locking is one of the most used techniques in this case, and lucky for us, the reference implementation of OSGi (Equinox) provides a Data Location service which does exactly this.

Equinox Data Location, among other things, allows you to create a file location and acquire / manage / release a lock on that location. Equinox takes care of the platform oddities around doing all that (how do you create a file lock using Java Foundation 1.1 on Windows?). To demonstrate how this works, I’ve implemented the classic Dining Philosophers problem using Equinox’s Location service.

578px Dining philosophers Dining philosophers using OSGi (Equinox) data service locations

For those of you unfamiliar with the problem, essentially there are N philosophers and N forks around a table. Philosophers think and eat. When they want to eat, they first must first acquire both the fork on their left and right. When they’ve successfully done this, they can eat. Once they are done eating, then put the forks down and resume thinking.

In my solution, I represent each fork as a ‘Location’. A location can be created as follows:

private  Location getLockLocation(URI baseLocation, int locationNumber)
  throws IllegalStateException, IOException {
 
    Location anyLoc = (Location)  Activator.getService(Location.class.getName());
    URI locationURI = URIUtil.append(baseLocation, "" + locationNumber);
    Location location = anyLoc.createLocation(null, URIUtil.toURL(locationURI), false); //$NON-NLS-1$
    location.set(URIUtil.toURL(locationURI),false);
    return location;
}

This will create a location at ${baseLocation}/locationNumber

Each philosopher can create a location for the fork on their left and right. From here, implementing the solution is fairly easy:

try {
  thinking: while (foodLeft > 0) {
    // Wait and do some thinking
    Thread.sleep(getThinkingTime());
    while (true) {
      // Continue until you can acquire both forks.  We could 
      // sleep for a bit if we don't acquire both forks, but
      // we are pretty hungry here, and sleeping is never good
      // on an empty stomach 
      boolean leftFork = false;
      boolean rightFork = false;
      try {
        leftFork = acquire(leftForkLocation);
        rightFork = rightForkLocation.lock();
        if (leftFork && rightFork) {
          eat();
          continue thinking;
        } 
      } catch (IOException e) {
        // do nothing, we will release everything below
      } finally {
        if (leftFork)
          release(leftForkLocation);
        if (rightFork)
          release(rightForkLocation);
      }
    }
  }
} catch (Exception e) {
  e.printStackTrace();
}

In this solution, we wait until we acquire the fork on the left. However, we quickly release both locks if we cannot acquire the fork on the right.

/**
 * Blocks until a particular location can be locked
 */
private boolean acquire(Location l) throws IOException, InterruptedException {
  boolean lock = l.lock();
  if (lock)
    return true;
  while (true) {
    Thread.sleep(10);
    lock = l.lock();
    if (lock)
      return true;
    }
}
/**
 * Releases the lock on a particular location
 */
private void release(Location l) {
  try {
    l.release();
  } catch (Exception e) {
    // Do nothing
  }
}

I’ve put my solution to this problem on Github. Feel free to fork it (no pun intended).
https://github.com/irbull/com.ianbull.dining
In my solution, I’m actually not using multiple processes (and I’m sure there are other things that can be improved), but it should give you an idea of how to use the service.

© EclipseSource 2008 - 2011