Jun 20


SpringSource will release sone (around july) the version 1.0 of its application platform: S2AP. I’m having a look at it, especially from a PaaS point of view. S2AP present lots of interest for different perspective, but PaaS is what I’m currently looking for.

First, S2AP makes a big jump in the notion of application server…it’s not an application server but an application platform which is different and open new horizons. The application servers stand for containing applications. These application can be web app, web services…etc, but they are monolothics. With JMX and ear, you can go further in decoupling by allowing multiple micro appplications to be delivered inside the same enveloppe: the ear. But this is not enough: you still deliver an entire ear, you do not handle multiple versions of the same application, you get worried by transitive depedencies for third parties, communication between ear are remote calls. S2AP takes a real new approach. It provide separation/decoupling and allow integration betweens components without remote call (yes, this can be discussed : RPC and AOP proxy vs web service and remote calls). IMHO, this is why we are talking about application platform and not application server as it provide support for multiple components tightly coupled which are all belonging to the same application.

Various technologies tried to hide (or abstract) the fact a method call was remote or not. this is clearly a mistake. Remote calls are integration points, local calls are not. Integration points are fragility and low performances points. Developers and architects must be aware of all of them to ensure reliability and good performances. More over, developping applications mostly based on remote calls is an error and should raise a red flag. With S2AP we get a new approach which keep capabilities of regular applciation server. From a PaaS point of view, it is a significant technolgy jump (we will see the Microsoft response with Oslo project), and an instance of S2AP will be used to deploy all the applications of the SaaS vendor.

Those who read a previous post on my vision of PaaS, could argue S2AP is far from the Software Factory approach. I agree, but S2AP present at least one interesting characteristic: the hot deployment. This is an essential piece of technology to allow deployment of components. The next step are to better project management and source control management capabilities (a kind of mavenization), and allow deployement from one S2AP to another. This way a developper could have it’s S2AP instance to develop (and test) applicitions, then automatique deployment on the S2AP production system. Of course, this last step requires far more than just a hot deployment capabilities…but at least we have the key technological piece. More over all this inetgrations (SCM, PM, Eclipse, test and deployment) can be developed out of S2AP…I hope a lot of satellite projects will appear in that area.

 To conclude, S2AP is a very interesting opportunity for PaaS as it allows a decoupling and componentization of applciations inside a platform and not inside an ear.

Apr 30

I had a look at jBoss and wanted to validate its capabilities from a PaaS perspective.

First I prefer to have a kind of factory which includes the minimum software and tools to start. This does not include you JDK that should already be installed. This factory will include Eclipse (I use version Europa Winter (Java EE) 3.2 that you can download here) , maven2 (2.0.8 downloadable here) and jBoss (4.2.2 downloadable here ). I also create a folder in this factory for the eclipse workspace.

Install factory

I suggest to backup it, to reuse a copy of it for each project. Create a folder named factory. Download Eclipse, maven 2 and jboss. Then create a folder for eclipse workspace. You should have something like:

Here are some files (eclipse, vars) to put in the folder factory that will setup environment variables.
Add also a shortcut that will launch a command prompt and use the environement variables setup in vars.bat. Here his the value of the shortcut:

C:\WINDOWS\system32\cmd.exe /k “”vars.bat”"

(you should change only the windows folder according to your machine installation).
Now, update the vars.bat file for the line pointing to your JDK, the other lines should not be changed.

Done, yoiur factory is ready. Next step is to create and build your project.

Project and build creation

Create a folder named as you want (I will use C:\PaaS. Then copy the factory folder there (the factory folder is a sub folder of PaaS).

I’ve created a jBoss/Seam project containing : a webclient (for presentation logic of my application), a separated ejb folder (for business logique of my application), an ear to contain the projects.

Unzip this file mycompany.zip into the PaaS folder (mycompany should be asub folder of PaaS).

This project is based on MySql as RDBMS. You do not need to install it to make this sample working as this sample does not include any access to the database. bitewise, it will requires the jdbc driver. Here is the jdbc driver I used for MySql 5.1.6. I did not handle to include it in the factory, so you have to copy it into the lib folder of the jBoss deployment (factory > jboss-4.2.2.GA > server > default > lib).

Execute short cut that is in factory folder, it should launch a command prompt. Go in mycompany folder and execute folowing command line:

mvn clean install

Use Eclipse as IDE

Execute folowing command line:

mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavaDosc=true

Execute eclipse.bat that will launch eclipse with the right workspace. I then suggest you to declare the jBoss server.

Now import projects that are in mycompany folder. Deploy it and check it works.

Deployment

Go in platform folder and execute folowing command line:

mvn jboss:harddeploy

Go in http://localhost:8080/webclient …should be ok !!

Conclusion

There are 3 important points in that sample:

  • usage a factory to bootstrap a new project (I think this is the right direction for a PaaS approch, even if that requires lot more work…this is only a prototype…not more),
  • the maven2 pom.xml files which demonstrate how to separate business logic, presentation…and can be extended easily to host morte than one application,
  • the IDE is nicely included into the picture through maven, and the IDE is NOT the build process.

I will improve it and create a dedicated page on this blog and post updates using regular posts.

If you try it and have any question or see any problem, feel free to add a comment.