- Blog Xebia France - -

Posted By Xebia France One on Monday, September 22nd, 2008 18:50 In Review of the papers 2 Comments

Review of the papers Xebia
The review of the papers of actuality Popular dance / weekly J2EE offered by Xebia.

Agility

The corner of technology

Agility

Discipline and agility

In this , Claude Aubry reminds of us who agility has rules to be respected. Indeed there are many people who think that agility allows to face up the unexpected faster. It is not at all times case, because agility has rules that it is necessary to respect (management of the backlog, priorities) so that sprints take place in good conditions.

The corner of technology

Division memory and JVM, compactez your Big Heap

If the description of the different algorithms of Garbage Collection is relatively easily on the Web, not much these describe how manage the division of the heap. Even if the life of objects is very short on average (in an application of management), JVM can avoid the management of bigger objects the life of which is more important. The division of memory is unavoidable. They think that this one to attain applications 24/7 not much easily 10 % memo for and as a result can be reason d OutOfMemory.
In his article Ghost in the Popular dance Virtual Machine, Nick Maiorano describes us the different mechanisms of compaction whose these main principles are drawn.
Two principles of compaction:

  • Keep a trace of fragments and re-allocate them as soon as it is possible. This implicates the displacement of objects and the update of objects classifying them. This operation is made possible only during FULL GC. Second problem, with this mechanism, it is possible that two objects created at the same time classifying mutually are dispatch s on two physical pages of memory.
  • Copy the living objects in another part of memory by ranking them in turn. With this method memory is always reorganised and objects find themselves concentrated in the same zone of memory, what can improve performances.

We let you consult the rest of the article comparing the functioning of algorithms of compaction of JVM JROCKIT of BEA and Hotspot de Sun.

Inquisitiveness on Maven 2.1.0

Two interesting articles on the blog of Brett Porter, commiteur Maven.
An article on the online bet of Maven 2.1.0 milestone 1, with a list of some functionality which will be added to this version (besides better performances).
And an article on the plugin reactor, who brings some functionality which should be found integrated of base to Maven 2.1. Following scenario is given in example: a build of 10 minutes plants at the end of 9 minutes because of an error on a dependency. Error is corrected, and the plugin reactor allows to take back the build where he planted. Nice!

Improve the performances of Tomcat in production

The shape failing Tomcat answers production most needs in. He is besides easy of tuner slightly the server of application to optimise the performances of this one.
Filip Hanik and Mark Thomas give us some tracks in their Webinar accommodated by SpringSource.
We will list here the main notable facts of this optimisation, seen across 3 big subjects (we will not voluntarily treat here optimisations of JVM, more "admitted  ).

Tuning of logs

  • The file catalina of exit of the console (java.util.logging.ConsoleHandler) has as limitation not to give rotation. There is a risk therefore of overflow. It is possible to replace this handler with one org.apache.juli.FileHandler (daily rotations) or one java.util.logging.FileHandler (rotations by date or in the volume of file to tell the saturation of discs).
  • The logger by default is synchronous, what can become a narrows of strangling. The use of an asynchronous logger can therefore improve performances but no realisation is included in Tomcat.

Tuning HTTP and TCP / IP
Before attacking these improvements, it is important to include protocols TCP / IP, the functioning of CPU and concepts of load balancing.

  • Sessions TCP: HTTP Keep alive allows to improve response time by avoiding some HANDSHAKES TCP; however, the increase of the consumption of resources servers can harm sites with strong competition of access.
  • TCP FLOW CONTROL: although the IPA - INTERNATIONAL PHONETIC ALPHABET Servlet is based on blocking IO, Tomcat optimises the service of static contents with connector cables NIO and APR, thanks to not blocking method SEND_FILE.
  • Main parametres in configurer:
         - maxThreads : typically between 200 and 800, 400 being a good initial value.
         - maxKeepAliveRequests : typically between 100 and 200 (SSL, APR / NIO CONNECTOR) or 1 to deactivate "Keep Alive" (of SSL, BIO CONNECTOR, very strong competition, etc).
         - acceptCount (backlog TCP): typically between 50 and 300.
         - connectionTimeout (SO_TIMEOUT), the time maximum between two packets TCP: between 2000 in 3000 ms am often optimum, even by speeding Keep alive up.

What connector cable to choose?
It depends on needs of application:

  • BLOCKING IO CONNECTOR:
         - The majority contents am dynamic
         - Keep-Alive is not important
         - Reliability is a priority
  • Apache Portable Runtime Connector:
         - Tomcat manages the ENCRYPTION SSL: the realisation SSL of APR (OPEN SSL) is much quicker than that of JVM and HANDSHAKES blocking SSL improve performances
         - Keep-Alive is important
         - A lot of the contents are static
         - Functionality Comet de Tomcat requires a not blocking connector cable (APR or NIO)
  • NIO CONNECTOR:
         - Connector cable not blocking as APR CONNECTOR
         - Unlike APR CONNECTOR who requires the native APR bookshop, NIO connector cable is portable on all platforms
         - NIO CONNECTOR benefits by the optimisation SSL brought by OPEN SSL
  • AJP CONNECTOR:
         - Disadvised, he is not more competitive than connector cables HTTP and is on the other hand difficult to troubleshooter.

In doubt, use the connector cable BIO (the most ripe, who will not crash and who auto manages the Keep alive)

Static contents

  • Connector cables APR and NIO give optimisation SEND_FILE
  • Tomcat gives a mask (e.g. <Context cacheMaxSize="40960" cacheTTL="60000" cachingAllowed="true"> ) of static contents. However, this functionality does not compete with a proxy hide as Squid or mod_cache)

Mockito gives itself a face-lift.

If you apply 10 command of the unit tests (cf 7), the exit of the version 1.5 Mockito should appear to you as a good news.

Main difference between this framework and its rivals ( and ), Mockito can go without expectations and prove the behaviour of an object in posteriori. This functionality allows to reduce considerably the size of the setup of tests, and to make them more legible.

Besides, as Mockito has a syntax very similar to that of EasyMock, it is easy to refactorer some tests to try it, and why to adopt not him.

Popular dance EE 6 and his LAUGHED

This week, Antonio Goncalves, member of the group expert of JSR POPULAR DANCE EE and co-founder of , reminds us of the next arrival of Popular dance EE 6 at the beginning of 2009 and recapitulates the list of the main reference realisation of the different bricks and his specifications:

Specifications LAUGHED
EJB 3.1 SERVLETS 3.0 GlassFish V3
JPA 2.0 EclipseLink
Web Beans 1.0 JBOSS SEAM
JSF 2.0 Mojarra
Jersey
JAX-WS 2.2 Metro

A preview of Popular dance EE 6 was besides performed this month in PRICETON JUG of whom here is the summary. An also preparing session in Paris JUG, she is envisaged for the moment for next January.

News of Popular dance 7

Not false alarm! From UMBRELLA JSR on the horizon

Article printed from Blog Xebia France:

URL to article: / 2008 / 09 / 22 / revue-de-presse-xebia-75 /

Click here to print.