samedi, juin 27, 2009

Jazoon Day 1: Open UAT (Universal Authentication Toolkit) for devices

Out of Band (OOB) Channels


Visual channel (barcodes)
Audio channel (key encoded by audio)
Manual string comparison (comparing codes)
Accelerometer data (devices shaken together)
Button presses (buttons pressed at the same time)

J2ME Polish


Nice tool to specify the target of the build

ScreenSnap


In-device capture application for Java ME

This Open UAT system would be interesting on Google Android for example...

Jazoon Day 1: Rules engines overview and case study

Motivation for the use of business rules


updates in business rules have to change overnight

Core idea


Treat business logic as business data

BRMS (Business Rules Management System)

BOM vs XOM


Business Object Model vs Execution Object Model

iLog vs Drools
equivalence of features.

Business Rules format
when

then


Advanced Features


Custom, Higher level business language (translated to the same rules behind the scene
Rule security

Rules engine and SOA


Used for Monitoring of SLA

Rules engine and CEP (Complex Event Processing)


Almost all BRMS have a CEP engine (well to me it seems a bit weird to say that... all engines have it, so it must be useful... :p )

A bit of feedback on 2 projects with iLog and CLIPS.

Jazoon Day 1: Maven 3.x, Tycho

Lots of attendees!!

Maven 3.0


Fewer modules
Simpler codebase
Better IDEs support
Integration Testing
Backward compatibility

Pom in multiple formats (groovy, ruby)

PluginManager externalized

Queryable lifecycle


Execution plan is defined up front and depending on the environment, what it will execute will be different (compilation with JDT In Eclipse for example)

Plugin Extension Points, Lifecycle Extension Points

Error & Integrity reporting fixed

Mercury


async http client with ssl and streaming PGP, WebDav.
Designed as standalone, Mercury can be embedded
SAT4J (pseudo boolean solver) for dependency resolution

Guice + Peaberry


Plexus will be replaced
Peaberry is the equivalent of Spring dm for Guice


Incremental build support

Extensible reporting

M2Eclipse


Lots of real improvements with Maven 3.0
M2E configuration framework
Real round-trip between Eclipse and Maven Pom! NICE!!!!

Planned for September/October... can't wait... in fact, maybe I won't ;) at least for Maven 3.0!

Nexus presentation: interesting point: compatible with P2 and OBR
http://repository.apache.org
http://repository.sonatype.org
http://oss.sonatype.org
http://osgi.sonatype.org

Hudson


Drools workflow to build release processes
Integrating JSecurity (Apache Shiro)
REST layer
Maven 3.0 like plugins
Eclipse incremental compiler


Gosh this presentation is full of good news! Hopefully the result will be as good as promised...

Jazoon Day 1: Glassfish v3

RRails native deployment
Modular because of the requirements of Java EE 6 Profiles

Modularity


Based on OSGi (Apache Felix by default)
190 bundles (too many probably, but necessary at first, will decrease through time...or so they say ;))
Modules have responsabilities (provide services) and a lifecycle
Maven was used for the build

Developer features


Integration with IDEs
Fast startup, restart in debug
Exploded directory deployment
therefore... Fast deploy on save
Preserve session across redeployment
Application runner: java -jar glassfish.jar myWebApplication
> Maven/ANT integration
> Award winning UI console

Java EE 6 EJB 3.1 in web apps is really a very nice feature. It also seems that @Resource can now inject elements that come from other sources than JNDI! NICE!!

Runtime


Kernel
startup/shutdown
deployment
configure reading
Services
Java EE 6: Security, Naming Manager
Products; Admin consoles
Containers
Java EE 6: Web Container, EJB Container...
Other possible custom containers (RRails)

Application container


Deployment
Configuration
Commands (CLI, REST operation)

Service Based Architecture


HK2 Services: Abstraction to OSGi services
Per thread / Per scope scopes
Integrated lightweight dependency injection
Based on annotations (Container, Service, Inject...)

OSGi services can be injected with @Resource Java EE annotation.

Jazoon Day 1: Spring 3.0

Java 5+ foundation


even more support for annotated components
BeanFactory returns typed Beans
T getBean(String name, Class<T> requiredType)
TaskExecutor extends java.util.concurrentExecutor
extended AsyncTaskExecutor supports Callables and Futures
Typed ApplicationListener
ApplicationEventMulticaster detects declared event type and filters accordingly.
Annotated Factory Methods
Use of Meta-Annotations
This is indeed really great! It allows to potentially have only annotations from your own packages in your code.


Portfolio rearrangements


Spring OXM now in the core
Revised binding and type conversion infrastructure: Superseeding standard JDK PropertyEditors


Spring Expression Language Unified


a kind of unified EL++
EL default attributes: systemProperties, systemEnvironment, and any spring bean through its name(s)
Contextual attributes depending on scope (access to request/session attributes for example).

REST Support


Client and server side
Defining URIs
JAX-RS

Declarative model validation


Hibernate Validator, JSR 303
Annotating fields with constraint annotations

Support for Portlet 2.0


action/render/event/resource request mappings

Early support for Java EE 6


JSF 2.0
JPA 2.0
JSR 303

New Namespaces


Scheduling namespace
@Async annotation for methods
@Scheduled for cron-triggered methods
Namespace allows scanning of these annotations, and declarative equivalent Expressions
Custom CRON support

Pruning


Commons Attributes support
TopLink API
Subclass-style Struts 1.X

Deprecations


traditional MVC form controller hierarchy: no new features
traditional JUnit 3.8 test class hierarchy => now Test Context framework

Jazoon Day 1: Concurrency and Performance reloaded

Already lots of issues in single-threaded applications.
Moore's law is continued by multiple cores.
Concurrent programming is not possible yet, we can only cope with it.

Sadly (or not) concurrency is the main programming focus nowadays.

We have to deal with concurrency explicitely while before you could just wait for the platforms to improve and gain performances ;)

Problems:
- Hardware components are not shareable.
- Access to shared data has to be serialized.
- Databases offer access to shared data.
- Serialization limits scalability.

He then talks about Amdahl's law (parallel computing is limited by the time needed for the sequential part of the computing)
and Little's law (Throughput is inversely proportional to service time).

In Java: locking is pessimistic. Huge problem.

In fact 99% of locks are almost never really contended, and a large part of those will never be contended at all by design.

In Java 1.5, we have Java Locks and system level locks (hotspot profiles the application and determines if a lock is contended or not, and choose one or the other)

Lock coarsening uses one lock only for nearby equivalently locked operations.

Compare And Swap (CAS) used in Atomic classes. Fails only if another threads updates the data during your access. Needs less locking.

Biased Locking:
If a thread continuously acquires a lock, CAS is not used, and the thread keeps the lock until another one is reclaiming it (unbiasing)

How to code this correctly:

java.util.concurrent of course (Atomic*)
Lock striping (ConcurrentHashMap)
Teaching threads to steal (after all Garbage collecting is doing it).

In 1.7: Fork-Join

Fully concurrent lock-free algorithms:
No blocking, threads are never waiting for anything.
Wait free is different of course but should be achieve
Parallel reads, serialized writes

NonBlockingHashMap scales very well up to 1000 CPUs even for R/W, when ConcurrentHashMap doesn't.


Fully concurrent lock-less FIFO?
What does FIFO mean in multicore?
=> Doug Lea's wait-free queue (getAndSet(V))

Things that don't make sense
Iterator
Size
Contains

These are not relevant in highly concurrent environment.
APIs must therefore be re-thought through.

Very nice yet intricate talk. Too bad there's not more time for Dirk Pepperdine to go more into details!

Jazoon Day 1: Keynote by James Gosling

Starting with the JavaOne video
J.Gosling is then talking about network orientation, and the fact that Java is more about the JVM(s) than the language.

He then demonstrates Glassfish v3 (finally, EJBs in webapps...) and Netbeans v6.7 which looks honestly pretty slick...

Then talks about Real time JVM, and Intelligent Meshes (Sunspot (Squawk) VM, Sentilla.com).

Talking about Hybrid car of Neil Young ;). May I suggest the guy is a little cocky there? ;);)

Performance in java
Actually better than C/C++ in most cases.
He then demonstrates the now common assertion that Moore's law is now wrong if you don't consider the number of cores (not if one takes them into account).

Funny point on the fact that most of what is happening on scientific calculation is driven by the progress of video games.

A bit of advertizing on JDK 7 talk the following day.

Java 6 updates (from 10 on)
Fixes Desktop integration
G1(Garbage first) collector
Compressed pointers 32G==4G

Web as the face of the Enterprise
=> JavaFX: same result as Flash, yet easier... still not convinced by that... :p

mardi, juin 23, 2009

OSGi DevCon Europe: Emulation of Devices with Flash and OSGi

Interesting presentation on the emulation of devices.
The word "Device", in the embedded "world", is used to describe technical component which does only one kind of thing with a clear contract (display, sound, gesture capture...etc).
Therefore, an iPhone is an assembly of devices.
The iPhone development scheme is sadly inefficient in terms of testing.

In order to test devices properly, they are advising to build an OSGi bundle for each device, and a flash interface for the device with xml-sockets (or any other equivalent client technology).

Note that the client part is not mandatory, but allows product owners to define additional features and even capture test scenarios.

Sadly, they are not open-sourcing (yet?) the framework they built for that.

Wow... this was a fully packed day...

OSGi DevCon Europe: RFID and OSGi devices

Collecting real data and analyse it in the I.T.System.

Learned about MOSGI (JMX for OSGi) RFC 139

Learned about ALE reports which are events published by RFID Readers.

Starting to be a bit tired... too many presentations in one day :p

OSGi DevCon Europe: Transactions with OSGi

Presentation is very good. Clement Escoffier is very dynamic, and has good vocabulary, and a very pronounced frenchy accent and grammar ;) (who am I to say?)
Very good explanation of the basics of transaction. Should be learned in schools as is ;)

Indeed transactions are hard to handle in a system where the transaction manager bundle or the transaction participants can leave during a transaction!

iPOJO Transaction Handler does that (amongst others). I'm still not clear if this is part of 4.2 release of OSGi.

OSGi DevCon Europe: OSGi + Spring Integration

A little definition of "Performance"


Response time (classic)
Throughput (concurrent processing)
Utilization (Map-Reduce)

Scalability & Reliability (you have to choose a good balance between both)

Code supernova


Nothing is perfect
Code bases shall grow
Teams grow, you get more people and therefore more bad developers
More bugs.... ad lib...

I really like this concept ;). It fits so many projects have seen which are more patchworks than real products!

Single Thread Breakdown


One thread => single core
You can deal with more requests, but hardly improve a lot the treatment of one.

Synchronous breakdown


doing something, call another component , wait, finish.

Spring Integration is about EIP



Allows decoupling, if you add this to OSGi it's a nice combination.

Very nice and professional demo, done with very nice Spring STS ;)

OSGi DevCon Europe: Nimble

YA Dependency resolver/Provisionning tool ;)
Looks interesting.

Once again, Artifacts, Capabilities and Requirements (see p2)
The structure there is a "Part" (see p2 IU in a sense)
a "Rule" is a template for a "Part"
It also defines a concept of Extensions.

Gosh... such a short presentation on this results in a mess...

Demo
A lot better with a demo...

Nimble allows you to enforce Policies on provisionning. NICE!!!

http://nimble.codecauldron.org/

OSGi DevCon Europe: p2

p2, modular provisioning for OSGi

One consistent model from installation to servicing.

Concepts:


Everything is an Installable Unit (IU)
IU can have:
Actions (steps to perform to fully deploy)
Artifact reference (allows to reference dependencies without pointing directly to its location)
Capabilities and Requirements
Artifacts are:
Bytes/content to be installed (JARs, binary executable, RPM, MSI... etc)

God these presentations are too short.. The guy is talking too fast.
In the end, I already thought p2 was a bit of a mess, and as much as I want to like it, I'm still not clearly convinced by it.

OSGi DevCon Europe: Blueprint services

DI, yet Legacy code-compatible, OSGi Dynamics, Hide OSGi API

Configuration:

Uses the extender pattern: The Blueprint Extender scans bundles to find xml files, creates metadata from them, and then creates beans, services, references.

Manager Types:

Bean Manager: creates POJOs and possibly wire dependencies.
Single Service Reference Manager: one to one mapping with OSGi service
Multiple Services Reference Manager: one to many mapping with OSGi service
Service Registration Manager: Allows to register a POJO as an OSGi service

Bean Manager

takes as input a configuration which is very close from the Spring bean configuration.
No, in fact it is Spring configuration reloaded... ;)

To summarize: BluePrint is a standardization of Spring DM and of Spring DI configuration.
BluePrint already has other implementations (amongst them Geronimo Blueprint by G.Nodet who gave this talk)

OSGi DevCon Europe: POSH

POSH: Paremus OSGi Shell

RFC 0132

The man is yelling! ;) (Microphone too close to his mouth)

Yet the topic is interesting, it's about standardizing OSGi commands between frameworks.
For example "ss" in equinox is "ps" in Felix...
Not open source... even if pieces of it are part of Newton :p

OSGi DevCon Europe: Pax

Tools and service implementations (framework independent)
Widely used (Apache Felix, Mule... etc)

PaxConstruct

A bit like maven archetypes (on steroids) for OSGi.
pax-create-project -g foo -a bar
pax-wrap-jar
...etc

PaxRunner

Standard launcher for major frameworks (Apache Felix, Knoplerfish, Equinox, Concierge...)
Does the provisionning of required artifacts
Generates Configuration files
Generates packages for a target platform

PaxExam

Allows testing of OSGi services. NICE!
Compatible with JUnit 4 and Maven for setup.

OSGi DevCon Europe: Remote Services, Yet Another one ;)

Remote Services demo

service.exported.* properties for registered services
NICE!!! OSGi service exposed with CXF
NICE' !!! Discovery mechanism is in the works for the client side

Presentation of an Asynchronous remoting example/experiment.
This is not really available right now... and seems to be an example implementation.
Yet interesting ;) implemented by an OSGi Event dispatcher that allows to decouple from the implementation.
Drawbacks: No guaranteed delivery, No error handling with existing API. At least not yet, but this is experimental.

Demo of ActiveMQWrapper behind the EDS (EventAdmin is the point of contact)

http://cxf.apache.org/distributed-osgi.html (RI of OSGi 4.2 Remote Services)
http://lightsabre.fusesource.org (OSGi Asynchronous Messaging, experimental)

OSGi DevCon Europe: Persistence

OSGi Persistence


Java Persistence standards

JPA
OXM: JAXB 2.X
EDIT (see comments)
OXM: SDO 2.1.1 JSR 235

Eclipse Link

JPA, MOXy (Object-XML), EIS, SDO, DBWS (XML-relational...Oracle :p)
Currently JPA 1.0 compatible, and working on 2.0

MOXy

Complete Object-XML mapping
Provides external mapping file! NICE!!! Never understood why they didn't give that option in JAXB...

EclipseLink available as OSGi bundles

Supports usage of standard APIs (Persistence.createEntity, JAXBContext.newInstance(), commonj.sdo.HelperProvider)
Supports modular packaging
Decouples application from provider (Through JPA tag)

Challenges for OSGi and JPA

Bootstrap in JPA scans the classpath
Provider needs access to domain model classes
Needs access to JDBC driver (addressed RFC 122)

Challenges for OSGi and JAXB

Spec SPI does not support registration of providers
Provider needs access to domain model classes
Though supports passing domain model classloader

Challenges for OSGi and SDO

Spec hardwires everything so it doesn't support custom providers

JPA 2.0 will include dynamic resolution.

OSGi DevCon Europe: Remote Services

Module management in java

Mystical class path
In the end, classpath is flat
With OSGi: explicit dependencies, yet declarative
Allows events, dynamic handling, introspection
Services in OSGi allow to reduce coupling, but when package dependencies are explicit it limits the modularity.

Service Registry

Registering services by name, therefore allowing to reference a service without dependency on the implementation

Distributed OSGi

Remote can be separate machine, or separate JVM
Why? Isolation, Redundancy, Distribution is needed by your architecture

OSGi 4.2 Remote Services

Service Hooks (can intercept service requests)
Proxies
Intents (denotes an abstract distribution capability, requires mutual agreement, derives from SCA)

Very Nice: R-OSGi Deployment definition tool for Eclipse!

Remote Services Mostly based on the fact that services are stateless.

Work in progress: replication,Research prototype: Cirrostratus


Interesting as this allows completely virtual deployment of bundles.

Though it is unclear how much of what is presented is actually really available. Presentation is tough to follow, yet very interesting.

To summarize, seems that for stateless services, OSGi 4.2 would be enough, Cirrostratus prototype deals with state replication, service migration and hardening policies.

lundi, juin 22, 2009

OSGi DevCon Europe: Keynote

Keynote

Detailed description on what's going to be available in next releases (Core, Compendium and Enterprise).

Launching:

Need for a standardized launching system
Allows to embed easily the framework in your application
Using the service system of Java 5 (META-INF/services)

Service Hooks

Allows to listen service access events, therefore allowing interception for example.
FindHook, EventHook and ListenerHook.

Negative Permissions

Java 2 permissions: Very heavy to enumerate explicitely what is authorized and skip what is not.
Adding DENY and ALLOW. This is very nice! If it could just be implemented this way in Java 2 permissions...

Remote Services

RFC 119 (Formerly Distributed OSGi)
Remote access to OSGi services, protocol-independent.

Blueprint extender

RFC124
Provides Spring DM-like Functionality
Provides Service damping (wait until service is available) which is a very nice feature!
Defined through XML, a Blueprint container retrieves Metadata for Beans, Services, and References, and then creates corresponding elements from these metadatas.


Enterprise release

Transactions, JDBC, JMX, JNDI, JPA, Connectors

Experimental

TSL Tiny script language
Uses reflection but simplifies syntax (no new commands)
Sounds fun!

Nested frameworks

Application servers need an application model
in OSGi: Application==set of installed bundles
Compromise: frameworks should be nested

Java Modularity

module keyword would be nice for OSGi
The rest is over simplistic and will probably introduce more issues than it will solve... and BTW, it will only be available in Java 7 (why a language feature for that????)

BTW First time I hear a dog barking in a conference ;);)

Conferences in Zurich, day 1 : OSGi DevCon Europe

Starting my blog marathon, especially for you, my reader ;).

Today is the day before bootstrap of Jazoon.
Today is community day and offers 2 conferences: One about Glassfish, and another about OSGi.

I must say I would have loved to attend both, but, as always in this kind of conference, you have to make tough choices.

Well... not so tough, as OSGi DevCon talks have a lot of diversity whereas Glassfish talks are a lot about Glassfish...
Let's say I used diversity as a filter and leave it at that.
I'll definitely try to attend some Glassfish 3.0 talk during Jazoon anyway.

So stay tuned for regular updates my dear reader, and have a nice monday!