Archive for the ‘Portal’ Category

GateIn management

Wednesday, December 30th, 2009

At the beginning of the year I started to write management capabilities in eXo Portal. It already had some management features but it was not really in a usable shape, it was indeed exposing every service of the kernel on the JMX registry, which was very confusing because it was exposing too much information and not the right information, it was just not usable.

Usability is word that matter, even in management, so my idea was, let’s expose management in a usable way. So I went on designing a way to expose management information based on Java annotations (well it’s pretty obvious to do that isn’t it?).

An important point was also to not tie the management to JMX. Indeed even if JMX is the kind of standard for exposing management in Java, I wanted to be able to expose the same management interface using Rest. The idea is to leverage the gadget server of GateIn and provide management information to gadgets.

So I went on designing the management contract (Java 5 annotations) that are agnostic of the management layer. Of course this is not enough for exposing the management in JMX nor in Rest. So we do have custom JMX annotations that describe how a management interface should be exposed in the JMX registry.

Here is an example of a managed service:

@Managed
@NameTemplate({@Property(key = "service", value = "cache"),
@Property(key = "name", value = "{Name}")})
@ManagedDescription("The Cache")
public interface Cache

   @Managed
   @ManagedName("Name")
   @ManagedDescription("The cache name")
   public String getName();

   @Managed
   @ManagedDescription("Evict all entries of the cache")
   public void clearCache();

   ...

}

The @Managed, @ManagedName and @ManagedDescription are the agnostic annotations. The @NameTemplate is an annotation that has only a sense for the JMX layer. The @Managed* annotations really focus on giving a clear and non programmatic description of the management interface.

There a few more features in the framework such an @ManagedBy annotation to specify a delegate for management interface to avoid to clutter the service with management, a ManagementAware interface for programmatically registering new managed object, a management context facility for correctly scoping managed resources (so several instances of the same service can be registered several times with different names in a transparent manner).

Recently I spent time to develop in the kernel layer the plugability for management provider. It is still in the trunk so nothing is really commited yet in GateIn. This plugability allowed my to write the Rest management provider in GateIn. It was also a good way for me to learn a bit more about JAX-RS (many thanks to Stephane that came a few weeks ago at the Mars JUG to talk about Rest and also for helping me a bit tonight :-) ). So I’m still not yet a Rest expert but I have a few bits of management stuff coming to Rest:

@Managed
@NameTemplate({@Property(key = "service", value = "cache"),
@Property(key = "name", value = "{Name}")})
@ManagedDescription("Exo Cache")
@Rest("cache")
public interface Cache
{
   ...
}

The @Rest (it’s not yet definitive) expose the management interface on the Rest connector. For now I’m only considering JSON in my experiment.

management returns a list of the managed services annotated with the @Rest annotation,
aka “resource list”
/management/{resource} returns the management interface description, for instance in our case
we have {name:”cache”,description:”The Cache”,properties:[{name:"Name", description:
"The cache name"}],methods:[{name:"clearCache",description:"Evict all entries of the
cache"}]}

The good news is that we have already plenty of useful management interface in GateIn that were developed a few months ago by our team and all those will be soon available via Rest!!!

CRaSH 1.0.0-beta1 release

Tuesday, December 22nd, 2009

I’m glad to announce the release of CRaSH 1.0.0-beta1!!!

But wait, what is CRaSH?

CRaSH is a shell for Java Content Repository that allows remote connection to a server and performs various operations such as browsing and interacting with the repository, executing queries, performing import/export operations. You can read a complete introduction here.

As a GateIn developer I often use the underlying JCR engine and I developed CRaSH as a companion for my development tasks.

The project is written in Java and Groovy and leverages a few good open source projects:

  • The command system is written in Groovy allowing seamless extension of the shell by adding new commands
  • Netty provides the remote connection capabilities
  • Args4j parses the command line and inject the option and argument in the Groovy commands

It comes as a war file that setup a telnet daemon on the port 5000.

The project is developed on Google Code under the LGPL license and contributions are welcome :-) !

The WebOS Vision

Wednesday, October 15th, 2008

The initial vision

When I was a JBoss contributor, we used to name the infrastructure kernel as WebOS, it was Marc Fleury’s vision I think. Actually for many years the banner of our source code was:

/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/

It may sound a bit marketingish but it is a simple and powerful concept that was pioneered by JBoss in 2000 and followed by a large crowed since then. The fundamental idea is to provide a system for managing services. That system can be simplified as the equation WebOS = deployer + registry + controller , I won’t go farther in the gory details. Today JBoss as rewritten from scratch the system as JBoss Microcontainer, we assume that it is as of today the most complete system and will be for many years.

So JBoss Microcontainer provides a runtime for your services, do you think it is sufficient ? that would surely work out if you would use services the way we used computers 30 years ago (or maybe 40) with a shell as unique user interface.

Toward a more complete vision

To complete the picture we need an infrastructure to deliver an user interface that is adapted to the web and that’s our business at eXo. What we provide can be simplified as WebOS = deployer + registry + aggregation + identity.

The deployer takes care of deploying visual components such as portlets or widgets. Both are connected to your service infrastructure but in a different manner. Portlet adapts your existing applications (JSF, Tapestry, Struts, et…) to the portal world. Widgets are more stateless and access services through Rest. Components are registered in the registry. Nothing really fancy here.

The aggregator and identity are the real value add

The aggregator provides rich front end capabilities to deliver the user interface adapted to your needs based on flexible layouts and skinning. the Ajax technology came to the rescue a few years ago and is now naturally involved to improve the end user experience. It comes in two flavors, the classic portal and the WebOS portal (here literally an operating system like OS X or Vista).

The identity part takes care of linking your existing user back-end to the portal. It integrates the profile and the various roles of the user (I am not talking here about the social aspect of the user identity as it is out of scope of this blog, we’ll have more announcements about that soon).

The vision

The vision we have sketched so far is almost complete. Our WebOS is able to deliver services and applications to your users, but it comes as an empty shell. To make it more sexy it would be nice to have applications to deploy in it. It is also what eXo delivers as professional and powerful application products  that comes bundled with our offering providing a full fledged WebOS solution.

What’s new and cool in Portlet 2.0

Thursday, September 18th, 2008

I just made my presentation available on SlideShare!

Portlet 2.0 @ JavaZone 2008 18th of September

Monday, September 8th, 2008

I will be speaking next week at JavaZone 2008 about Portlet 2.0 aka JSR 286. The talk title is “What’s new and cool in Portlet 2.0″ and it’s about the new features in the JSR 286 specification. I’ll introduce the new key features of the spec with demonstrations.

My session is on Thursday 18th of September 2008 at 3:45 pm. You can find more information on that page. I’ll be there during the full event so if you want to meet and have a drink, it will be with great pleasure.