No Relation To...


Tuesday, October 13, 2009

Hit the road Jack

Now that I am done with my what took a lot of my time recently, I will be on the road for pretty much the whole month of november all over Europe to spread the word.

First and foremost, I will inaugurate the new MarsJUG (in Marseille) on October 15th. I will be talking about Hibernate Search and how to implement clever full-text search engines using approximations (phonetic approximation etc).

I will also be speaking in Munich at the W-JAX conference on November 10th and 11th. This time I will cover:

  • Bean Validation (JSR-303) and Hibernate Validator 4 (just released)
  • What's new in Java Persistence 2.0. I will spend a good chunk of it to explain the new type-safe Criteria API
  • Hibernate Search and how to do full-text searches with Hibernate-based applications

Next in line is Devoxx where I will give a university talk on Hibernate Search. If you want to know everything about Hibernate Search, this is the time! This is November 17th in the afternoon. This is an interesting format (3 hours), where i will cover a bunch of what is in my book Hibernate Search in Action and do a handful of demonstrations.

Last but not least, I will be speaking at JavaEdge '09 on November 16th in Israel. This time about Bean Validation and Hibernate 4.

If you come by these cities at the right time, come and join me! Between one of these conferences is my birthday :o)

Edit: I forgot that I will be speaking at the ParisJUG on December 8th about Bean Validation. Right after a healthy debate on Spring vs EE 6 (I heard that extra medics and blood supply have been planned)

Labels: ,

Thursday, September 24, 2009

JBoss Community Asylum - a new podcast with bits of me in it

Remember my French podcast Les Cast Codeurs? (Doing well, thank you for asking) Well apparently, I did not have enough and started a new one. In English this time.

JBoss Community Asylum. A podcast on, by and about the JBoss Community and its gazilllllllion projects and ideas. It's available here and the iTunes link is here. Basically, instead of blaming people about the lack of podcasts on the great tech at jboss.org, Max R. Andersen (JBoss Tools), Michael Neale (Drools + cloud thingies) and me have decided to give it a shot. You will get the latest news on from the JBoss sphere and we will likely interview folks about their projects.

Let us know what you think and how you would like it to evolve. It's a low-key bottom-up approach so anything's possible.

PS: I made progress, I am not the sound engineer this time, yeah!

Labels: ,

Tuesday, July 7, 2009

Lies, damned lies, and statistics: EE edition

I came across some figures regarding downloads of Glassfish and JBoss AS that really puzzled me. Basically Glassfish was downloaded 700.000 times a month (end of '08) while JBoss AS was only downloaded around 115.000 times a month at the same. My first reaction was "Well done to you, Sun!" and then I realized that the gap was too good to be true. Let's have a look at these numbers.

For JBoss AS, the Sun team has only counted the direct number of downloads out of SourceForge. That's public knowledge by the way, go there for the JBoss stats.

For Glassfish (according to this), downloads numbers (not public BTW) come from:

Surprisingly, no stats on the direct number of downloads from the Glassfish project page. Let's analyze that a bit.

JDK bundles is the thing downloaded even by my grand'ma by accident. I can tell you right there, she has never ever used Glassfish ( nor JBoss ;) ). How many times, did I download the whole enchilada while I just wanted the plain old JDK!

Java EE SDK. This one is hard. Of course, people interested in EE will go download this package. Are they interested in GF? Hard to say. On the other hand providing a SDK without runtime will do no good.

NetBeans. I'm surprised at the popularity of NB, but there it is. Are all NB users actually GF users? BTW NB also comes with a JDK bundle but I don't know if this bundle also bundle GF :)

Let's call this strategy the Russian doll statistic generation strategy. Frankly, that's not very honest for your users and customers to use this strategy and then compare apple to oranges with your competition. When someone downloads JBoss AS, for sure he did not do it by accident (thanks to SourceForce's sense of UI :) )

So we have two strategies here, JBoss could start playing the Russian doll statistics generation strategy and we can be pretty good at it:

  • include JBoss AS in Fedora and count it
  • include JBoss AS in RHEL and count it (Dell, IBM and the like are pretty good at delivering RHEL on their hardware)
  • include JBoss AS in IcedTea and count it
  • include JBoss AS in JBoss Tools and count it
  • include JBoss AS Core in JBoss ESB, Portal etc etc and count it
  • include the number of downloads from our maven repository (with the number of times you have to nuke your local repo that will be a big hit :) )
  • I've only added a few ideas but for sure our marketing guys can be more productive

Of course we won't do that. An alternative strategy would be for the Glassfish team to only display their direct download numbers (the one they fail to display) and stop using bogus charts in their public and private slides.

On a side note, I find it disappointing that open source projects don't keep their stats open and preferably via a third party provider like SourceForge. Granted the SF stats are somewhat flaky but it keeps everyone honest with their own (lack of) success.

Disclaimer: I am not saying Glassfish is not a success, I am quite happy to have them as coopetitors on the server market in general and Java EE in particular.

Labels: ,

Tuesday, April 14, 2009

Les Cast Codeurs Podcast is born

I have just started a new podcast with a few French open source activists. All about Java, all in French. If you know French, read on ; otherwise, well... learn :)

Les Cast Codeurs Podcast est dans les bacs!

Le podcast en français dans le code sur Java par Emmanuel Bernard (JBoss, Hibernate), Guillaume Laforge (SpringSource, Groovy), Antonio Goncalves (freelance, auteur), Vincent Massol (XWiki, Maven).

Restez informés sur les sujets brûlants de l'industrie Java. Plongez sur un sujet précis avec l'interview de l'épisode. Supportez les radotages de vos hôtes.

Ecoutez-nous et faites passer le message autour de vous !

web: http://lescastcodeurs.com
itunes: http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=312239675
podcast syndication: http://lescastcodeurs.com/podcast-rss
blog feed: http://lescastcodeurs.com/feed/
feedback: commentaire@lescastcodeurs.com

Labels: , ,

Friday, April 3, 2009

Podcast on Bean Validation lastest PFD

I have recently been interviewed by Kenneth Rimple for the Chariot TechCast.

In this podcast, we speak to JBoss's Emmanuel Bernard on the future of validation using JSR-303, the Bean Validation framework. JSR-303 aims to provide an annotation-driven mechanism to mark plain old java beans with annotations, such as @NotNull, @Min, @Max, and can support custom validation annotations as well.

JSR-303 is part of the Java EE 6 suite of JSRs and will be used automatically out of the box by frameworks such as JSF 2.0. Emmanuel also goes into some detail about the current state of Hibernate Search.

You can listen to it here or register to iTunes.

Labels: , ,

Monday, February 2, 2009

Go us

I am usually not the kind of person that likes patting one another on the back. I am always prompt to point out what's left to be done rather that what has been done. But reading Sacha's newsletter to our customer made me proud.

JBoss AS 5 has had record downloads. People were eager to get AS 5 out, so were we.

A fully TCK compliant OpenJDK based Java SE 6 made it into Red Hat Enterprise Linux 5.3. As far as I know, this is the first fully Open Source Java SE implementation certified against the TCK (might be wrong, so don't quote me on that).

JSR 299 (ex Web Beans, newly named Java Contexts and Dependency Injection) is now in its latest public draft review. Gavin and the EG have worked *very* hard to address the EE 6 expert group concerns and pave the road to include this technology in Java EE 6.

The JSR-299 reference implementation is in pretty good shape and releases steadily. I am personally impressed by the quality of the reference guide (alpha 2 here).

RESTEasy, the JBoss JAX-RS implementation is now fully certified and has reached 1.0. I know Bill Burke has been waiting to grab and pass the TCK for a long time.

Bean Validation public draft is out. I also worked very hard too, damn it! ;) We had a lot of positive feedbacks from you guys in our forum. If you want to look at the cutting edge, I release spec snapshots quite regularly on the hibernate-dev mailing list. The latest work includes finalized JPA and JSF integration, type-safe constraint validators, XML support and clearer names.

Also the reference implementation is developped in the open. We hope to get a first milestone release this week or the next one: we did add cool new features you requested in the spec recently (like type-safe validators) and we want to have them in the RI.

A little while ago, Navin released JBoss Cache Searchable 1.0 GA which is based on Hibernate Search. Good stuff: a full-text searchable distributed object cache.

A cool project named JBoss Negociation brings desktop Single Sign On to web apps. Basically, by login to your Windows 2000/XP machine that is secured by an Active Directory and then go to any of the kerberos aware web applications that are hosted by your company in the network, you will have seamless SSO. Their latest GA is here.

That's just my selection of January news. Who said JBoss was sleeping ;) Alright, enough self congratulation and back to work.

Labels:

Monday, January 26, 2009

JBUG Munich: Java Persistence 2 and Bean Validation

Next week, I will be at the JBug in Munich presenting Java Persistence 2 and Bean Validation. If you are around Monday 2nd, come swing by. The JBug Munich website is here for details.

Labels: ,

Saturday, January 24, 2009

DevNexus: human friendly conference March 10-11 in Atlanta

I will be speaking at DevNexus. This small conference is a spin off the Atlanta Java User Group.

Here are a few things I like about the conference personally:

  • There is around 10 presentations over two days, so you will be able to see all / most of them.
  • The price is very reasonable ($150 for early birds), $185 regular price.
  • The size is reasonable, so interacting with speakers is natural.
  • Atlanta in March is very nice.
  • ahem, I will be speaking there, ahem.

I will personally speak about our experience in scaling Hibernate in big environments and how SaaS vendors can face the challenge. I will also discuss Hibernate Shards and Hibernate Search with regard to scalability. And there are nine other speakers at the conference, so check their website.

Labels: , ,

Wednesday, December 10, 2008

Answering questions at JavaRanch + free books

I am doing a session on Hibernate Search all this week at JavaRanch. Manning will give away free books of Hibernate Search in Action for the occasion.

If you have questions on Hibernate Search, express yourself :)

Labels: , ,

Friday, December 5, 2008

JBoss AS 5 is out, Hibernate Search 3.1, Devoxx is warming up and

Great news this week:

  • JBoss AS 5 is out. Congratulations to Dimitris and the many people in and out of JBoss who contributed to it.

  • Hibernate Search 3.1 is out. A lot of good stuffs like performance improvements at indexing and querying time and some cool new features like the analyzer declaration framework (allowing declarative phonetic, synonym, n-gram indexing and searches)

  • Devoxx is very close. Come see the JBoss folks and topics and come to the Seam meetup after the BOF of course :)

Also, on the Bean Validation (JSR 303) side, I am finalizing the last changes in the spec for the public draft. We made a lot of progress in the last two weeks on various subjects including type-safe groups and JPA / JSF / EE integration (with the finalized draft, I will officially contact the EE expert group). Stay tuned, hopefully the draft should be out in a week or two.

Finally, Hibernate Search in Action is supposed to be released in final PDF monday (still not believing in it till I see that one ;) ).

Great week on my side. See you at Devoxx for a drink or two.

Labels: , , ,

Monday, December 1, 2008

Hibernate Search 3.1 RefCard

DZone has a nice Hibernate Search 3.1 6-pages ref card. It is packed with:

  • The list of annotations and their descriptions
  • Hibernate Search's main APIs
  • Lucene's most useful query types
  • Quick examples involving mappings and API usage (including the new analyzer declaration framework)

It's free but you need to register.

Speaking of the devil. John and I have given back our last edits for Hibernate Search in Action. So we are still on target for releasing the book in december. I personally still can't believe I am done, so I will play the St Thomas and will wait till I can touch the paper :)

You can get the paper book at Amazon or on the Manning website. Manning also offers the PDF version.

Labels: , ,

Tuesday, October 7, 2008

Book review and NHibernate Search

Ayende, one of the active bees behind the NHibernate portfolio, has a nice review of Hibernate Search in Action on his blog.

By the way, Ayende has ported Hibernate Search to .net : NHibernate.Search. I don't think there is documentation specific to the project but the Hibernate Search documentation is just as useful.

I don't know Ayende personally, but I can only admire someone that blogs more that I can tweet and still have a full time job :)

Labels: , ,

Thursday, September 11, 2008

Hibernate Search book preview final review: hitting where it hurts for the better

We just had our third review of Hibernate Search in Action. Receiving this feedback has been a humble experience. Lot's of good reviews (good) and some critical ones (even better). Every imperfection we left aside came back in the spot lights of our reviewers.

Based on this feedback, we have been working hard the last two weeks to improve a lot the manuscript:

  • clearer code transcripts with more inline annotations
  • better separation between different parts of the same example (Hibernate API versus Java Persistence API)
  • the code has been updated to the latest Hibernate Search version and cleaned up a lot (no more warning, same comments as in the book)
  • the code now contains README files for easier navigation, ant scripts, Eclipse and IntelliJ descriptors
  • a nice appendix summarizing all annotations, Hibernate Search APIs and Lucene Query classes
  • added an index: I wish I could plug Hibernate Search on the book, that one was painful
  • added a section on testing (mocking, in-memory integration testing, performance testing)
  • better explanation on how query and analyzer are interwoven
  • add the Explanation API description
  • clearer introduction for each chapter
  • much more references than before making book navigation easier
  • all references in the book are up to date. No more Chapter XX ;)
  • improvements on the clustering chapter

The code is almost ready for prime time, we will publish it as soon as we find the right vehicle for it.

Thanks to all our reviewers. While I am not sure I appreciate the recent sleep depravation, this definitely improved the book a lot.

As usual, you can get the preview version electronically at Manning, it has all the chapters and I hope to get the latest changes uploaded soon.

Labels: , ,

Tuesday, August 5, 2008

Remotely send and consume messages with JMS in JBoss AS 5.0

This tutorial will show you how to create a queue in JBoss AS 5 (which uses JBoss Messaging 1.4.1), send a message to a remote queue and listen to the queue using a Message Driven Bean.

I have been playing with JMS queues and MDBs in JBoss AS 5 today to complete the clustering chapter of Hibernate Search in Action and went through more bumps than I should have. Let me share what I've learnt. Disclaimer, I am a JMS noob: this tutorial will go only over the basic concepts. In particular, I will not cover subjects like security, message persistence and so on. This tutorial can be partly reused by Hibernate Search users using clustering (just ignore the part when we send and consume messages as Hibernate Search does that under the hood).

First of all, get a fresh version of JBoss AS 5.0 (currently in Release Candidate 1) here. We will launch two instances of JBoss AS in parallel. If you are lucky enough, run them in two different machines (virtual image or not). If you are not, you will have to remap a few ports to avoid any conflict and this is what I will just describe now.

Go to JBOSS_HOME/server and copy the default directory as master.

cp -r default master

We now have two versions of the JBoss configuration. default will contain our slave instance configuration and master will contain our master instance configuration. Let's now change the default ports on the master configuration. In the master directory, open each file described and change the following ports

  • conf/jboss-service.xml from port 1099 to 1199 (JNDI)
  • conf/jboss-service.xml from port 8083 to 8084 (WebServices)
  • conf/jboss-service.xml from port 1098 to 1097 (RMI)
  • conf/jboss-service.xml from port 4446 to 4447 (Remoting)
  • deploy/ejb3-connectors-service.xml from port 3873 to 3874
  • deploy/jbossweb.sar/server.xml from 8080 to 8081 (HTTP)
  • deploy/jbossweb.sar/server.xml from 8009 to 8010 (Apache connector)
  • deploy/http-invoker.sar/META-INF/jboss-service.xml from port 8080 to 8081
  • deploy/jmx-remoting.sar/META-INF/jboss-service.xml from port 1090 to 1091
  • deploy/messaging/remoting-bisocket-service.xml from port 4457 to 4458
  • deploy/remoting-service.xml from port 4444 to 4443
  • deploy/remoting-service.xml from port 4445 to 4442

This step is only required if you use the same server to run both instances. There is an alternative and more elegant approach described here (thanks Julien for tweeting me the answer after I did all the hard work :) )

You need to make sure JBoss Messaging has a different ServerPeerID between different instances. Update deploy/messaging/messaging-service.xml, and set ServerPeerID to 1 (the default configuration uses 0)

We will now create the queue in the master instance. Open deploy/messaging/destinations-service.xml, and add the following fragment

<mbean code="org.jboss.jms.server.destination.QueueService"

      name="jboss.messaging.destination:service=Queue,name=hibernatesearch"

      xmbean-dd="xmdesc/Queue-xmbean.xml">

      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>

      <depends>jboss.messaging:service=PostOffice</depends&gt;

</mbean>

A queue is an MBean object, you can refine it's configuration as explained in the JBoss Messaging documentation. As a start, you can simply copy the fragment and replace hibernatesearch by the name of your queue. The queue will be available in JNDI under queue/hibernatesearch (this can be overridden if needed). If you start the master instance of JBoss AS (go to JBOSS_HOME/bin and launch ./run.sh -c master), you should see the following lines in the console

19:27:46,403 INFO [QueueService] Queue[/queue/hibernatesearch] started, fullSize=200000, pageSize=2000, downCacheSize=2000

The next step is to publish a message from the default JBoss AS instance into the queue. Here is a simple servlet doing so:

@Override

public void doGet(HttpServletRequest request, HttpServletResponse response)

    throws ServletException, IOException {

    QueueConnectionFactory factory;

    Queue queue;

    try {

        Properties jndiProps = new Properties();

        jndiProps.setProperty("java.naming.provider.url", "jnp://localhost:1199")

        InitialContext initialContext = new InitialContext( jndiProps );

        factory = (QueueConnectionFactory) initialContext.lookup( "/ConnectionFactory" );

        queue = (Queue) initialContext.lookup( "queue/hibernatesearch" );

    }

    catch (NamingException e) {

        throw new Exception( "Unable to lookup queue", e );

    }


    QueueConnection cnn;

    QueueSender sender;

    QueueSession session;

    try {

        cnn = factory.createQueueConnection();

        session = cnn.createQueueSession( false, QueueSession.AUTO_ACKNOWLEDGE );


        TextMessage message = session.createTextMessage();

        message.setText("Pass it along");

        sender = session.createSender( queue );

        sender.send( message );

        session.close();

    }

    catch (JMSException e) {

        throw new Exception( "Unable to send message to JMS queue", e );

    }

    finally {

        try {

            if (cnn != null) cnn.close();

        }

        catch ( JMSException e ) {

            log.warn( "Unable to close JMS connection", e );

        }

    }

}

A few things are noticeable here:

  • we override the JNDI URL to point to the master JNDI host and port: if you run the master instance on a different machine (without remapping ports), the URL will look like jnp://master.host:1099.
  • to look up the factory we use /ConnectionFactory. Do not use java:/ConnectionFactory as this value points to your local instance (I lost a few hours here, thanks Clebert for the hand!). If you want to change this name, open deploy/messaging/connection-factories-service.xml and add a new binding under the JNDIBindings attribute.
  • always close your connection in a finally block to avoid connection leaks

On the master side, you can deploy a MDB (a trivial task with EJB 3 as no deployment descriptor is needed).

@MessageDriven(activationConfig = {

    @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),

    @ActivationConfigProperty(propertyName="destination", propertyValue="queue/hibernatesearch"),

    @ActivationConfigProperty(propertyName="DLQMaxResent", propertyValue="1")

} )

public class MDBPassOnController implements MessageListener {

    private final Logger log = LoggerFactory.getLogger( MDBPassOnController.class );


    public void onMessage(Message message) {

        if ( !( message instanceof TextMessage ) ) {

            log.error( "Incorrect message type: {}", message.getClass() );

            return;

        }

        TextMessage textMessage = (TextMessage) message;

        System.out.println( textMessage.getText() );

    }

}

The new embedded console (to come with JBoss AS 5 final) based on a stripped down version of JBoss ON will make some of these steps much easier but now that you have gone the roots way, don't you feel stronger? :)

Labels:

Thursday, April 24, 2008

Why would you pay for JBoss products?

Andy posted some of the reasons why you would want to use the JBoss subscription based platforms rather than the .org projects. During this exercise, he hinted some of the reasons why JBoss moved from a model where the community version was supported to a model where an enterprise platform is supported. He did not go far enough in his explication for my taste.

One of the fundamental reason (other than the financial one) for such a split is that supporting all the community releases do not work in the long run. Some customers want 5+ years of support on a product line and it is simply impossible to support every single community release for 5 years.

There are two main strategies from here:
  • slow down the release cycle and freeze innovation to match the 5 years customers
  • leave the community projects release early, release often, innovate like crazy and fork them to do an Enterprise pace version
The first model is not viable: it can work great for proprietary software but is fatal for open source software.
In the second model, an enterprise version is created every n community versions. This is where the support, packaging, service and advanced QA is provided. Packaging and QA are the ice on the cake, the five year support is really the meat (assuming a meat cake with ice is good :) )

Speaking of QA, yes deep internal QA is important and leverage bugs upfront but I trust the community QA more than any internal QA (more hands, more eyes, more time). I wish good luck to MySQL on their enterprise only features (semi-closed or closed source) but I think that will lower the quality of these particular features (less eyes, less hands, less time): my bet would simply to use the MySQL Enterprise version but not the "select" features. As Sacha like to say, in the JBoss Entreprise versions we remove features, we don't add them: unstable or experimental features are removed from the enterprise version. It's about less not more.

Generally speaking the support problem is interesting and usually kicks a company around its 5th birthday. The wannabee Platform as a Service contenders will face the same problem... in 5 years. "What do you mean the cloud where my data lives is too old??? Which version of the Cloud are you at?"

Labels: