tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@gmail.com>
Subject Re: OPEN EJB most recent version and POJO's.
Date Tue, 07 Jun 2011 07:05:41 GMT

On Jun 6, 2011, at 4:15 PM, Zachary1234 wrote:

> 
> However, if I wish to access the pojo outside of openEJB,
> or even on another network pc, the way to go is JNDI.
> Is there an easy way to bind a class or interface pojo
> to JNDI?  Will just @JNDI (with an optional name)
> at the top do the trick?

I suspect you might be falling victim to the "EJB is bad and heavy" marketing.

Here are some performance numbers
  
  240,000   http://people.apache.org/~dblevins/pojo-performance.png
  212,000   http://people.apache.org/~dblevins/openejb-3.1.4-local-performance.png
  112,000   http://people.apache.org/~dblevins/openejb-3.1.4-remote-serverside-performance.png
   31,600   http://people.apache.org/~dblevins/openejb-3.1.4-remote-clientside-performance.png

Each with 20 threads invoking this object https://gist.github.com/1011785

The first numbers are the class being invoked via calling it directly, not as an EJB.

The second set of numbers are it being invoked as an EJB via its @Local interface.

The third set is it being invoked as an @Remote EJB, but still inside the vm of the server.
 We use the same code for Local and Remote interfaces when calls are in the same VM as the
server where the bean lives.  Under the covers the only actual difference is we have to perform
an extra serialization step as required by the EJB spec.

The fourth set is it being invoked by a client over the network.  Now we're getting into sockets
and networking hardware.  It looks bad next to the pojo and local calls, but it's actually
pretty great.  To put in perspective, last time I did this measuring I added Jetty to the
picture as it's known to have great performance.  Our socket handling code came in about 3x
faster.  It's not apples to apples as they are designed for different things.  Here's the
details on that:

  http://openejb.979440.n4.nabble.com/Remote-client-performance-td987613.html

Also note, you get some pretty create failover support in the ejb client code:

  http://openejb.apache.org/3.0/failover.html

Happy to give all the setup code if you want to do some playing on your own.  Uses all open
source tools.


-David


Mime
View raw message