Monday, May 12, 2008

ఇది నా మొదటి తెలుగు పత్రిక

నమ్మ లేని వార్త. ఇది నా మొదటి పత్రము - తెలుగు లో.

JavaOne 2008 - May 7th Technical Sessions

After the Oracle session, the first session I managed to get in was TS-5579 (Closures Cookbook). Although I had read about closures, I had practically never applied the same nor truely remembered what I had read on Closures. The purpose of attending this session was to ramp myself on this topic and what is to come ahead in Java 7. The session was well briefed with examples and a good amount of explanation although I need to review my notes after the session to recap and attain better grip. Corresponding notes I jotted down is below. There seem to be multiple efforts for Closures with JDK 7 working towards including this, while the presenter from Google was working parellely on feature sets to be supported.


As part of the daily update, there was a change in the sessions at 10.50am where a new session TS-5027 on Minion Search Engine was added. Curious about how they handle business data and searching while the content is being streamed, I decided to attend this session. The presentation went into good set of details on how to use the APIs defined as part of Minion engine could be used. How the stats are created and how the results surface up depending on matches. The search engine does scan through music files based on the tags specified for the same. But unfortunately, this search engine requires the document/content to exist in the file system.

My next session was TS 6237 Debugging Data races. The topic interested me since we keep running into exceptions that intermittently occur, occur on one system and not on other. The session was pretty detailed in showing how race conditions could occur especially on multi-core processors. Some notes are captured below.

With the same curiosity and many answers un-answered, I went for my next session TS 6316 Transactional memory in Java Tech based systems. This was even more interesting since Intel and its partners were looking to implement transactionality at the core level by using certain constructs. More notes below in corresponding section.


My next visit was the AMD general session. The session was not really exiting apart from claiming that they were working closely with Sun on bettering Java etc.

To close the day I decided to go for GlassFish V3 and JMaki Lab. To my luck there were slots available for me to do the lab. The reason to attend this session was to get a feel of both technologies GF and JMaki. The exercise details including instructions are available on line. Pls refer below for the link.


--- TS 5579 Closures Cookbook -----------------------------------------------
Closures cookbook: Niel Gafter from Google

BGGA Review
Runnable r = {=> doWhatever(); }; //the method executed when run is executed below
r.run();

Callable cs = { => "result"}; method take no arg and returns string.

when params are involved
Comparator reverse = {String s1, Strin s2 => s2.compareTo(s1)};

param and statement involved
sing closures in Swing
ItemSelectable is - ...
is.addItemListern(
{ItemEvent e => doSomethig (e, is); }) //alows u to use local params


- Creates an object that represents - code of body, lexical context
- An instance of some interface
- Few restrictions - may access local, this, may return enclosing method


Aggregate Operations:-
- Input is an agg: array, list, map etc.
- Bulk computation over data
- Part of computation caller-defined
- Can often be "automatically" parellelized
- Sort, filter, map, reduce, fold etc.


//seq code - what is highest GPA amongst students graduating
double highestGpa = -Double.MAX_VALUE;
for (Student s : students) {
if (s.graduationYear == THIS_YEAR) {
int gpa = s.getGpa();
if (highestGpa gpa) highestGpa = gpa;
}
}

Have to read whole thing to understand

//aggregate code
final doul highestGpa =
students
.filter({Student s => s.graduationYear == THIS_YEAR})
.map({ Student s => s.getGpa() })
.max();
An agg code instead of using a List. Concurrently the code can be executed especially on multi-processors. Enables management of concurrency in lib code instead of letting JVM manage it.


JSR 166y.


An API
/* record perf statstics of an operation */
public void recordTiming {
String opName,
long nanosec,
boolean succeeded) {...}

client code:
long startTime = System.nanoTime()l
boolean success = false;
try {
//a series of stmt to be timed
success = true;
} finally {
recordTiming {
"opName", System.nanoTime() - startTIme, success);
}

Problem: Appears 110 of times n clutters in codebase

One aspect to overcome above is Aspect OP. Lots of use cases of AOP and closures overlap.
Move boilerplate into API?

class Trace {
private final long startTime = System.nanoTime()l
private final String opName;
private boolean success = false;
public Trace(String opName) {
this.opName = opName;
}
public success() {
success = true;
}
public void done() {
record...
}
}

client:
Tracer tracer = new Tracer("opName");
try {
tracersuccess();
} finally {
tracer.done();
}

Little better and not successfull. Major drawback, what happens if return is required in themethod

try {
if () {
tracker.success();
return result;
}

tracker.success();
return result1;

}

Scope for forgetting resulting in wrong output

- In 7 java, there is an option to use multiple exceptions in one catch block
catch (Myxception | myxception 2) {
tracker.dofailure();
} finally {
tracker.done();
}


In 7 there is a final where the exception caught is rethrown by doing some logic
} catch (final Throwable ex) {
tracker.faulure();
throw ex; //throws same exceptions
}


How to solve above problem using closures:
Closure-based API
interface Block{
void execute();
}
public void time(String opName, Block block) {
long startTIme = System.nanoTime();
boolean success = fase;
try {
block.execute();
} finally {
recordTiming....);
}
}



client:

public void time(String opName, Block block)...

time("opName", {=>
//a series of stmts to be timed
});


Exceptions:
When timing code throws exceptions - above interface Block does not throw any exception
How to

interface Block {
void execute() throws X;
}

public void time {
String opName, Block block) throws exception



Would like to have any no of exceptions
Exception Transparency:
interface Block {
void execute() throws X;
}
public void time(
String opName, BlockM bloc) throws X {
long startTime..
boolean sucess false
try {
block.execute();
success = true;
....


Completion Transparency:
to time pdy of method
int f() {
return ..compute result..;
}

int f() {
time ("opName
}


Note that the success=true MAY not be executed above.


refactor above as:
boolean success = true;
try {
block.exeucte();
} catc (final Throeable ex) {
success = fasle;
throw ex;
} finally {...}


Completion
int f() {
time {"op", {=>
return ....compute...; //return result from f
});
)


A blck that can not complete normally

interface NothingBlock {
Nothing execute() throws X;
}

public Nothing time2 {
String opName, NothingBlock block) throws X {
long st = SYstem...
boolean success = true;
try {
return block.execute();
} catch (final Throable ex) {
success = false;
throw ex;
} finally {
recordTiming (....)
}
}
}


if op completes successfully use time(...) else time2(...)

A block that can complete normally

interface VoidBlock {
Void execute() throws X;
}

public Void time3(
String p[, VoidBlock block) throws X {
...
try {
return block.execute();
}
.....
}
}

Combine using Generics:
interface Block {
R execute() throws X;
}

public R time {
String op, Block bock) throws X {
....


client code:
int f() throws MyException {
time("op", {=> //executed on success
//
});
time ("op" {=> //on failure
//
});
}


Simplified Syntax:
some boiler plate code below such as => etc..
time{"op", {=>
...;
});

can be avoided with below syntax
time ("opName") {
....;
}


- Closing stream is boiler plate code when working with streams
withStream(InputStreams: makeInputStream()) {
//do
}

interface ClosableBlock {
R invoke(C c) throws X;
}


R withStream (C c, CloseableBlock block) throws X, IOException {
try {
return block.invoke(c);
} finally {
c.close();
}
}

above block can be replaced with below where function types are used instead of wildcards
R withStream(C c, {C ==> R throws X} block) throws X, IOExcepion {
.....


- Loop over entries in map

Use BGGA closures can do the looping
Map map = ..
for eachEntry(Key k, Value v : map) {
//do
}


void for eachEntry {
Map m,
{K, V ==> void throws X } block) throws X {
for (Map.Entry e.....
llop through


- In concurrency packages

Lock lock = ...;
withLock (lock {
//do
}


R withLock (Lock lock, { ==> R throws X} block) throws X
......

-----------------------------------------------------------------------------


--- TS-5027 Minion Search Engine --------------------------------------------
Minion Search Engine

get searchEngine by specifying an index dir where index is to be stored.
define fields using config file or API
index documents
pulic void index(SimpleIndexer si, MimeMessage m String foldername) {
si.setID(m.getMessageID());
si.setField(m.getFrom());
...
}

Querying:
Use ResultSet.

Query operators
- Term - case exact, morph, stem, wildcard.
- Proximity near, within, phrase, passage
- parameterci : =, <
- boolean

Available Grammars:
- Full: contains, note, and
- web
- Lucenesque style

Doc vectors;
Provides wights on the no of time the word is found in the doc.

Finding similar docs
- can get Doc vector and find similar docs
- search based on a field eg: subject
- search based on weighted fields

Document trainer:
Given set of docs with a label can tran the engine how to apply the label to new docs and classify them.


Clustering docs:
-

Tag based documents:

http://minion.dev.java.net
TS-5841

blogs.sun.com/searchguy

One major part I was looking for to search over a stream is not supported.


- How to apply for batch of documents? How to identify the separator betwen each doc
- Only on clear text data?
- Can I train the doc to contain a key word at a particular index

-----------------------------------------------------------------------------


--- TS 6237 Debugging Data races -----------------------------------------------
The content here is not comprehensive since it contained very fine details that I could not capture.
Debugging races:
- Hashmap - with one write multiple readers. Reader could read 3/4 insert.
- Similarly List


Debuggin:
- Visual Inspection: But user may not know the complete flow etc..
- Printing:
- make noise at each read/write of shared variable
- inspect trace after crash
- Per thread pringing of System nanoTime: but a heavy weight technique.

- FindBugs
- scales to prd use
- pattern matching

-----------------------------------------------------------------------------

--- TS 6316 Transactional memory in Java Tech based systems -----------------
Java Transactional Memory: Suresh Srinivas, Vyacheslav Shakin from Intel

- TM is a tool for concurrency control in Multi-core systems
- STM is a soft tech for developing new parellel software.
- HTM is a hardware tech that both existing and new software can utlizie to improve perf as well as concurrency.
-


static void move (Queue q1, Queue q2) {
synchronized(q1) {
synchronized(q2) {
Object o = q1.dequeue();
q2.enqueue(o);
}
}
}

client code:
cls.move(q1, q2)
cls.move(q2, q1)

Possible problem to above is Thread1 acquires lock on 'q1' while Thread 2 acquires lock on 'q2'. Deadlock occurs
To overcome this the block can be declared in 'atomic' block which when stmt 1 acquires it commits and in between if stmt 2 tries to commit any of its changes exception is thrown. Basically Transaction implemenation at lowest level.

Implementations:
Atomic
McRT (Multi Core runtime)


- java locks are optimized for:
- No Contention case
- not optimzed for case of lock contention with no real data conflicts.


Hardware Transaction Memory:
- java system utilizes HW transactional Memory ("isolation" & "atomicity") with no changes to software
- Software lock Elision
- Speculative Execution


PPoPP 2008 paper
ISCA 2007 paper - on speculative elusion.


References:
whatif.intel.com
java HTM is work in progress
stamp.stanford.edu
http://cs.rochester.edu/
-----------------------------------------------------------------------------


--- LAB 4520LT GlassFish V3 and building JSF using JMaki --------------------
Check out the link at http://developers.sun.com/learning/javaoneonline/j1lab.jsp?lab=LAB-4520LT&yr=2008&track=1 for details on instructions in doing this lab.
-----------------------------------------------------------------------------

Thursday, May 8, 2008

JavaOne 2008 - May 8th

NOTE: Below is what I could capture as notes as I attended Technical sessions at JavaOne 2008 on May 8th. I have tried to capture the presenters names for the corresponding sessions. All the content there in is owned by corresponding presenters and any session where the names are missing I apologize.

Intel General Session:
I got in late for the session, a reluctant entry to the session given that I was not really impressed by AMD's session the previous evening and had the same impression that it would be bland about perf improvements and a very high level on how they are using it. But the few minutes I was there, which was to the end of the session, it was pretty interesting. With presenters who were adept to stage presence and ex-tempo rather than reading from the presentation visible below the stage on the LCD screens, Intel finished off pretty strongly. The message from the last few minutes was about Intel's Xeon being the fastest processor for Java, strongly moving towards Mobile devices and tablets, an their open source community for development - Moblin.org

Started off by going to the session on TS 5793 on Groovy and Grails. My knowledge on the session was minimal since I had only played around with Groovy. The presentation was a quick overview and at a high level but had good number of snippets of code especially how to use metaClass feature and its related functionality. To this were the tips added on how to replace DAO and ServiceLocator patterns on how the boiler plate code can be avoided. The gaps for me were on the interal workings since I have a deep desire to understand how the internals work - how the code was generated by Groovy behind the scenes, especially the loss of encapsulation that the methods can be defined outside of the class. Pretty evident that I need to do more investigation on this front.

The next session was on JRuby On my way to the session I happen to run into Michael Czapski and Brendan Marry - professional services folks who had become new authors and had published their first every book on Java CAPS suite. After a brief discussion I barged into the JRuby session and could capture some of the notes only. Again this was another session where I was a beginner and could grasp what I could get and look forward to specialize depending on priorities. More notes on the session are below.

My next session was TS 6256 (Scalable non-blocking data structures) which was pretty detailed on how to build DS especially in cases where multiple reads, copying of DS are involved. More notes on the session are below.

My next session was TS 6587 (Patterns and solutions for Offline Batch Processing). This was a problem we had partly attempted to solve as part of the B2B solution. We had done the Batching part only and not the un-batching part. I was curious to hear on difference in how others have solved the problem. But to a large extent the presentation addressed the problem similar to how we had. It rather expanded on it in different ways from tightly coupled to loosely coupled.


--- TS 5793 Groovy & Grails- Changing Java ------------------------------------
By Graeme LaForge - Proj lead of Groovy and JSR 241

Groovy:
- dynamic language for JVM.
- groovy.codhaus.org

Grails:
- web platform that implements full stack from build system down to ORM layer. To put all technologies together.
- Leverages existing tech Spring, Hibernate, Quartz
- grails.org

Groovy dynamic:
Dynamic langs - Python, VB, Ruby, Groovy
Meta Object Protocol - Grovy, Ruby, LISP

Groovy MOP:
- Every class has a MetaClass which can be obtained as below
def obj = "Hello"
df metaClass = obj.metaClass

obj.metaClass.methods.each {

}

using respondsTo and hasProperty
- Need to find out whether an object implements a method? Use respondsTo:
- Need to find out if an object has a property? Use hasProperty:
if (foo.metaClass.hasProperty("bytes")
println foo.bytes.encodeA;
}
MataObject Model and other details available on groovy website


//can add new methods at runtime. Eg: On String class padLeft and other utils dynamically.
class Dog()
Dog.metaClass.bark = { -> "Woof!" }
Dog.metaClass.getBreed = { -> "BullDog"}

def d = new Dog()
println d.bark()
println d.breed() //interestingly this works??? although method is getBreed


Integer.metaClass.plus = { Integer i -> 1 }
3 + 4 (this will always return 1.


Integer.metaClas.getDollars = { -> "$delegate dollars"}
4.dollars


Static methods and constructrs
- static ethods can be added

Dog.metaClass
.static.bark = {new Dog() }
println Dog.create().bark()


- Note that every time you do a new Dog() the same instance is returned. (verify this???)
Constructor can be added using a special property


Meta-Program hooks
- invokeMethod, methodMissing, get/setProperty, propertyMissing:

Dog.metaClass
.methodMissing = { String name, args ->
println "Dogs..."



Meta-Prog Patterns
Interesting pattern developed in Grails
- Intercept, Cache, Invoke
- Basic Usage:
- inercept method
Dynamc create new method
cache new method
invoke new method
Dog.metaClass
.methodMising = { String name, args ->
def cached = {Object[] a ->
println "Dogs.."
}
Dog.metaClass



DAO pattern:
Implications of DAO
- Class explosion
- promotes aemic domain model
- configuration, config, config - a lot of repetition
- violates DRY???

GORM n Grails
- Dynamc queries can us used where methods need not be static. An interceptor can be built, where method name starting with certain string can be identified and corresponding logic executed.


MOP == goodbyte to DAO
- repetitive, boilerplace DAP logic gone (DRY)
- logc exists wher eit belongs - in domain (DDD)
- no direct ref to third party dependencies


Svc Locator
Eg: Spring & Grails
class Book {
Purchasing Service pusvc
Transaction buyBook(User u) {
purchasingService.buyBook(this, u)
}
}

Book.metaClass.constructor = (->
def obj = BeanUtils.instanctiateClass9book)
applicationContext
.getAutowreCapableBeanFactory()
.autowireBeanProperties(obj, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME,
false)
return obj
}

Adv of Meta way
- promotes DomainDriven Design (DDD)
- No config

Summary:
- Meta programming represents a new way to think abt problems
- Common patterns like DAO & Svc locator r present bcos of limitations in Java Platform
- Groovy & Grails open doors to declartive prgms, DSLs and DDD

grails.org
Code available in Grails docs
-------------------------------------------------------------------

--- TS 6490 JRuby --------------------------------------------------------------------

JRub/LDap
penSSL => JRuby/OpenSSL


Warbler: util to package app into web
- Application Layout (Rails) is kind of opposite of WAR file. Warbler takes care of this
- Installed as a gem(jruby -S gem install warbler)
- installing warbler as a plugin - jruby -S warble pluginze
- Configuring Warbler
jruby -S warble config
- Can also specify DataSource name in Wobbler config

Demo:
jruby -S rake db:create //std Rails rake cmd to create DB. The config file with variables is updated.


Tuning your deployment:
Runtime Pool size:
- config/warble.rb:

Warbler::Config.new do |config|
#....
#contorl the pool of Rails runtimes
config.webxml.jruby.min.runtimes = 2
config.webxml.jruby.max.runtimes = 4
end

Session handling:
Rail session != Servlet sessions

Caching and File Stat'ing
- Ensure view cacing is enabled (deault in Rails 202)
configaction_view.cache_template_loading = true
Aviod asset ID timestamp checks with RAILS_ASSET_ID
ENV['RAILS_ASSET_ID'] = 'r#{.....
Ensure ull page cache dir points to root of WAR
config.action_controller.page_cache_directory
Rails.public_path coming in 2.1


Performance: evolving and no stats are available.
concurrent request 10-90 while response time increases linearly.


Pre-compiling Rails
- compile Ruby code to bytecode before execution
- System property: -Djruby.compile.mode=FORCE
- still eveolving and may not return desired results.


JRuby-Rack
wiki.jruby.org/wiki/JRuby_Rack - converts java req to what Rails can understand
rack.rubyforge.org

------------------------------------------------------------------------------

---- TS 6256 -------------------------------------------------------------------
Towards scalable Nonblocking Data Structure - Azul systems

BitVector
Use the bits to capture the state of the DS - from initial(0000) to set data(0XXXX) then to move the content to another DS, you set an intermediate state (1XXXX) and once the DS is copied over reset the status to (10000).

Resize - copy mechanics

- Use Finite state machine to control writes
- Use large array for data

e2e.azulsystems.com - contains papers and other material for engineers.
azulsystems.com/blogs/cliff

--------------------------------------------------------------------------------

---- TS 6587 Patterns and solutions for Offline Batch Processing ----------------------------------------

Higher level framework:
SpringBatch - an implementation from Spring. Do not know much.
Spring Integration


- Batch infrastructure adds optimization adn low level abstractions.

EDA
- Contineous and concurrent
- Sometimes perceived as opp of Batch procesing - but not really

The presentation was pretty much in line with BatchSvc implementation as part of B2B effort. But the presentation started from the ground up how the message is read and written as
- read and write tightly coupled
- read separated out from writer but not in a scalable model
- further were how the batching could be scaled using BP's, JMS etc..

--------------------------------------------------------------------------------

Wednesday, May 7, 2008

JavaOne 2008 - May 6th Technical Sessions

With a lot of excitement I went to the first session of my JavaOne 2008 - TS-4992 (Funambol Java Platform, Java ME technology based open-source Messaging Client). What I was looking for from the session was to see how Java ME and messaging work. To learn about its application much more than SMS purposes. Unfortunately, the session turned out to be less about it and more about the product and information that I was really un-interesting to me. In between I walked out expectin to jump into TS-5771 (PHP meets Java - the best of both worlds), but I was not allowed since it was full. Disappointed, I decided to check my mails and do some work.

I hopped into my next session TS-6623 (More "Effective Java") which was totally packed. By the time I got in (given that I am a Sun employee and get the last opportunity to attend a session), the session had already started and Joshua was at the end of his Generics - the wildcard usage and largely concentrated on Enum this year. His session is always thought provoking and to me most of it I get better only after stepping out and reviewing his presentation. My notes for the session are at the bottom.

Had a quick lunch and got back to the Pavilion. Visited couple of booths of which noteworthy was Spring Source where I could not get all the information I needed in what Spring Source is about and will have to revisit.

Took off for a TS-5870 session (JBI and SCA best of both worlds). Again by the time I got in the session was already on and based on the content my understanding was the presenters were from Apache Tuscany and ServiceMix contributors. It was good to see some one putting together the complimentarty technologies which are largely misunderstood to be competitive specs. The presentations was more XML based and I happen to capture some notes below under corresponding TS number section.

My next stop was at TS-5921 (Glassfish v3 - an extensible modular platform). The session was very interesting to know the directions the GF is headed towards and how OSGi is reshaping the technology world. GF v3 is being built upon OSGi while also keeping its HK2 modular framework which was pre-built and going forward would sit on OSGi. Other highlights included the 2MB footprint and lazy initialization of containers eg: web containers are used only when needed. The interesting gap here in was the management of all these modular components. Some notes at available under corresponding TS number section.

The next session was TS-5711(jMonkeyEngine and gaming in Java) which was more out of curiosity. Some notes are available under corresponding TS number section.

After which I got into BOF-5150 (Event Driven SOA in Java using OSGi and Spring). I personally did not find it very interesting since the perspective with which I went for the session was to learn about ED using OSGi and Spring. It so happened the content was more on BEA products. At the point they started talking of JRockit I decided to quit since the subject was very diferent from the presentation. I hopped into BOF-5552 (Java Platform Observability by ByteCode instrumentation). This happened to be very interesting in how you could use bTrace utils annotations to debug code at byte level. Some notes are available under corresponding TS number section.


---TS - 4992 Funambol: JavaME & open src messaging client -----------------------
Funambol SDK - Java ME

NOT WORTH

JSR 75:

toSerialFormat - to set VCard info
fromSerialFormat - to read contact info

SyncML

Push EMail:
SMS and TCP based
ME platform
email on mass market handsets including black berry
Impl:
- Using SMS - app registers with PushTRegistry for incoming SMS
- Using Socket -
- CTP: app manages socket open to CTP server that uses it for sending notifications
- STP: app starts server socket and waits for server notifications
IP natting, proxies
- Socket * STP

------------------------------------------------------------------------------

---- TS - 6623 More Effective Java -----------------------------------------------
Wildcard usage, follow the rule:
PECS: Producer extends, Consumer Super

Dont use wildcard types as return types

1) void pushAll(Collection rc);
void popAll(Collection dst);

void pushAll (Collection src);
src is an E producer
void popAll(Collection dst);

user canpush ALl from a Collection or a Collection onto s Stack
user can popAll into a Collecton or a Coll from a Stack

2)
public statc set union(Set s1, Set s2) -
Both s1 and s2 are E producers
No wildcard tpe for return value
wouldnt make API any more flexible
would force user to deal with wildcard types explicitly
user shold not have to think abt wildcards to use your API

Enum types:
How to implement no of musiciansl

public enum Ensemble {
FIRST SEC THIRD FOURTH FIFTH SEXTH SEPT OCT NOV DEC
public int numberOfMusicians() {
return ordinal + 1;
}

}

Wrong
- maintenance nightmare - somene reorders constants, prg brekas silently
- Cant add multiple constants wih


public enum Ensemble {
SOLO(1) DUET(2) TRIO(3) FOURTH FIFTH SEXTH SEPT OCT NOV DEC

priv final int nofOfmusician

Ensemble(int size) {
return ordinal = size;
}


public int numberOfMusicians() {
return ordinal;
}
}


One way to represent set is Bit Fields
Eg:
public static int ITALIC = 1;
public static int BOLD = 2;


Bit Fields are obsolete

Why not use Bit Fields: (All problems of int constnts and more)
- Not type sfe
- No namespace
- Brittle - constants compled into client
- Printed values are cryptic
- No easy way to iterate elements represented by bt field
- Not scalable: no of constants grows beyond 32, you are toast. Beyong 64 your burnt.

Use EnumSet

public class Text {
public enm Stype {
BOLD, ITALIC, UNDERLINE, STRIKETHROUGH
}
//
public void applyStyles (Set

JavaOne2008 - Oracle General Session

NOTE: As with all my JavaOne 2008 posts, the below are more of notes I tried to capture when attending sessions and if there is something to be added or corrected please feel free.

Using JBuilder display how to create Graphs using exposed services. The bar chart exposes data from the DB. As data changes the graphs get updated. Using excel sheet data is updated into DB and the graph gets updated. The person doing the Demo along with Thomas Kurien is Duncan - a sales executive.

The same GUI is showed on Apple iPhone although it does not show it working on iPhone.

Sales person doing a demo for Oracle contrasts so much to Sun where the Engg manager did the demo yesterday for JavaFX. To me it indicates the importance the two technology companies assign to corresponding divitions - Sun is very Engineering oriented while Oracle is very Sales / revenue oriented.

Enterprise 2.0: by Peter M
An unfulfilled order is highlighted and how to identify why? Identify the order and seamlessly behind a search is executed to identify details on current status and whom to connect. Further details on the hierarchy of people involved and responsible is displayed. All web 2.0 interfaces.

Business Process Orchestration: Kevin
SCA: adapt SCA for composing services
BPEL: orchestration
Human Workflow:
Event processing and Activity Monitoring:
SOA Governance:
The above order undergoes an end-2-end view on its processing. A step by step how the order is processed. New enhancement is the Rules engine for Biz people to enter rules.

There seem to be some functionality that Kevin was trying to show and to me looked to be not working but this would have been unnoticed by most of the folks who are not familiar with such editors given that Kurien continued to engage the audience and Kevin with questions. One again very sales and marketing oriented compared to Sun which believes more in Engineering and tries to show the product as it is.


Managing Hetrogenous system with SOA Order Entry (WebLogic Operation Control - Virtual Edition), Pricing Engine (that calculates the price based on existing stock, orders etc.), Cluster of Oracle Applications and finally a Store Front 0 WebLogic Server.
- Shows how when no of orders coming in are very large, the GUI shows the throughput falling and order delivery getting delayed and an alert stating the no of orders coming in is larger than the capacity.
A demo on JRockit and how it displays all the threads and perf matrix using dashboard widgets etc..
The integration of WebLogic is more of a message that Oracle is sending about its seriousness in getting all WL functionality on board to Oracle's product suite.

All are avalable for download @
Oracle Developer network:
Oracle Fusion preview 4
Eclipse pack
Also IronMan movie ticket free at Oracle booth.

Tuesday, May 6, 2008

JavaOne 2008 - May 6th General Session

John Gage, Chris help James Gosling shoot T-Shirts into the crowd. There are few other folks throwing T-Shirts among the crowd behind.

John, James start off JavaOne by stressing on the importance of energy and environment saving efforts. Show various devices displayed across for JavaOne to meter the audience flowing in and out of any session, devices used to identify the energy consumed in JavaOne etc.

* John invites Rich Green on to stage.
- Rich requests Amazon VP onto the stage to demo Kindle. Talks of how they would like to replace the experience of book with Kindle where you can download, search millions of books, bookmark them etc.. Tries to download JavaBook over the internet and in mean time read WSJ etc.. The download of the book takes longer than expected while he walks off the stage. The complete software is on Java and was built before the device was actually available.

- Sony-Ericsson:
Rich invites Sony-Ericsson Senior VP on to the dias. The 6 yr old company has a business of $19 billion. Presents how they are planning to change the social experience using Sony phones. Hope to have the device released later this year. All applications built on Java.

*Java FX*:
- A demo by Nandini on Java FX:
Connected Life: An application plugged into Facebook page. This app consolidates other social networks and websites such as Flickr, IM into one application. Cool part of this being the app (plugin) can be dragged and dropped on to the desktop. The same can be run on mobile phones. Unfortunately the demo kept crashing and Nandini had to re-initialize the app atleast 3 times before the demo was ended. Rich Green's embarassment was obvious while Nandini engaged everyone with diversion tactics such as slow network and not a best of the vendor engagement statements (only to console herself) that Amazon's Kindle also did not work. Naaaa not too elegant...

- Another demo by <> on JavaFX and media by JavaFX designer. Showed how 2D, texting etc can be built using JavaFX. An application where the app plugs into Flickr and as you type keywords, it searches for photos on Flickr with corresponding tags. Pretty cool indeed as the images enter the app's galaxy like view.
A demo displaying graph of HD videos to select and play the movie. The app plays all the corresponding CODECS.
A demo showing Android simulator, in it the ConnectedLife app mentioned above is run.

*Some stats*:
A staggering 2.2 million devices out there that run Java. 85 % of mobile devices run Java while 91% desktops/laptops run Java.

*Java & JavaFX release schedule*:
Java 6 update 10 preview release.
Java FX Mobile and TV 1.0 Spring 09
Fall 08 FX desktop[ 1.0
Jul 08 FX desktop DSDK EAP

*Enterprise Apps*:
- GlassFish:
98K core kernel
lightweight mobile server
Communications server
Modular Design
Rate of downloads adoption increasing exponentially.

- Project Hydrozine:
Content Creators
Services - find services, merge deploy, share and eventually monetize.
Not mentioned but this runs on the ESB / Java CAPS suite behind.

- Project Insight:
Understand user action - monitoring technology etc..

Around 10.05 am Jonathan was called on to the stage by Rich. Jonathan states his 150,000 ft view on where Sun is gong.
- Java is about empowering individuals.
- To all devices: embedded, consumer devices, RFID devices
- Apps available on browser and out of it.
- Dev can instrument on what they build on what ever they want to build.
- All free available - can travel where ever it can go.
- Neil Young invited by Jonathan.

Niel (www.neilyoung.com/archives):
In 80s you could not bring what you wanted
- Sound: 192 / 24 sound available with BluRay.
- Chronological events over time on the stages he has been through for user to traverse back. Powered by Java technology.
- Partner LA Johnson invited on to the screen - Shaky Pictures.
- Viedo from 1963. All videos from 1963 could navigate through using a File Cabinet.
- An old record player
- Casette, IC player?? and a giant dump into CD (of the data).
- Also displays House in Topanga Canyaon.
- LinkVolt - elimiate gas refuelling, power coming into vehicle Volts used by car.


openeco - companies to monitor power of Sun - monthly billing of utility.


With this General Session ends and we all walk off for sessions and Pavilion.

Update: Fixed the typo in Niel Young URL.
Few more statistics I forgot to add:
MySQL -
Before Sun acquisition: 50000 / day
After Sun acquisition: 65000/day

NetBeans
44% increase Year over Year

Ubuntu shipping Java soon

Thursday, May 1, 2008

Generating revenue - exploring different models to win customers

NOTE: This blog post largely uses software industry as a reference to understand revenue models. All the content here in are not the opinions of corresponding organizations nor is it based on any insider information.

On May 1st, Sun Microsystems released its quarterly earnings which were below expectations. The company returned to quarterly loss after 5 consecutive quarterly profits. Sales in the US were down by 10%. Personally, it wasn't something we, from product division at Sun were expecting. Even as employees continued with their normal daily business, the hot topic of discussion amongst them was the quarterly results combined with the announced reduction in work force. These discussions led to some interesting thoughts which I thought I blog about.

The question we all had was what could be going wrong and what could Sun do to bring in more revenues. This question led us into trying to understand Sun's strategy towards revenue generation and what it believes would bring in more. Most of the major events at Sun are about open sourcing its products - which includes its flagship product Solaris. This raises the question, would OpenSource products ever generate revenue for the company? Could this be the cause for a bad quarter? The answer is - NO, for which we need to understand the relation between OpenSource and revenue generation - the model I believe Sun is hedging its bets on. In today's highly competitive market, companies are doling out software for free and transitioning these costs into services and support fees that the customers are more willing to pay for. Given that customers absolutely require professional services and support to implement the product in their IT division, they end up paying for the product eventually but in the name of services. One advantage here with OpenSource is the customer has an option of taking the risk to go alone which would not be available in the traditional sales model. Anyway, this posting is about analyzing different revenue models and will continue into details later in the post.

'Community brings revenue' seems to be the strategy that few companies including Sun seem to believe in. The traditional model for revenue generation has been Sales. Sun has indeed been very successful in building a community around Java which in turn generates a decent amount of revenues, albeit not as much as BEA or IBM make. The community approach, also called as bottom up approach is a slow process and can be categorized as a long term strategy.

This leads to the thought how the two revenue generating models - traditional sales and Community match up against each other.

One of the most widely employed and proven model is the Top-Down approach where the vendor's sales executives approach targeted customer's management echelons and clinch the deal. Since executives have a good understanding of - historical business trends, current state of business and future directions of the organization added to which is the financial strength, it is largely considered that they are most apt in making the decision. The primary drivers of this model are the Sales people who are highly valued for going out and clinching the deals. From product perspective, based on some of my experiences in the software industry, the product may not be production ready before the Sales team successfully demonstrates a POC to the customer to clinch the deal. Once the deal is clinched, the Engineering team accelerates the development phase for delivery. Typically there is a buffer time available for Engineering before delivering the product. Most of these deals are clinched based on personal rapport built at the customer end. On the flip side of adopting this model is, Sales executives are very competitive and cut throat, especially the ones from large corporations. Your product has to either be a revolutionary, or have a strong reference from internal or external source or have any other un-balancing factor to push the deal through. In an equilibrium situation, where the benefits in one product are balanced by benefits in the other product, the probability of competing and clinching the deal over a large competitor could be very slim.

The other mode of sale is by reference where an existing customer can recommend the same to its friendly or associated companies. This model has been applied heavily in the direct-2-customer approach where products are bought based on good reviews received from friends, family etc.. This model is pretty rampant on the internet where most or all of the online stores have the option to provide feedback and rating of a product. We will undoubtedly see this grow further on the internet with Social networking catching up quickly where the ratings and reviews you receive are from trusted and known sources instead of the unknown. For eg: as a happy owner of Bravia TV, I could recommend the same by post positive reviews on my social network account. To go one step further, the social networks could also have provision to share notes on the product. The major draw back to this approach is its limitations on its application to products that are largely sold directly to end consumer.

The contrarian model to traditional Sales model is the 'Community brings revenue' model - the bottom up approach where the product is given away for free to attract more developers and user for the product. This model has proven to be successful in the software industry especially. Eg: JBoss, RedHat, MySQL etc.. As the user base grows, word spreads faster through blogs, discussion forums and other means resulting in wealth of information being available for every one and eventually leading to increased industry adoption. Here the potential customer's developers recommend to their management the benefits of the product. Management in turn purchases the product and its services resulting in revenues to the product manufacturer. Customer benefis in many ways - free software, open code with more eyes on the source, collaborative effort where customer can participate to make the product better, if the company ever goes belly up, the product is still available with the source & many other benefits. The negative side of this could be - Is the management willing to take what the developers recommend depending on business policies and future directions, business politics, price etc.. How many of these truely translate into revenue for the company? The developers at the customer end may be willing to support the product on their own.

Comparing the Sales and Community models over a period of time, how would the costs and revenues outweigh each other is the big questions. It would be interesting to see a mathematical model that builds a linear expression for the same. Using my wild imagination below is a graph I believe when revenues are plotted over time.

As you may note, the revenues for Sales model flatten or saturate over time while in the community model revenues are slow to come at the begining but over time the revenues increase exponentially. Again the above graph is a wild imagination and I do not have any statistical data while I would be very interested in seeing such statistical data.
Even if the above graph could be true, the challenge of generating or converting community leads to revenues could be daunting and more work is probably required on various strategies that can be employed as part of this model - evangelism, participation in various conventions etc.. I believe Sun is looking towards a long term strategy and will continue to consolidate its operations and product offerings.