Open Java changes everything

Now that the dust is beginning to settle on Sun’s Decision to open source Java , what does it actually mean for you? That’s you as in a Business user, you as in a Java Developer , and you as a member of the wider IT Community?

  • In the short run (i.e. next 6 months), once the buzz dies down , not much. Remember that it took several years after the Netscape code was open source for Firefox to emerge and change the dynamic of the browser market.
  • In the medium term (between 6 and 24 months) expect some interesting packagings of Java to emerge, similar to the way the various Linux Distros work today. Consider these ‘green shoots’ or prototypes with interesting ideas. A ‘small footprint’ version of Java targeted at Applet developers seems to be one popular opinion of what might emerge. However, unless you are ‘bleeding edge’ or in a niche area the chances are you won’t notice them at this stage.

It is in the longer term (2 years plus) that open source java really makes it’s mark. Some predictions that you can quote back to me later:

– In the same way as JBoss and Geronimo have commoditised the app server market programming languages and runtimes will become a commodity. Expect the .Net platform to be opened (not just standardized) in some limited form.

– Java will become more like .Net with multiple languages running in the standard JVM. We have JRuby and Groovy. It wouldn’t be too hard to add C# to this list. Visual Basic in the JVM (the Sun Semplice Project) is already on it’s way.

– Oracle , IBM , SAP and others already committed to the Java market will become focussed on Java as an even bigger part of the core strategy. Just like the app server market, each will seek to differentiate themselves, perhaps by Service (IBM), by a core database (Oracle) or by leading a niche (SAP). Expect tension between the desire to differentiate (and fragment) and the GPL which seeks to ‘bind them all’.

Apache Harmony , a clean room implementation of Java will continue to gain momentum. It will get picked up by a major vendor in a similar manner to Apple using BSD code.

– Microsoft .Net will end up in a ‘death march’ with Java trying to gain a lead in a feature set. Open source is very good a mimicing existing products (as it makes an easy spec for dispersed developers to write on – just look at Open Office), so (unless software patents get thrown into the mix), it’s hard to see .Net getting a fundamental and lasting edge over the Java Ecosystem.

Update: I’m not saying that .Net is going to go away (nor should it), just that both it and Java are going to be around for a long time to come. Joe and John also have more commentary.

Using a database to store business rules

On a recent client project, we ended writing more than 300 business rules to reflect some of the financial decision making that they applied to an application (excuse me if I’m being suitably vauge with this). Many of these rules would be shared across applications. The rules engine used was the Java based JBoss rules engine (formerly known as Drools).

Obviously , these rules need to be stored somewhere. Most large organisations are comfortable with the idea of using a Database such as Oracle or Sql-Server to carry out this task. This article , for version 2 of Drools but also applicable to the latest release, shows you how to use a database to store your business rules.

Back to the future with Java and Retroweaver

Java 5 (also known as Java 1.5) was a fairly major release that makes using Java a lot quicker , easier and cleaner (click here for a full list of the new features, including Meta-Data , concurrency, Generic Types, Profiling , integrated JMX Admin facilities and XML support as part of the java core.).
RetroWeaver Logo
The problem is that a lot of Application Servers still require the previous (1.4) Version. Even if you’re running on a Server (such as JBoss) that does fully support Java 5, the chances are upgrading an existing application will take a lot of time , mainly in testing effort to make sure nothing has broken. As Java matures, running on older versions will become more and more of an issue.
So, how do you get the benefit of the latest features , without losing the known stability of the previous version. One solution is Retroweaver which allows you to write in Java 5, and deploy in Java 1.4.
Thanks to Joe Walker’s Blog (Him of DWR fame) for putting me on to this one.

What comes after Java and .Net? Agents.

Most systems until now have been centralised : A bit like the old Soviet Union, everything is centrally planned. The trouble is real-life isn’t like that – it’s a market economy with no central control. There’s a story about a Russian Diplomat posted to New York in the 60’s. On a visit to a bakery he asked – who decides how many loaves are baked in the city? The answer is no-one – each baker individually decides how many to bake based on how many he sold the day before. Somehow (almost) everybody gets fed.Current OO systems are like the Russian’s view: everything is centrally controlled. Agents are more like New-York (or Dublin) city today – a place full of people (agents) acting in their own self interest. Somehow everything works ok. Economists have a theory that backs this up ; in general a set of people acting in their own self interest gives the best solution at a global level. Or, if you prefer it’s a bit like Ants. Individual Ants are stupid, but together they are clever enough to mark a trail to food and carry it back to the Anthill. It’s called Emergent Behaviour – simple programs combining to give the answers to complex problems.

How does Web 2.0 give a push to Agents? Before, Systems were standalone , and everything planned in advance. With Web 2.0 everything is connected and too complex to manage by one person. We need to look at what works successfully in real life. Just as Market economies overcame the ‘Command and control’ of communism, so Agents will overcome the Command and control of Objects. It may not be perfect, but it will be (slightly) better.

Will agents replace Java and .Net ? A sign that ‘the future is already here’ is that when you read the list ‘what makes an agent’ , you may go ‘but we’re doing that now’. Java and .Net have been around for so long now that it’s easy to forget the Object Orientated Programming (OOP) was once a radical new departure. It’s also easy to forget that languages such as C++, Visual Basic 6 and Powerbuilder were once ‘king of the hill’ and commanded respect from your colleagues when you mentioned your latest project was using them.

So what are agents? Compared to Objects :

  • Agents act in their own self interest , they may decline a request if they think it makes them better off.Objects always respond to a request.
  • Agents have their own thread of control , 1 for each agent. Objects may have their own thread, but most objects don’t. – Agents are pro-active, and seek to improve their lot , according to pre-defined goals.
  • Agents are ‘Coarse Grained’ that is, a system will probably have a few agents will a lot of normal , dependent , objects. It’s similar to the way Enterprise Java Beans are used : not everything is an EJB , and there a still lots of Plain Old java Objects.
  • Objects are designed from the start to work together. Agents can be written by different people , perhaps with widely different goals in mind.

Just like C++ was a procedural language with object orientated ‘bits’ attached, Agents are currently implmented in languages like Java , with agent-y bits attached. Probably the most useful set of bits is Cougaar. Cougaar is an open source project with a live community at Cougaarforge and an Eclipse based IDE. Cougaar gives you the basic infrastructure for creating and managing agents.

Of course , there’s nothing to stop you building your own agents. According to the above definition, most systems that have workflow tieing together entities making decisions according to their own business rules are not far off being agents. Especially when they have a scheduler (i.e. their own ‘thread of control’).

What do you think? Leave a comment below.

It's been very quiet over here (aka what has Paul been up to) – Enterprise Web 2.0

It’s all been very quiet over here , too quiet. And not just because of the hosting issues (the people at Netbunch, you know that I’m talking about you)

It’s been very quiet , because I’ve been very busy. On top of all this , we’re coming to the end of the year for the (part time) Masters at UCD in Dublin, so we’ve also got exams coming up. Thankfully it’s the last year, the downside being I have a dissertation to write.

Being a blogger , I’m not happy putting together a weighty tome that will sit gathering dust on a shelf. Instead , I want something that will solve some business problems , and that I can use as interesting content. So after much thought , the proposed title of my dissertation will be …… cue drum roll ….. ta-da!

Enterprise Web 2.0

Now, if you’ve talked to me , you know I spend a lot of my working day as an Enterprise Java Consultant , working for various banks. The idea is to take some of the Web 2.0 ideas (and you don’t need me to repeat them) and apply them to the sort of problems large companies have. Or , if you want the catchy subtitle , ” it’s all about sucking the knowledge out of people’s brains and putting it onto (ugly) websites”.

So an obvious topic to cover is the use of Ajax , which while big on the web at the moment , is going to be huge once companies realise what it can bring to their internal applications. The rest of the topics cover knowledge management (what is web 2.0 if it’s not about sharing knowledge), but also some tools and techniques that will all Enterprise Java (with all it’s robustness and scalability) compete with the nimbleness and tricks of Ruby.

Business Problem 1: How to present this information to people in a easy to deploy, but powerful way.
Solution: Update to Sun Java article – this one on how to do Web 2.0 / Ajax ‘right’ in Enterprise Java (i.e. not worrying about legacy code)

Business Problem 2: Where you have documentation, but don’t know how to find it.
Solution: Write up of the Red-Piranha Adaptive Search engine that ‘learns’ what the team wants , and finds more of it.

Business Problem 3: Where you have information in Excel sheets, but can’t do much with it.
Solution: Update to previous O’Reilly Articles on JBoss Rules – this one on JBoss’ ability to ‘run’ Excel Spreadsheets.

Business Problem 4: Where you have information that people ‘know’ , but that a machine finds it hard to ‘learn’
Solution: Simple Neural Networks using Joone, applied to a ‘real life’ business problem.

Business Problem 5: Where several people have to work together on a set of information , following a strict set of steps.
Solution: JBoss workflow, with a simple online example

JBoss Workflow JBpm and JBoss Rules (Drools)

Notes from this Post on the Serverside

 I recently wrote an O’Reilly article on one of the related JBoss projects the Drools / JBoss rules engine.

Just to get the difference between jBPM and Drools / JBoss Rules straight in my head:

– Workflow tends to be ‘wide’ where Rule Engines tend to be  ‘deep’.

– Workflow is wide as the flow is spread over different people / actors and over time.

– Rule Engines are ‘deep’ as they apply simple rules to solve complex problems, but in general the rules are applied ‘all at once’.

Some of the confusion (in my head at least) comes from the fact:

– It is possible to implement workflow using a rules engine, much as it is possible to write your own workflow using Java. Of course , you don’t get the graphical designer that JBpm has.

– Both JBoss Rules (Drools) and JBoss Workflow (jBPM) see to
‘externalize’ part of the solution outside of Java. By stepping outside
of Java to use an XML / Graphical based approach, it makes the solution
easier to configure and understand.

Eclipse Callisto – 10 for the price of 1

I have a colleague who is as much an advocate of the IntelliJ IDE for Java, as I am for Eclipse. So far, in the ‘My Java Tool is better than yours’ game, I can claim the low cost (free), the number of plugins (huge) and number of developers using it (no figures, but I suspect Eclipse is now the development platform of choice). His trump card for Intellij is that ‘you download it and it just works’ – no messing around with installing plugins for stuff like JSP and Enterprise Java editing.

While plugins are always going to be slightly messy (you don’t get the gain of extensibility without some pain in the form of configuration), the Eclipse Callisto release , due in July, is another step in the right direction. It is a simultaneous release of 10 major Eclipse projects, including BIRT (reporting tools), Data Tools, Eclipse Web Tools, the Visual Editor , Test and Performance Tools and the Graphical Modelling Framework.

It may not be a ‘download from one place and it just works’, but by removing any integration issues, it will make your life easier.