What’s happening with JSR107?

At JavaOne 2007 the JSR107 Expert Group reconstituted and conducted three sessions.

We admitted some new members. Manik Surtani from JBoss is joining. Crazy Bob Lee too.
I was already a member but bot made co-spec lead to help make sure the JSR kept moving.

We decided to conduct technical discussions in the open. For those of you who are interested
you can track these at jsr107@jsr107.dev.java.net. You can go to the project at https://jsr107.dev.java.net/ and subscribe.

It was also decided to use DocBook format for creating the specification, so that multiple EG members could work concurrently. Manik Surtani has committed the current draft spec done by Cameron in DocBook format to the jar107.dev.java.net CVS repository. You can also check out the repository and see what is going on.

We hope to get moving with this and get a spec completed in the next few months. Stay tuned.

Ruby in decline…

At JavaOne 2007 I spent some of my time trying to figure out where things are going. It has always seemed to me that you either knock yourself out keeping up with every last thing (shiny new toy syndrome) or you try to figure out what is going to be important and focus on that (pragmatist). I am in the latter camp, but fortunately I know many people in the former camp. For programming languages I read the TIOBE Programming Index each month.

The May 2007 edition confirms a trend that I mentioned to a few people at JavaOne. Ruby had leveled of at the end of 2006. It is now in decline. From Tiobe’s commentary:

Although, Ruby is the rising star if you look back 1 year, it is not growing more the last couple of months. Even worse, since April it is slightly declining. If this appears to be the new trend, then also Ruby does not become the “next big programming language”.

Java, C and C++ have been dominating the TIOBE index from the start and it seems as if they will keep this status for a long while. Possible new candidates are Lua (from 55 to 23 in 1 years time) and Groovy (from 103 to 52). These are, just like Ruby, lightweight scripting languages. I have the impression there is a maximum to such dynamically interpreted languages. Although very popular for web-based programming, statically compiled languages remain the core of all enterprise software systems.

The significance of the drop in May and the leveling of is that “Ruby does not become the ‘next big programming language'”. I learned both Ruby (and Python) in 2005 in preparation/mitigation of that happening.

Does this mean that Ruby is not important? No.

Firstly, Ruby (and Rails) are having enormous influence on the development and direction of the more entrenched languages and frameworks. In evidence of this I cite what is happening to Java. By Java I specifically include the JVM runtime. Within this broad church we see JRuby, JSR241 aka Groovy, JSR292 invokeDynamic (http://blogs.sun.com/jrose/entry/jsr_292_deep_dive_notes), and numerous influences to web frameworks such as SEAM. I have suggested to Paul Hammant that he create a graphical representation of web framework influences, which would make this last point clearer.

Secondly, if you look at the chart above, Python, JS, PHP and Ruby make up a pretty big chunk. They are not going away. Taken as a group they are slowly growing. So let the appservers and runtimes (see Glassfish V3 and JVM7) run them. If developers do not use Java they will be using Java infrastructure. And just as the dynamic languages run everywhere, so does Java Infrastructure.

So we see that the Sun, and the broader Java industry, is taking an each way bet. Suck up the good ideas from the Ruby community into your own stuff so that you keep your own adherents. Failing that be a great place to deploy apps written in dynamic languages. Either way you stay relevant.

Comparing Memcached and Ehcache Performance

Comparing Memcached and Ehcache Performance

Performance Comparison

I did some research recently on memcached and how it compares to ehcache. The following graph shows the time taken for 10,000 puts, gets and removes, for 10,000 cache items. It uses the latest released versions of memcached and ehcache. In memcached’s case libevent is installed. The computer was a Mac Book Core Duo with 1.25GB of memory. The test used was the standard benchmark used in memcached’s Java client. The client used was the Java client.

The results are that put and gets are 500 to 1000 times faster in ehcache compared with memcached. The grey bar, barely visible, is ehcache with the cache all in memory. The blue bar is with 9,900 of the cache items in the disk store. Even the disk performance of ehcache is way faster than memcached. Of course memcached is entirely in memory.

Why?

The AMP people always make the claim that memcached is really fast. The memcached mailing list has a long thread arguing back and forth as to whether memcached is actually any faster than using the MySQL in memory cache tables. It seems in some circumstances they are pretty close. I think of memcached as a client-server cache.

In the diagram above you can see that each put, get or remove happens over the network between a memcached client running on the web server and a memcached server using the memcache wire protocol. There is network and marshalling overhead for each request.

By comparison, the ehcache architecture is shown below. The cache is local and in-process. The cost of gets is that of referencing memory or loading from disk, with appropriate thread safety.

Puts are really fast because they are always synchronous to the memory store, with transfer to disk or to other nodes in the cluster happening asynchronously by batch.

The performance differences are due to the different architectures.

Implications

In-process caching and asynchronous replication are a clear performance winner.

Ehcache and other in-process caches are very widely used in the Java world. One thing I see happening is new languages reusing Java infrastructure. An example is Grails (Groovy on Rails) which can re-use the Java stack. Grails is using JPA, which lets it use Hibernate and in turn second level caching. Now memcached is typically used with Rails apps running on Apache with the share nothing approach. But now JRuby on Rails is able to be deployed in Java web containers (See ThoughtWorks’ Mingle product which is done this way for an example). There are notes on how to deploy JRuby on Rails apps to Glassfish in a WAR, and Glassfish V3 takes deployment simplicity it even further. The JRuby on Rails (JRails anyone?) folks are planning to move to JPA (from what I heard at JavaOne).

So it seems that regardless of coding in Java, GRails or JRails, you will be able to reuse the Java infrastructure and in particular the in-process Java caches that come with it. And that is a very good thing.

Jonathan Schwartz on open source

Jonathan Schwartz on open source

(Comments from the NetBeans session)

We have been held captive by the Java developers. The future is about reaching out to people without deep expertise.

The number of people passionate about open source licenses far outweighs those who have actually read them. Everyone is a lawyer now.

If I post a hit video to YouTube, someone else is monetising my free content. Something is wrong with that (Me: There is definitely a theme developing with all of these hints about compensating those who create software or content for free. So Sun is not only open sourcing all of their stuff, but paying others for their open source stuff. Wow).

Twitter

Maybe this is one of the new Web 3.0 services. Twitter is about what you are doing. You voluntary allow yourself to be tracked.
Here is my Twitter link: http://twitter.com/gregrluck.
Or to keep things really simple, you can see my twitter “badge” which shows what I am doing is in the left sidebar on this page.

Community One 2007 General Session: Tim O’Reilly, Ian Murdock and others

What is Web 3.0 likely to be?
(my question)

Tim O’Reilly “Meaningless. Most transformative when we stop typing. 411 services Google, gestural interfaces. Each cell phone with an
intertial sensor. Instrumentation of people. Insurance based on GPS. Computers learn from us by what we do in our interactions
in the daily world.”

Tim Bray “Essentially unpredictable. e.g. Twitter. Don’t know but really exciting.”

Other Statments

Ian Murdock “A layer of abstraction is great until you really need to know what is going on underneath it”

Tim O’Reilly “Proprietary databases are the competitive advantage of the future. Critical mass of buyers and sellers made ebay a lock in. No one can touch it. All of the mapping
sites still use NavTeq.”

Tim O’Reilly “Google Competing to give you the result in line, rather than passing you off to another site. Google are starting to compete with their own users.”

Rich Green “Value of a platform is the ratio of the lines of code you write compared to the lines of code in the platform. Web 2.0 has that. What is the Web 2.75 Petstore?”

Tim O’Reilly “Web 1.5 was the Dot.com crash.”

Rich Green “Bill Joy. Where ever you work, most of the smart people are elsewhere”.

Tim O’Reilly “The architecture of participation”.

Rich Green “Scoop up the open source work of others and monetise it. Sun are looking at paying people.”

Tim O’Reilly “Horatio Alger said “Go west young man. You have to find something new.”

Tim O’Reilly “We are coming to the end of cheap outsourcing. Indian outsourcers seeing only 3-4 years of having a wage advantage.”

Tim O’Reilly “Users do their thing out of their own self-interest. “

Tim Bray “You can make money from the long tail but may be not in the long tail.” and Tim O’Reilly “Each long tail is attached to a very big dog”

What’s new in America

I have been in San Francico for a few days now. Coming to the US around once a year I always look for things that are new. As William Gibson said “The future is here now. It’s just not evenly distributed.”
With that in mind, what is happening in California, and San Francisco in particularm, tends to turn up in Australia a few years later.
So what I have noticed so far:

  1. Diet Coke Plus. Diet Coke with added vitamins. Now I can tell my mother my addiction is healthy!
  2. 49 cent Compact Fluro light bulbs. CFCs are the lowest hanging fruit of all to lower carbon emissions. California has jumped in by heavily subsidising them so that they are the same cost as incandescent bulbs. Great idea.
  3. I have not seen a McDonalds yet.
  4. The food servings remain huge, but with lots of salads.
  5. The hot new fast food is Cream Puffs.