Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

Posts Tagged ‘p2’

on Jun 3rd, 2010The Doc Days of Summer

It’s been overcast and raining here in Victoria B.C. (Canada) over the past 2 weeks. It’s a long way from the dog days of summer, but a good time to focus on docs.  In fact, the Eclipse team has been focusing on documentation during this final release candidate.  In particular, the p2 team is putting some docs together on our new API (Yes, p2 has “real” API now).

Last year Andrew Niefer gave me a few tips on self-hosting the doc / help contents and I thought I would share these.

The help contents are written in HTML files and live in OSGi bundles (like everything else).  For example, the platform doc lives in org.eclipse.platform.doc.isv. Once you have your bundle loaded (from CVS, git, wherever) you can edit the contents like any HTML other document.  When you want to see how the contents will appear to the user, simple launch the org.eclipse.help.base.infocenterApplication, and specify a port as a VM argument (-Dserver_port=4419 for example).

infocenter The Doc Days of Summer

port The Doc Days of Summer

Once running, you can now browse the help contents using your favorite browser (and even change the contents on the fly).

browser The Doc Days of Summer

Of course if we get our butts in gear and follow David Green’s advice, we won’t need to edit our docs this way.

on Apr 16th, 2010An introduction to p2

At EclipseCon I had the pleasure of presenting an introductory tutorial on p2 with an awesome co-presenter Kim Moir.

iankim An introduction to p2

The tutorial went well, although we did have a few technical problems at the beginning. We knew there was way too much material to cover in a 3 hour tutorial, and if we started cutting it down then we wouldn’t get to the advanced material (which 1/2 the people want to see). If we started with the advanced material then we would loose the other half of the audience.    So either way, 1/2 of the room will be disappointed. :(  We decided to shoot somewhere in the middle and make the tutorial available as an Eclipse plug-in. This way, if you need a little more time, you could work through it at your own pace. If you are a p2 wiz, then you could whip ahead and take an early lunch.

If you couldn’t make the tutorial, the plug-in is available here as a p2 repository. The tutorial was designed to work with Eclipse 3.6 M6, so you will likely have to download that version of Eclipse. Once you have Eclipse 3.6 M6, simply open Help->Install New Software…

screenshot 027 An introduction to p2

  1. Enter http://download.eclipsesource.com/~irbull/p2-tutorial
  2. Make sure you UN-CHECK GROUP BY CATEGORY!
  3. Select p2 Tutorials Tools

Once installed, you can open the view called RCP Book Samples Manager (our plug-in was based on the famous samples manager from the Eclipse RCP Book).

screenshot 028 An introduction to p2

You can use the samples manager to move between the different parts of the tutorial. You can even compare the solution to the start to see exactly what you have to do for each task.

If you have questions or feedback on the tutorial, please don’t hesitate to contact me at irbull (at) eclipsesource (dot) com.


on Apr 14th, 2010Revamping Eclipse Examples?

Even though I’ve been involved in the Eclipse community for around 5 years, I’m still amazed by the projects that are hosted under the Eclipse umbrella. As an “insider”, I have a pretty good overview of many projects and at least a rough picture of all the other cool stuff. While I love working with EclipseRT technologies like Equinox, RAP, EclipseLink, ECF or <insert your project here>, I always find myself in the same situation.  This stuff is awesome but do users really get the point of what’s possible? Learning a new technology is always hard, but if you want to develop enterprise-ready, scalable and vibrant platforms using Eclipse components, there are so many obstacles to overcome. You need to have at least a clue about OSGi/Equinox, Extensions and their corresponding Extension points (for each for your consumed modules) and many other things. I don’t want to say that Eclipse is too complicated (which is a topic for another post anyway), but what I would really like to see is a better way to get our future consumers up to speed. As Esther Dyson once said:

A worker’s paradise is a consumer’s hell.

With the Eclipse Examples project we wanted to provide a few exemplary projects to show how to use different projects. In theory a nice idea, but practically I don’t see that this effort was very successful. Wayne and me discussed some ideas back in 2008 but without a concrete outcome.  Thinking about this topic after EclipseCon, my current thought was to provide easy ways for our consumers to try out the bits and pieces of all the projects. What I constantly run into though, is that you need to do so many things  before you can get started, like setting up a target platform, making your examples depend on the right bundles, using the right extension points/services/etc, creating launch configurations. Many projects already helped themselves by providing examples using PDE templates. That’s the way I’d like to tell newcomers how to get started and would push this even a little further – the idea is to provide some infrastructure in the Examples project to help others setting up their examples. The projects just provide example bundles, maybe a target definition, a launch configuration and a cheatsheet or something. In the end, the user should be able to try out another Eclipse technology within 2 clicks: New Example > That technology, run!

examples wizard Revamping Eclipse Examples?

Basically PDE already provides many of these things but it’s not yet at the point I would love to see it. It’s still too complex for consumers to create target platforms (I know what I’m talking about), create their launch configs and get started with the examples. While there are still some hurdles to jump, I think our users and consumers would thank us for getting them up to speed in seconds. It should even be interesting for non-OSGi related examples as other projects thought about something like this for years. I don’t see a chance to have this ready for Helios, but I’m pretty confident that we could do something like this in the timeframe for the I… release train. Would other projects be interested in such an approach to distribute their examples? Please leave a comment on this bug if you do so to collect ideas, wishes and requirements.

on Mar 24th, 2010Running a distributed search application in the Amazon cloud

Doing live presentations is always challenging, isn’t it? Especially here, at EclipseCon, I like to integrate some demo elements in my talks, but in case you are relying on external resources, such as a network, there is always the chance that it is not going to work during your presentation. And that’s exactly what happened when we did our talk on Monday.

For those who couldn’t attend you can find the slides below, for those who were in the room, here is the URL to our distributed demo search application that is still running on the cloud:

cloudle.eclipse.org/search – server has been shut down

We asked the audience at the very beginning of the talk to give us a URL of a website. Then we used g-Eclipse with a small JMX-management extension that we implemented for this talk in order to configure the SMILA framework running on several cloud nodes. (If you don’t know what SMILA is: It is a framework for building search solutions, in our case it was the glue between our exemplary back-end Apache Solr and a small RAP-based search front-end.) The next step was to start the web crawler on this remote machine with g-Eclipse to give it some time to download the web pages below the given URL and to build up an index.

At that point in time I saw some network timeouts. Not a good sign but maybe only a temporary problem that goes away after some minutes, some minutes that we were using to explain what we did. See the slides yourself:

Our exemplary (and simplified) architecture has one front-end node that is running our little RAP search-UI, and several back-end nodes, each of them with a search index of its own and crawling a different set of URLs. At the end of the talk it was planned to make the remote machines known to each other and that means in this case that the front-end needs the addresses of the back-end nodes. Once again, we used g-Eclipse to add the other back-end nodes to its configuration.

Just for the records… it worked well when we tested it before the talk, and it worked immediately after it. Unfortunately we had some kind of weird network problems in our session.

on Mar 6th, 2010p2 and Agile Software Development

One of the key aspects of Agile Software Development — or any iterative software development process — is keeping your customer in-the-loop. In order for customers to have a voice in the software development process they must continually consume your software, provide feedback, and witness the results of that feedback. In a small setting this might not be to hard. But when you mix in a variety of different configurations, distributed development teams, and distributed customers — delivering and updating software can become a challenge.

iterative p2 and Agile Software Development Not only do your customers need to acquire the proper configurations, and stay up-to-date as the software is developed, your development team must also be developing against the latest code base. Again, in small teams it might be practical to checkout the entire codebase from your SCM system, but does this scale to multi-million line systems?

The Equinox/p2 project provides a powerful provisioning platform that can be used to help deliver software in number of different forms. At EclipseCon this year, Kim Moir and I will be exploring how you can use p2 as a platform to help enable agile software development. While the tutorial will focus on how p2 can facilitate agile software development, the tutorial will also provide a good overview for anyone getting started with p2 and PDE/Build.

In particular, we will discuss how to:

  1. Create, publish and provision a variety of product configurations
  2. Enable automatic updates within your products
  3. Craft and manage target platforms

The hands on exercises will explore the new p2 API, PDE/Build and many of the headless p2 applications. The exercises will be based off the Hyperbola chat client from the new Eclipse RCP Book.  (We may even have a preview of the book on display at the tutorial).  If you are interested in how to streamline the deployment of your software, are looking for an update mechanism for RCP or OSGi based applications, or are just curious about p2, please feel free to attend our tutorial.

on Feb 26th, 2010Upgrade to Eclipse Galileo SR2

If you haven’t seen it in the Eclipse announcements: Galileo SR2 is available for download from eclipse.org. From this page you can download the new EPP packages that are based on Galileo SR2 (Service Release) and Eclipse 3.5.2.

Or, if you don’t want to download the full packages, you can start an upgrade – that’s what I did just a few minutes ago. I started with an older working copy of Eclipse (probably something from Galileo SR1) and started the upgrade process (‘Help’ > ‘Check for Update’).

It takes a while until p2 fetches all the required metadata from several repositories. The list includes the EPP package repository with the package definitions, the main Galileo repository and the Eclipse Platform repository. A few Okay-clicks later, p2 started to download the new content and asked me some more minutes later to restart Eclipse. Et voilà – after that restart I had a brand-new Eclipse with the latest version without downloading a new package.

on Feb 10th, 2010AP2 API

As I mentioned a while back, Eclipse Helios M5 was made available for Download. There are number of New and Noteworthy features, but one really big feature was omitted from the N&N. The Eclipse provisioning platform, p2, finally has API! Really, go take a look at the code… all those internal.provisional packages are now gone!  This was actually a huge milestone for the p2 team, and Pascal did a great job steering us towards the API.

api AP2 API

What does this mean to you? Well, if you are building anything on top of p2 you should grab M5 and see how the new API feels. We are going to be pushing hard to finalize the API for M6, so if there is anything missing, speak up now.

John Arthorne even started a Migration guide: http://wiki.eclipse.org/Equinox/p2/Helios_Migration_Guide

on Nov 29th, 2009OSGi and Equinox book available!

Over the past few days I have spoken to many different groups at the EclipseRT days, various democamps and some students in one of our Advanced RCP courses. Each time people have asked…

“when is the OSGi and Equinox book coming out?”

Most were hopeful, some were trying to get a rise out of me. Well, ask and ye shall receive!

I am very pleased to say that the full, pre-copy-edited content is available on Rough Cuts. There are a few minor differences between what is online and what will end up in print but that is mostly a bit of grammar and a few technical fixes. The early versions of all the code is available though there are a few known issues in the packaging that we are still working on.

I am really very happy with how the book has turned out.  The structure has lots of content for everyone.  Tutorials, deep-dives, reference material. As you can see by the table of contents below, we start with some history, context and concepts. Then there is a set of tutorial chapters where we build up an example fleet management application called Toast to have a funky embedded vehicle user interface with Google Earth integration, client0server connectivity as well as a back-end control center for managing the fleet.

Toast Client

The Toast system from Chapter 14, the final tutorial chapter, has been donated to Eclipse as the Toast Examples project where is has been extended to have a RAP UI for the backend, EMF and EclipseLink for data management, ECF for infrastructure bits, etc etc.

The tutorial is followed by a number of deep-dives on key topics such as Declarative Services, the HTTP service, Remote Services (RFC119) and more.  Finally there are a set of reference chapters that go even deeper and look at the grotty issues of classloading, dynamic behavior and third party code libraries. It’s a good range of the popular OSGi concepts and services. Of course, there is always room for more in a 2nd edition! (can’t believe I said that…)

Part I:   Introduction
1              OSGi and Equinox
2              Concepts

Part II :  Tutorial
3              Tutorial Introduction
4              Hello Toast
5              Services
6              Dynamic Services
7              Client/Server Interaction
8             Testing
9              Packaging
10           Pluggable Services
11            Extensible User Interfaces
12            Dynamic Configuration
13            Web Portal
14            System Deployment with p2

Part III: Deep Dives
15            Declarative Services
16            Extensions
17            Logging
18           HTTP Support
19            Server Side
20           Release Engineering

Part IV: Reference
21            Dynamic Best Practices
22           Integrating Code Libraries
23           Advanced Topics
24           Declarative Services Reference

Now for finishing up the 2nd edition of the RCP book.  Chris and I are together this week and will be plugging away at the final tweaks before the copy-editing phase. The first 13 chapters of that book have gone to the copy editors and are available on Rough Cuts.

on Nov 23rd, 2009Simplifying the Equinox P2 User Interface

I’m not sure if people noticed this last week, but there’s been discussion of providing a simplified p2 ui by refactoring out the Mylyn discovery user interface and pushing it down the stack.

Equinox P2 UI

Mik Kersten alluded to this in his blog entry last week, where having a simple discovery and install mechanism can help grow an ecosystem. I think this enhancement would alleviate a common problem RCP developers have when it comes to providing a simpler user interface for their users. p2 does a great job in offering you a set of APIs to do many things, but in most cases… the operations and user interface should be simple.

If you’re interested, please provide feedback on this bug.

on Oct 2nd, 2009Reverting Changes in an Eclipse Installation using p2

I was helping a colleague with some Eclipse install issues and was surprised he didn’t know about the ability to revert to a previous install configuration. Equinox p2 makes the revert process sane compared to the old Eclipse Update story. So everyone knows, to revert to a previous configuration of an Eclipse install, this is what you do…

First, open the About dialog and click the Installation Details button:

About Eclipse SDK

From the list, you can select a previous configuration and click the Revert button to go back in time:

Eclipse Installation History Dialog

It’s that simple!

As a bonus in Eclipse 3.6, you’ll be able to compare two configurations to see differences via the Compare button:

Comparing Install Configurations using p2

Once you do that, you should see a compare dialog with the changes:

Comparing Installation History using Equinox p2

Hope this helps!

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
© EclipseSource 2008 - 2009