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.

Javaone 2009 Refer a friend

Last week I my manager told me I can go to the JavaOne 2009. Very nice… 🙂 Will be the first time ever.

If you still need to register and are looking at a glaring empty refer a friend box… Enter this code: W1320901

If we meet on JavaOne I’ll be sure to pass you a few beers if you used my code.

J-Fall Middleware for the developer JAZZ vision and archetecture

Only two more sessions to go. Ton van Velzen hosts a session on JAZZ. IBM’s new middelware platform.

At the start of the session he was sitting there looking like one of my preschool teachers. 🙂

Introduction on JAZZ. Why, how and overview.

Web2.0, Internet as a platform. Software as a sevice. What does web 2.0 mean for the colaboration when building software?

Different business roles require different views on projects. CIO needs high level status, developer needs something that doesn’t get on his way.

Software development needs to improve. Customers are not satisfied with quality, speed and turnaround. Lots of business speak. Knowledge is divided by location, organizations and infrasctructure.

Agile has gone mainstream apperently. Based on data from 2006. 65% says they are using agile methodologies. I wonder why the current adoption rate is. I’ll post some links on this later.

So apparently JAZZ is web2.0 and agile.

JAZZ is a middleware platform for software development. JAZZ is developed by the team behind the Eclipse project. JAZZ is a system based on the problems encourered in the day to day operation of the Eclipse project.

JAZZ services all aspects off the server side of software dwveloment. Version control, issue tracking, dailly build, planning, design, integration, feedback, learning, etc… All continuous. Agile requires process, discipline and planning.

Eclipse way of software development is somewhere between xp/scrum and RUP.

What do Agile teams need? See picture.

Software development server components as a restfull service. Underlying architecture of JAZZ is restfull.

I need to look into restfull web applications. 🙂

DB2 pure XML is the backing store of JAZZ. Can be queried by JQuery.

Need to look into javascript libbs as well.

Insert article of Royd Fielding on REST.

JAZZ was a research project within IBM. JAZZ management speak. Took another picture of this slide, the one with the jazz band.

OMG, he said visual server team system. 😉

Was really an overview presentation. Nothing technical. Check jazz.net. Lookup IBM Rational Team Concert. JAZZ is not open source.

J-Fall Closures

Huub van Thienen has a session about closures. Closures is a new upcomming expension scheduled for inclusion in Java 7. Three proposals are currently in development.

Closures are from functional languages. I’ll add some more links on this subject later.

Interesting subject, nice technical depth.