Most interesting links of November
This month has been quite interesting, among others I 've picked up several blogs by Adam Bien. I really like his brief, practical and insightful posts :-)
Java, Jave EE, architecture etc.
Java, Jave EE, architecture etc.
- EJB 3.1 + Hessian = (Almost) Perfect Binary Remoting - "With hessian it is very easy to expose existing Java-interfaces with almost no overhead. Hessian is also extremely (better than IIOP and far better than SOAP) fast and scalable." See also the discussion regarding a "DynamicHessianServlet" (which would be more comfortable then creating a new servlet for each service).
- Binary XML - Fast Infoset performance results - FI is the name of a standard for binary XML encoding and also of its OSS implementation; according to these measurements (with default settings, compared to Xerces 2.7.1), on average: The FI SAX parser is about 5 times faster than the Xerces SAX parser, the FI DOM serializer (using default settings) is 25% to 30% faster than the Xerces DOM XMLSerializer, and FI documents are 40% to 60% smaller than XML documents (i.e. it can provide modest to good compression). And: "The use of external vocabularies can be a very effective way to increase the efficiency of parsing, serializing and size at the expense of the fast infoset documents no longer being self-describing ... ." For the interested ones: FI is built on ASN.1, a standard for describing data structures in a way that is independent of machine architecture and implementation language, it also includes a selection on different binary encoding rules, e.g. DER (triplets tag id - length - value).
- EJB 3.1 And REST - The Lightweight Hybrid - Why to use @Stateless - there have been recently discussion about Spring vs. EJB and whether @Stateless is of any use. According to this article, the added value of EJB (though some are provided also by Spring) include injection capabilities, transactions, single threading model (for why that is good see #2 on Why I like EJB 3.0/3.1), visibility in JMX, concurrency restriction via thread/bean pools.
- Why Service Isn't A ServiceFacade, But ServiceFacade Is Sometimes A Service...
- Experiences from migrating Hyperic 4.5 from EJB/JBoss to Spring/Tomcat, what good has it brought - simplified unit and integration tests, simplified code thanks to Jdbc/JmsTemplate, ... (My comment: EJB 3.1 would certainly bring at least some of the advantages too.)
- Tuning the IBM JVM for large heaps - tuning 64b IBM JVM 6 with 100GB heap to have acceptable GC times (~ 1/2s as opposed to 25s with the default settings)
- BigMemory: Heap Envy - there have been recently a lot of fuss about Terracotta's new BigMemory, a GC-resistent many GB cache space (using NIO byte buffer). This post discusses it's disadvantages and compares it with a solution based on ConcurrentHashMap, comming to the conclusion that the old good ConcurrentHashMap outperforms BigMemory considerably.
- Mind-breaking TDD exercise - Thought-provoking TDD exercise at the Software Craftsmanship conference - a TDD exercise with strict rules requiring to only write implementation in the test itself and then refactor it out as needed. I'd strongly suggest that you try to do it by yourself. There is a more detailed report from a tic-tac-toe version and a bit about implementing a message interceptor in this way. An interesting observation: "differences from a pre-conceived design and the one that emerges from code are considerable, the latter being a lot more elegant and better suited to describe a problem."
- To code quickly, you must quit coding (Pomodoro etc.) - why Pomodoro technique (concentrate 25m on work rejecting interruptions, then take a break) and similar ones work
- Colorize Maven output in Linux/bash via filtering of Maven’s mvn command output using sed. (Thanks to Alda for the link.)