June 30, 2005

JavaOne 2005: Day Two

I'm there right from the beginning of morning. The day start with Sun's general session. A lot of was discussed about Brazilian's great health-care system (of course implemented in Java) and just hyping up Java in general, which I personally didn't find so useful.

Just by coincidence, I catched the end of Java Platform Clustering, which talked about application-level clustering for multiJVMs. It's called project Barcelona and the whole topic is very very interesting topic. Pretty much like anything else these days, it's available as an open-source implementation.

The meat of the day however was various EJB 3.0 session. I was really amazed how much simpler and cleaner EJB annotations makes to implement them as simple POJOs. I talked about that in the last post, but it was really the sessions today that made me understand its usefulness and elegance.

Besides that, the hot topic of the day and in the whole conference is SOA, service-oriented architecture. Saw some nice demos on implementing them (with heavy enterprise tools for obvious vendors, IBM and Sun), but read more about it below if you are interested.

One more topic that deserves a separate section for itself, was the last BOF of the day, JavaServer Faces Over The Phone: Building VoiceXML with Custom JSF Components and Render Kits. Interesting, no? I was the only person from my current company to join the BOF, and I had to save the day by loaning the presenter my laptop because his couldn't be connected with the projector for some reason. Well, at least I got the powerpoint without needing to wait for it to be published to the web site. Anyway, he's pretty interesting result was that he didn't find too many benefits in doing so, at least for simple VoiceXML anyways. Basically, he was suggesting to use plain JSTL pages instead. After the session, we talked about doing AJAX components for voiceXML, in which case the benefits should be much bigger.

---
Day two

JUICmidlet downloadable from java.net

Sun bought SeeBeyond

JCP the most successful community process
Brazilian health-care system open sourced; the shape of things to come
Government built custom code utilizing open source projects
2.5 million lines of code in total, done in 4 months


Mobile gaming overview
// Download this preso
SNAP Mobile
Java conterpart to N/gage arena technology from Nokia
multiplayer gaming technology that provides mobile devices access to
- web services
- online community services for IM and presence
- online game services (matchmaking, socre submission and retrieval, ranking)
- integration with game server for games with client-server architecture

SNAP architected around lobby and room concepts
Lobbies and rooms are used as routing groups for game messaging to optimize network traffic

SNAP client transport based on HTTP, but extensible
single point of contact between Java client terminals and online community services
session management
load balancing
scalability

Apache used as a command gateway
routes login, account creation and other queries directly to the web services
streamlined command-set supports matchmaking
StringTokernizer parses a string into tokens

SnapEventListener
Events are held server-side (VSC) until retrieved by client
Event callbacks could be very frequent and would resoult in high network overhead
Client has the choice to retrieve event asynchronously or synchronously

Java Platform Clustering
Programming Cluster Isolates
// Get the slides of this presentation
Isolate isolate = new Isolate();

Isolate Aps
need resource management facilities
Can do much better than current JVM software

RM API for a single node
programmatic control over a set of resources
extensible set of resources
isolates a re grouped into resource domains
one domain controls one resource
multiple isolates can be bound to the same domain

heapDomain1 = ResourceDomain.newDomain(HEAP_MEM);
heapdomain1.setConsumeAction(new Constrain() {...});

Cluster extensions
Everything works as before on a single node
almost everything works as before for multiple nodes

local vs. global maangement
local resource domians, isolates must be co-located on the same node

global management
can be managed remotely

fine-grained RM over a cluster
- blurring node boundaries

Current Status of Java technology-based clustering
- research focused on platform single system image
- products building ad hoc solutions
Cluster-MVM tries to bridge the gap
- single-system image of isolates
- flexible and powerful
The Barcelona Project Web pages
http://research.sun.com/projects/barcelona
JSF 121
TS-7212

EJB 3.0 Goals
Can leave EJB 1, 2 just the way they are
EJB 2.1 component are still supported in EJB 3 containers

migrate server side only

session beans become POJOs as described in the simplified API
// step by step instructions in slides

migrating entity beans
container-managed relationships
java code needs to do the management (LinkedList)
easiest to add a single line to the relationship modifier methods
put the remoteness, transactions and security in session bean
not pretty, not recommnded, should not be a common case

General session with Oracle
// Get slides of this session

JavaServer Faces as the SOA gui
Wow - AJAX GUI, looks really nice
Oracle will contribute ADF faces to MyFaces project! confirmed on stage

EJB 3.0 with metadata is just unbelievably great

Oracle's EJB 3.0 container will become the reference EJB 3.0 implementation!

SOA is hot

Integrate Services
Orchestrate Services - BPEL
Business Process Expression Language

no infrastructure code polluting business logic code

implement business process rules graphically
will create a two-way BPEL description

Secure Services
Manage Services

Web based security manager
can enforce encryption on specific elements

Monitor Services

Pretty impressive AJAX application, no polling

Layers:
----
Common Metadata Repository
JSF EJB 3.0 BPEL
Enterprise Service Bus
J2EE 1.4
WSIF & JBI

Oracle's SOA platform works with Spring and other most popular frameworks

Oracle 10g

Impressive

BeanShell JSF BOF
// Get the slides of this presentation
BS 2.0 what's new:
performance
error reporting
new language features
applet friendly
- mix-in (importObject(map);put("foo", "bar);
- properties style auto-allocation: foo.bar.gee = 42; // foo was undefined

full language support with 1.4
some Java 5 features, boxing, enhanced for loops, static imports

can paste class sources, load from sources etc.
true scripted classes:
- generated classes with real Java types, backed by the interpreter
- scripts can now go anywhere Java goes: Extend/
- expose all methods and typed variables of the class
- bound in the namespace in which they are declared
- may freely mix loose / script syntax with full Java class syntax
HelloWorld.bsh
showMessage() {print("hello!");}
count = 5;
class HelloWorld extends Thread {...}

full Java semantics
- this, super, static and instance variables and blocks
- full superclass visibility
- full constructors functionality this(), super(), controlled superclass construction

Light weight bytecode generator (17K subset of ASM)
stub classes delegate all method and constructor calls to interpreter. All fields generated to class.
Generated accessor methods for superclass visibility

limitations
- reflective access permissions
- bugs to work out

New APIs
javax.script (JSR-223) Powerful, pluggable scripting languages for Java
the BeanShell API Compiler - true persistent classes backed by scripts

minimalist language neutral script generation capabilities

BeanShell generated stub classes can now be saved to ordinary dot class files
Class initialization code launches an interpreter for the associated script file
indistinguishable from ordinary classes to the outside world
script files can evolve after the class is generated as long as they fulfill the basic contract(!)
can contain any amount of additional "loose" Java code in or outside the class body
real classes as properties files... (James Gosling)
servlets and web apps with runtime modifiable classes

next steps:
- java 5 syntax compatibility
- performance, control, security
- pluggable, extensible syntax?

targeted for 3.0
- generics, annotations, varargs... what are we going to do with those?
- could just ignore, but other possibilities as well

Performance
more bytecode where allowed?
current implementation is (almost) pure reflection
tuning - we have not yet begun to tune

Uh oh battery dying...

Recharged me and the battery, back for
JavaServer Faces Over The Phone:
Building VoiceXML with Custom JSF Components and Render Kits

Problem overview
VoiceXML vs. HTML
Brickwall when starting

Provide additional functionality to a component

UIComponentBase a convenient base class
UIOutput not good, just for simple string output

Interfaces to implement: StateHolder / ValueHolder

Direct implementation: component handles its own rendering
Delegated implementation: component delegates the rendering to a renderer

com.voicerite.Prompt
... just basic stuff

saveState save the object in a serializable object - like most MyFaces components

Choose the class the Tag will subclass

Configure UI Component

which version of voiceXML?
Is it complete?
Pros/Cons?

Benefits:
Changing locale easy, not too many benefits in it actually

Components need to be bigger, customized, contain error handling, validation to get benefits
Identify reuse possibilities
Benefits in implementing renderkits for different voice browsers

IBM open-source voicedialog taglib - taglibs usuallly a give-away with the server

mingling recognization code with business code

in voiceXML the things that will kill you are those left out of the spec

Posted by thoughts at June 30, 2005 07:39 AM | TrackBack
Comments
Post a comment









Remember personal info?