Pushing your Web services in the Cloud in 5 minutes…

… or less! Heroku is defined as a “Cloud application platform”. I just want to redefine it to “Awesome Cloud application Platform”. So, this awesome platform provides a way to host and scale your application in the Cloud really easily with 3 or 4 commands…

Since I am currently working on my talk at #OW2Con 2011 (coming later this week) dealing with BPM, Services and the Cloud, I wanted to host some Web services on several places. I never had time to test Heroku but I just took this precious time today. After looking some examples, I created a Maven project template (no I do not have time to create an archetype, maybe there is one somewhere) which uses Jetty and Apache CXF to expose JAXWS annotated classes as Web services. So now, using heroku to freely expose your services is easy as:

  1.  Sign up to heroku
  2. Download the heroku client for your platform
  3. Clone/Fork the repository at https://github.com/chamerling/heroku-cxf-jaxws
  4. Add your own services
  5. Login to heroku ‘heroku auth:login
  6. Create the app on heroku ‘heroku create -s cedar
  7. Push your services to heroku ‘git push heroku master‘. There is a git hook somewhere which just automatically compile and start your application after you pushed it.
  8. Open your CXF services summary page ‘heroku open’
The default application name is some random one, you can rename it by using the ‘heroku rename yournewname‘ but in the current case I had an issue on the generated Web service endpoint name. So I suggest restarting your app after renaming (have a look to the ‘heroku ps‘ command).
That’s all, that’s quick!

Open Source Tweet Wall

I am a big fan of Twitter and last week devoxx live tweet wall (http://wall.devoxx.com/) just made me want to create an open source live tweet wall. So last saturday night, I took some time to code it using the now well known Play! framework, some Web sockets and Twitter4J which supports the Twitter Stream API. This streaming API is really nice and provide a way to be notified almost instantly according to what you decided to listen to. After less than one hour (most of the time was consumed to read to Twitter4J documentation), the result is really fun. In the video below, I configured the wall to catch all the tweets containing ‘Apple’ and ‘Microsoft’ terms (I am not a MS supporter, but OMG, there are lot of tweets about it… probably only jokes and bugs…), and tweets are displayed in live on the wall (no I am not moving anything, the page is populated through a Web socket)

The resulting prototype is quite simple but works, and since I am not a front-end developer at all, it uses Twitter Bootstrap as CSS… The code is available on GitHub at https://github.com/chamerling/play-twall and is not perfect at all but just works: Twitter configuration is available in the Play! application.conf file and the Twitter connection is created in the Bootstrap…

Looks like I should start creation sort of “Coding a nice thing in one hour” collection…

QuickHub 1.0, adding GitHub stuff to OS X

Some weeks ago I was looking for an OS X GitHub client. Not a client like the official GitHub client which is one of the best OS X app I ever see and which mainly deals with raw git stuff, but one which can allow me to access to my repositories, organizations, issues and gists. My different researchs returned nothing really exiting… Since I was looking for something new to develop, I started to create a simple application which focuses on my needs.
I started to share my idea and after some nights to code it, I sent the first prototype to some twitter geeks to get their feedback. The feedback I had was really exiting (thanks @k33g_org and @aheritier, you excited me a lot!), and most of the beta testers said me that I should submit the application to the Mac App Store and make it a paid application.

So, here we are! QuickHub has been finally validated by Apple and I have chosen to try to sell it at the lowest possible price ($0.99).

The first version of QuickHub stands in the OS X status bar and allows you to directly access to :
- Your Repositories
- Your Organizations/repositories
- Your Issues
- Your Gists

It also notifies you using Growl when something changes on the previously mentioned items. For now clicking a menu item opens in your browser. It is quite simple but it was really the first idea to provide something which can quickly allows you to access your GitHub stuff.

While Apple reviewed QuickHub, I started to add some features to it. The 1.1 version will allows you to do more things (hopefully), and especially to create gists directly from QuickHub, preview some artifacts and have more better user experience with some better interface… I hope to publish it in the next days.

For now, any feedback is appreciated. You can comment here, on my personal twitter @chamerling or on the official QuickHub one @quickhubapp. Share it with your friends/co workers/followers and let’s see what happens. You can directly access to the Mac App store or have a look to the QuickHub Web site.

Christophe

Playing in Brussels

Last week was the first annual review meeting of the Play project I work on since one year. I am involved at several levels in this project: from the architecture point of view, to the software integration and quality ones. On my side, my goal is to provide the efficient software infrastructure for events actors, or how to build an Event Driven Architecture based on Petals Distributed Service Bus. There are others points which have to be developed, especially all the platform governance stuff and Service Level Agreement for events, what we call Event Level Agreement.

We showed several things to the European Commission reviewers and we were also able to show an early prototype (this one was originally planned to be show at mid project ie in 6 months…). I made a video capture of the demo, which really needs to be explained…

  • There is the idea of a market place for events : The event marketplace. From there users are able to subscribe to things they are interested in. For now it is just a simple Web application which subscribe on behalf of the user to events through topics. This subscription is sent to the Play paltform using Web standards. Here we use OASIS Web service Notification to create this communication link.
  • Events are collected from several sources by events adapters. In the video above, we can see the user setting this FB status which is collected by the Play system and transformed into a notification which is published to the platform. There are also some Twitter adapters and Pachube ones which collects data in real time and publish them to the platform. This time again, we use Web standards for adapters communication.
  • Now, what happens in the video? The user logs in to event marketplace and subscribes to FB events. The user then publishes something to its FB wall (note that it is not mandatory to have the same user in the event marketplace and in FB. A user can subscribe to FB events and receive events from all the FB statuses collected from the FB application users). After the event propagation delay, the event marketplace display the event to the user.

So do we need such machinery to do things like that? No, if you want to do some other simple mashup portal. There are several components which are under active development: Storage and processing. Yes we store all events in the Play platform. This storage will be huge, but it is one of the project goal: Providing efficient and elastic storage in some P2P way. The need for this storage comes with the other important aspect of the project: Complex Event Processing. We will soon be able to create complex rules on top of events and be able to generate notifications based on past and real time notifications because we have efficient storage and real time stuff inside the platform. I am not an expert of this domain, so I can not give more details about that point but capabilities are huge! For example, we can express something like “Hey Play, can you send me a SMS me when there is my favorite punk rock band playing just around and I am not on a business trip and X and !Y or Z”. All of this intelligence coming from the processing of various sources I push since months in the platform coming from Twitter, FB, last.fm and other data providers.

Now let’s take some time to work on my OW2Con talk. The session name is pretty cool : Open Cloud Summit Session.

J’ai 5 ans!

J’ai rejoint EBM Websourcing il y a tout juste 5 ans, le 16 octobre 2006. Je profite de la date anniversaire pour faire un très petit retour sur ces 5 années passées chez EBM.

Il s’en est passé des choses depuis mon arrivée, tellement que je ne peux pas tout citer… 5 ans que je travaille sur Petals ESB à divers niveaux. Je suis passé par beaucoup d’étapes: développement, mise en place des outils, tentative de gestion de l’équipe, architecture, support, POCs, conseil, poseur de rustines, procréateur …
5 ans après, je développe toujours. J’ai bientôt 33 ans, je ne suis pas chef et j’en suis très content: Je gère mon projet recherche dans lequel je hacke Petals ESB tout les jours pour fournir Petals DSB; je m’amuse à faire du Cloud; je participe à l’aventure open source à travers le consortium OW2; je rencontre des gens passionnés par ce qu’ils font régulièrement; je code!

Bref, bon anniversaire à moi. Pour les collègues Toulousains, la prochaine fois que je viens c’est bien sur apéro.

Petals DSB is not Petals ESB

Almost true… In fact Petals DSB uses and extends Petals ESB in several ways. When I started to think about extending the Enterprise Service Bus, it was just to avoid all the JBI stuff at the management level i.e. use a real, simple and efficient API. So I added many management stuff exposed as Web services : Bind external services, expose internal services (oh yes bind + expose = proxy), get endpoints, activate things, etc…
One other goal was to avoid to use closed protocols for inter node communication: The ESB uses at least three ports to create inter node communications for JMX, NIO and SOAP. So why not, just using an open protocol like SOAP and just one port? This is what I did, I changed some implementations to use the same port and the same protocol for all services.

All this stuff has been developed focusing on extensibility and easier development. This is mainly because the ESB can be hard to extend for newbies, there are so many things inside… Today the DSB is not only a Distributed Service Bus, it is also a framework so that developers can easily extend the DSB without the need to know how it works inside. Some examples? Want to expose a kernel service : Add the JAXWS @WebService annotation. Want to subscribe to Web service notifications : Annotate you Java method with @Notify. Want to be notified about new endpoints : Add the @RegistryListener annotation. That’s all, you do not have to search for the Web service server to expose your service, nor read all the WSN documentation to receive notifications, … Simple, efficient.

There are other things you can do, mostly all is detailed in the DSB page.

Let’s talk at OW2Con 2011

This year again, I submitted a talk proposal to the OW2 annual conference and it has just been approved by the OW2 management office.

While last year I spoke about some conceptual things around the Distributed Service Bus and the Cloud, this year I will go one step further with some live demonstrations not only dealing with service bus stuff, but also with some BPM tools and the Cloud stack we actively develop in the research team at PetalsLink. Here is my talk proposal:

All the services are moving to the Cloud, so are business processes. In this talk, we will show how to create collaborative business processes using an open source SaaS BPMN Editor. But designing business processes is not enough, why not running them in the Cloud? We will see that we can rely on a completely Cloud-aware SOA software infrastructure combining several open sources solutions such as a Service Bus and IaaS framework. The resulting ‘Cloud Service Bus’ allows the integration of in-house services in order to benefit from Cloud-based features such as elasticity, load balancing, service clustering and migration. This Cloud Service Bus will serve as the runtime basis of the business processes producing a Petals Cloud Stack solution. All in the Cloud, all open source!

I really hope to have time to work on some cool things to add more foggy-cloudy stuff and have things running on a real cloud infrastructure. I have many ideas in my mind these days and it is really really really cool.

Oh and I will also talk a bit about what we are currently building in the Play FP7 project. We have to show things in two weeks at the European Commission and these things are really interesting to share with OW2 attendees and staff.

BTW, I think that there is some free beer social event this year at OW2Con, see you there of course!

Capture Video sous Mac

Aujourd’hui, en lisant l’article de mon collègue Vincent sur la facon de capturer son écran en vidéo sous Microsoft Fenêtre, je ne peux m’empêcher de sortir la version Pomme Mac: plus courte, plus simple. Facile:

  1. Lancer Quicktime Player (fournit avec tout Mac)
  2. Fichier>Nouvel Enregistrement de l’écran
  3. Enregistrer
  4. Il n’y a pas de 4

Service Bus Live Monitoring

I explained in the last articles how I tested the Play Framework, Web sockets and how I integrated all this nice stuff with a real example based on a Service Bus, Web services Notifications, etc…

This time, let’s go one step further. We have a Service Bus which is Web service notification enabled like last time. We can bind services to the bus, expose service endpoints as Web services, blahblahblah… But, this time, I am interested on having some real time monitoring of service invocations. It means that each time a message goes through the service bus (a service invocation in fact), I want to know (almmost) immediatly the service response time.
Hopefuly, the PetalsLink Distributed Service Bus I develop and use provides many extension points. One is the capability to add modules to the routing engine ie the software module each message must be able to go through on service request and response. So adding some router module which catch all the messages, timestamp them and then send this monitoring data to someone is quite easy. At the implementation level, this monitoring router module publishes monitoring reports to the service bus notification engine topic dedicated to monitoring stuff.

So, a client interested in monitoring data just has to register itself as subscriber to the monitoring notification topic. Every time a message is published in the topic, it will be delivered to all the subscribers. Up to the subscriber to display data as soon as it can. This is where Play, Web sockets and some cool javascript library came in. Since I never developed javascript stuff, I tried to find an easy to integrate solution to create some moving plots, asking twitter. I finally found the Smoothie Chart library which is really easy to use and updates graph in real time.

The high level architecture of the system can be defined as

The following video shows the result of the complete stack: Each time a message a service is invoked with SOAPUI, a Web service notification is sent to a Play application which subscribed to the monitoring topic, the Play application then pushes the data to the client by using a Web socket. Finally, the javascript code on the client side feeds the Smoothie chart which updates automatically. At the end, it is quite simple and efficient.

Oh, I forgot to say something: This took me 2 or 3 hours to create all this stuff… The code has been published on github in the dsbmanager-webapp project.

JUG Montpellier : Retour sur la session GAE

Trois mois depuis la dernière session, hier soir était finalement la reprise des soirées du JUG Montpellier pour la saison 2011/2012. L’année commence gentiment mais surement avec une soirée complètement dédiée à Google App Engine – GAE.

Martin Delemotte, CTO chez Kazelys (et accessoirement membre fondateur du JUG Montpellier), société qui édite Vadequa, est venu parler de sa grosse expérience avec GAE devant 80 personnes (oui ça grossit petit à petit!). Présentation des principaux services, contraintes fortes de la plateforme, astuces et conseils étaient au menu de cette soirée pleine d’échange avec le public intéressé. Les questions fusent, les réponses sont claires, parfois simples (ou pas) : “Ca, ça ne va pas être possible…, mais nous allons voir comment faire autrement”.

Il est clair que la majorité des personnes ont été refroidies par les contraintes de la plateforme, mais il est évident que ces contraintes qui sont introduites par le maitre du monde – Google de sont petit nom, sont bénéfiques intellectuellement parlant pour le développeur en question. Il est aussi clair qu’il faut bien réfléchir avant de se lancer dans le développement d’une solution reposant sur GAE. Le simple test bidon que tout le monde a pu faire depuis que GAE est là n’est bien sûr pas suffisant pour se donner un avis sur la plateforme. Sortir de GAE n’est aussi pas si simple, pour peu que l’on ai pas bien désigné son application (oui il faut wrapper, ne pas être dépendant directement des APIs, ne pas utiliser de service spécifique que seul Google fournit, …). Bref, que des points techniquement et intellectuellement intéressants.

Chaque seconde, une machine meurt dans le Cloud

Martin Delemotte – 28 sept 2011

Les slides de la session seront bientôt disponibles sur le site, en attendant quelques photos pas trop floues…

Prochaine soirée dans deux mois sur HTML5, CSS3 et UX. Le mois prochain, on laisse la place à l’Agile Tour…

Mises à jour Twitter