What makes standards stick – the server side java symposium

EnterpriseDB is talking about standards in the contest of PAAS (platform as a service). Looking at the forefront of a paradigm shift with cloud.

Java has been number one on the tiobe index for five years. Objective C is currently at number eight. It is an interesting measure because it uses number of jobs, books, etc to calculate rankings.  Java was an evolution of C++ and solved a problem.

Evolution needs to happen or there is that opportunity for something else to replace it.

J2EE was successful because the major companies backed it on day one. Part succeeded (servlets) while art failed (ejb) [jdbc listed as success, but that isn’t jee]. EJB was too complex and alternatives came up like Hibernate and Spring.   The speaker did credit the mess up of EJB with people adopting Spring.

“open source became an alternative to a deficient standard”

Success criteria: solve a problem, developers love, standardize, be open source, be first. Do not need all of these, but more help.  Also listed Microsoft support as a benefit

There were a few typos in the presentation which i found distracting.  Basically the session was a history lesson with some interesting points. I was relieved was not a sales pitch.

Once people move on, they don’t come back. Even though EJB 3.1 is “as good as” Spring, people have already switched.
Who will own the cloud? Who knows? Time will tell.

Performance tuning – the server side java symposium

The presenter started with a disclaimer.  Not for legal like Oracle.  To emphasize that advice needs common sense and to be checked for applicability to your system.

Applications are slow because they are waiting for something. Need to find out what that is.  We generally start looking in our application. But we should start with a larger view of hardware/os,  jvm/memory, and actors/usage patterns.

Tips

  • Make sure your test system is as close to production as possible. This includes the amount of data so you aren’t caching away your problem. In other words, you want to make sure you are solving the right problem.
  • keep going until meets requirements or user decides to stop paying for performance improvements, whichever comes first
  • Remember to benchmark before/after each change so know if worked and the impact
  • Know how much CPU you can use. Even if you are only using forty percent, adding CPU does not help if you are only allocated forty percent
  • Knowing which process using CPU helps. Is it your algorithms or the JVM for garbage collection or nothing in which case it is waiting on some other resource
  • After CPU, go on to other diagnostics such as memory, paging, etc
  • Want system to be calm when testing so can use CPU as a benchmark

The Tooling
The presenter ran an example to walk through the tools

  • Added XX:PrintGCDetails
  • JMeter – shows average time for points of interest real time. Both in numeric format and in a running graph.  Found an out of memory error. Noted better to analyze garbage collection before increasing memory
  • VisualVM – use memory profile to profile object allocations and GC. The count will show objects leaking because it will survive every attempt to collect and create more. The increasing generational count will show the leak.  Note you can instrument every X counts instead of each one to save space.  Can see it happen real time as you run.  Then you can take a snapshot [ the snapshot view is what I’m used to seeing for CodeRanch work]. The monitoring tab shows in graphical format. the heap analysis shows all instances of objects of a certain type. Pick on at random and see heap walk. Select nearest GC root, this takes a minute or so.  The GC root is what is anchoring it to live memory.
  • Visual VM – use threads view to see if thread pool can be increased. Are there enough threads servicing the number of users?  One way to tune is to set the thread pool size larger and then scale back until it is good.
  • GC.log – a number of graphs on garbage collection statistics – how long it takes, distribution, etc
  • Censum – garbage collection log analysis tool that hasn’t been released yet. It shows stats and distributions on the generations

Fixing the jcp – the server side java symposium

The official title of this session is “The Java Community Process – What’s broken and how to fix it”.  The panel is James Gosling, Patrick Curran (head of the jcp) and Reza Rahman (member of jcp expert groups and author of EJB in action)

What’s wrong

  • Some inherent because so many priorities and agendas. these predated Oracle
  • Apache Harmony TCK issue (Apache Geronomo doesn’t pay for TCK because non profit open source. The problem with Harmony is that it has restrictions). Reza would like to see it free, no strings attached after the lawsuit.
  • Patrick said Oracle is more forceful than Sun in that they make a stand rather than bicker forever
  • Reza said James is too bright but not practical enough :). He views Oracle as being more practical. Reza noted leading is hard and getting people to agree is hard. He views Oracle leading as a necessity because they have the resources to be a JSR lead.   James noted being a spec lead is a full time job even if things go smoothly.
  • In 2007, Oracle tried to create an organization so sun would have less power. Now that they are in charge, they want to retain ownership. Logical position at least.
  • Process issues -greater transparency so don’t have to be a JCP member for read only view
  • Reza views a big problem as lack of individual participation in the JCP. Reas the proceedings, blog, be spec leads, etc. Democracy is participatory [yes, but this isn’t a democracy, right after i wrote this Cameron noted SpringSource and Google are leading by example. Reza said that sounds like Microsoft. and it does.  Except that Sun copied from Spring extensively. James noted that innovation in the String class would be dangerous]

What could be better

  • Reza recognized it is hard to have an independent JCP. It requires resources, a way to move forward without veto bpower, etc
  • Patrick noted that all standards groups have these political obstacles because companies or countries have different interests. The fact that they are trying to work together is a good thing.
  • Patrick noted things are better than they look. Some groups have mailing lists that be read.  Oracle is looking at making things more open and expect to mandate transparency via an open mailing list. Similarly for formally tracking comments. The executive committee has been publishing minutes for several years.
  • Patrick noted they are looking at making it easier to join. In particular, creating a simpler legal agreement for non-spec lead roles
  • Patrick pointed out standards take time. It is more important to get it right than fast. It is avoiding unnecessary waste that matters

audience questions

  • Role of spec evangelist separate from spec lead?  Reza said don’t need formal role. Independents on JCP should blog and do this
  • More people shipping products dependent on platform?  oracle working on balance. Also looking at letting java user groups join so members can contribute
  • What can someone do to help without spending a lot of time?  Follow JSR interested in. Read the spec and comment without joining group. Mny JSRS are open source comments. Reza listed following jee articles on theserverside and javalobby and leave comments for actual jcp members to read and convey. Similarly for the comment period. [this was my question, a lot of the answers sound quite time consuming to me. Reza did list a short one which I appreciate]
  • Developers wait until something is stable to try it because working our own problems. By then it is late in the game to comment. Everyone agreed the proposed final draft and reference implementation IS that