J-Spring: That’s it for today

I’ve decided to skip the last round of sessions, it’s sunny today and air in the session rooms is very warm and stale. Also the battery if my phone is almost dead. 🙂

Update:
I’ve updated all the posts of today, checked spelling, adjusted tags and uploaded photo’s. Enjoy….

J-Spring: Brainfuck’s quest for CafeBabe – a journey through JVM land

Jeroen Benckhuijsen has this oddly called session about implementing a certain language on top of the Java VM. He’s telling a bit about implementing a custom language using pure byte code.

He’s using an interesting approach. Weird slides with a funny story.

It’s a technical talk about the how class files are laid out and how they work with the Java memory model. It’s a lot info available on the web. So I’ll shut up now. I’ll post links later.

IMG_0081.JPG

J-Spring: SOA, it’s a hard knock life

Tijs Rademakers has a presentation on SOAs in practice. What problems do you encounter when implementing a SOA. After having discussed the advantages of SOAs he dives into the rumours that SOA is dead. But hey, services are the future. Anne Thomas Manes has a contradicting statement.

It is true that SOA has not proven to reduce costs. SOA projects take longer to implement because the services have to be implemented in a re-usable way. Often a SOA project boils down to an ESB selection, but is that deciding on what SOA architecture you want to implement? Discussions often focus on the implementing technology and not the underlying SOA architecture.

Tijs introduces a case study. A COBOL applications of 14500 function points. It has been transferred to a SOA based architecture. A lot of companies belief that implementing everything as a web service is the same as implementing a service architecture. But SOA is more then that. While a bottom up approach might work, a top down view is important as well. Implementing reusable services is only possible if you take the surrounding architectural landscape into account. A canonical data model is important to facilitate a standardised data language for all services.

SOA architectures are built according to a plan, but the legacy application being replaced is also often built based on a clear plan. Code is reused is built according to an architecture of days gone by.

Is the entire web of systems and services defined within a SOA application really that much simpler then a legacy system?

Is a SOA something you should do? And if so, what technologies should you use? Is an ESB a requirement or any of the other standards. (SOAP,WSDL,WS-,SCA,OSGi,etc.)

Implementing a service is easy. Just add @WebService. A top down and bottom up is available. The same goes for REST services with Jax-RS.

Java – XML binding can be challenging. You often need to write some custom code. This is due to JAXB v1 API. But there are better frameworks available. JAXB2 JIBD XSTREAM. New languages show the way to the future. Some aspects should be ported to Java.

It’s a bit of a strange presentation. First it’s all SOA, now we’re talking Groovy??

SCA is a good option, with it’s declarative configuration and flexibility in choosing the actual implementing technology. I should read up on SCA a bit.

OSGi is also a very impressive platform. A lot of implementations using OSGi are emerging. It supports all the service oriented functionality. Wso2’s Carbon is a nice example.

Next topic, does SOA entail the usage of an ESB? An ESB is a platform you can use to implement a SOA. but it’s just a platform with a high risk of vendor lock-in, under the hood it’s all custom proprietary. You always need custom code to integrate an ESB. Vendors push ESBs as the way to implement a SOA, but it is often nothing more then a tool to create a nasty lock-in. An ESB does a lot, use it, but be careful for the lock-in trap.

An ESB often only hides a lot of shit on an overview architecture slide.

An alternative would be a sort of guerilla SOA. Unlock lots of systems with restful services. Then don’t define a lot of rules and let it grow. All you need at a certain point you need a good way to resolve the locations of services.

In the end you need business level support to be able to do a service oriented approach. Also business has to be made aware of the initial impact of a service approach. But also of the long term benefits. Consolidation of services and systems is recommended. But never forget that business often steers on short term goals while they should look at long term goals.

IMG_0080.JPG

J-Spring: half time keynote Mod4J

Jos Warmer has the midday keynote. He has an introductory talk on the Mod4J project.

Jos is an MDA enthusiast and as always makes a case for the model driven approach. Check the Internet for more details. I’ll post some links and info later, now I’ll just sit back a bit and relax a bit before jumping into the remaining sessions.
IMG_0078.JPG

J-Spring: java programming in a multi core world

Angelika Langer has a talk about multi threaded programming in a multi processor environment.

Due to CPU developments new issues arise in current applications when newer CPUs are used. The JVM now has more and more functionality to support multithreaded/multicore environment. The java.concurrent package. Available since java 5.

The new CPUs demand a-synchronous approach. Therefor the java NIO api was born. In java 7 they are planning for a-sync file io.

JMS is a result of the need for a-sync operation.

Ajax results in more and longer running network operations. Long lived http requests results in more overhead in the io layer of the server.

The java memory model is an abstraction of the underlying hardware memory models. It addresses atomicity, visibility and ordering. Angelika details some examples.

So far a very high level overview.

Sequential consistency does not exist in the JVM. It’s a mental model used to teach multithreaded programming, it is not guaranteed by the JVM. You have to use language construct to enforce proper visibility. Synchronisation ensures proper execution order and prevent trashing half written objects and variables. To ensure a proper execution it is required that you force updating main memory by using the volatile keyword.

Visibility is ensured when using explicit synchronisation, thread start and termination, read/writes of volatiles and first access of a final field.

Volatile is not transitive, it is only applicable for the reference marked as volatile. She shows an example of the non volatile field. But since Java 6 there are some changes to the memory model. Changes to members of a volatile reference are propagated when they’re performed before modifying the volatile reference itself. Complicated stuff that breaks easily.

Volatile is cheaper then synchronisation, but still there’s a cost.

Amdahl’s law. Look it up, good stuff. Double the hardware will not double the performance. It depends on the amount of parallel execution paths.

It is an easy trap to think that having a queue for inter process communication will not contain blocking behaviour. Try to have the absolute minimum of synchronous code if performance is key.

There are techniques to avoid serialisation. Use immutable copies, use thread local objects instead of shared objects. Lock free programming gaining popularity, volatile declaration is still required though. Compare and Swap is an example of a technique to allow lock free programming. There are some things on the horizon, like transactional memory.

IMG_0075.JPG
IMG_0076.JPG

J-Spring: JEE 6 and JavaFX

Paul Bakker kicks of. He’ll talk about coupling JavaFX to JEE 6. He’ll do this by using Jax-RS.

He mentions the strong points of JavaFX. He also mentions the drawbacks of JavaFX too, there are no UI components yet.

JavaFX is a completely new language targeted at the RIA platforms. Silverlight, Flex and Flash.

He goes on to describe the relevant parts of the new JEE6 spec. Especially the web profile will be an interesting part of the spec. New versions of various API’s will be released. Jax-RS is interesting in the context of this talk.

Download Glassfish v3 to start with Jee 6. Everything will be deployed as war files.

He describes the architecture of the demo application. He also implemented a desktop JavaFX application as well.

He will show a demo now…. ah too bad his vm Vista image is stalled. Hope he has more luck later.

JSF 2.0 highlights:

  • Facelets
  • Annotation support
  • Ajax support
  • Resource loading
  • Project stages

Javafx runs in an applet in a browser or as a desktop application. The applet can communicate through javascript. Hope this works better then the time I tried to integrate an applet through javascript.

JavaFX will be used as a rich control on the web page.

Put a link here to the appletstageextension api. Also look for api to interop between javascript and java (aka. LiveConnect). Paul shows how in a NetBeans window and a live example.

Next up a little info on how to integrate an Applet within your web application. Do not hardcore the urls, let the applet ask for the server address tom the current context. Look for something called codebase. Be sure to expand the method called “getProperty(java.lang.String key)”.

Demo time in the Vista VM again. Failed due to windows defender this time. Poor Paul, I can tell he’s bummed about it.

Some info on how to work with JSF @ManagedProperty and @PostConstruct. Usageof the javafx javascript method is shown, it loads an applet into your web page with a single javascript call.

JFXtras is a project that fills some of the gaps in the current javafx implementation. Code of the MigLayout in JavaFX is shown.

Now Jax-RS is discussed. REST is discussed. Looks simple to implement with Jax-RS.

Now his laptop seems to have died completely. Ah it works again. But now his remote is acting up a bit. Lot of bad luck for Paul today, but he remains well composed and continuos his talk.

How to use light ejbs, how to use jndi. Something new, global jndi, javafx web service api (Pull parser, XML and json supported, no soap support)

IMG_0072.JPG

J-Spring: Bert and Oscar

These two goons were making a dangerous appearance at the NL-Jug J-Spring event. Don’t they look tough to you?

Be sure to pay proper respect to these two friendly guys. They’re my colleagues, or I’m their colleague. Whatever rocks your boat. Anyway, say “Hi!” to them for me when you meet them.

Thanks for posing for this picture guys. 🙂

J-Spring keynote: Agile@Atlassian

Sherali Karimov has the keynote slot. He’s giving a talk on Agile. He shows a short movie about agile development. Standard blurb on agile, it’s not a methodology you idiot!! It’s about the values embedded in them. 🙂

Next the metrics that agile will bring a company on the long run:
Collaboration: email pile is bad, wiki is good, task management is good too. Code reviews are good too, they’re a learning tool.

Culture of improvement: People are to be allowed to make changes and empower the employees. Engine room? Small teams, and short iterations. The disturbed? Log hassle and shorten these hassle sources. Dump QA button clickers, enter Blitz Test. (What’s Blitz Test? Exploratory testing.)

Transparency: Eat your own dog-food. Issue tracker is public facing, users can see current issues. Documentation is also maintained publicly. Support for open source, projects are allowed to use products if they’re open source.

Metrics and analysis: Know what to solve, is the change an improvement? Dashboards should make looking at metric data pleasant and fast.

Agile is about the individual within the company.

He sure is a believer. 🙂 Now he says how wonderful and easy (??) it is to implement in big bad company. Anyway, start small and targeted. Perhaps it’s easier then you think. Again Agile isn’t a methodology, it’s a set of beliefs.