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.

Architecture? One size fits all

No matter what your system does , be it insurance , banking , online travel booking or telecoms, the chances are it does the following things:

  • Gets information from users over the web
  • Does some business processing on that information
  • Saves the information in a database.

At a conservative estimate , about 99% of Enterprise systems would fall into this category.

If so, why do you need an architect , when you can use our ‘one size fits all’ architecture diagram (below)?! Most non-trivial systems, regardless of the language they are written in (be it Java, .Net , or your language of choice) follow the pattern seen in this diagram.

3 Tier Enterprise Diagram

There are 3 Pieces to the Solution:

  • Web Browser (for the user / client).
  • Web and Application Server – carry out business logic.
  • Database Back End – to store data and ensure data integrity.

Within the Application Server (the middle bit above, which as Java Architects is the bit we are interested in), there are a further 3 tiers

  • A Presentation tier (or layer), which is mainly about talking to the user (it gets and sends requests to the web browser).
  • A Service layer , which is mainly about talking to back end such as databases, legacy systems (such as mainframes) and XML-Web services that we may use.
  • A Business layer, the ‘meat’ of the sandwich, where the ‘Value add’ is in terms of business processing and validation.

For each of these layers , your priority in building them are slightly different.

  • The Presentation layer is the bit the user sees. You want it to be fast and give a good impression to the client. Underneath, use a standard framework (link: pick your framework here) and then customize the look and feel.
  • The Service layer you want to work fast and well (e.g. no data faults), but then then forget about. Unless things go wrong, no user is going to complement you on the quality of database persistence! Use standard libraries for the entire layer.
  • Unless your company is a clone or franchise, the business layer in the system is going to be completely different. Aside from the user-interface , concentrate most of your project effort here as this is the core of what system does. We’ve written quite a bit about how to increase the value-add of the business layer (link to O’Reilly Technical Articles)

By the way , we’re only half-joking about the ‘why do you need an architect’ bit. We can be contacted here.

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.

Enterprise Java Workshop in Dublin

Link to Enterprise Java Workshop, to be led by Dr. Bruce Martin in Dublin on the 6th – 9th March.

Is anybody going? Is it worth $1995 USD for 4 days? (and I’m not going to get sniffy about us using Euro over here :-) ) Who is this course aimed at? In some ways this course is like Corba: very relevant to the very small niche that use these technologies, but the broader line of ‘best practice’ has moved on.

An extract from the Agenda is below. It seem to broadly match what Sun looks for in it’s Enterprise Java Architect Certification. As such it shares the plus and minus of this approach : You get the Orthodox Entreprise Java Approach, or at least the approach being plugged by Sun about 3 years ago.

The trouble with this approach is that the Enterprise Java world has moved on. Hibernate has pushed aside Entity Beans , so much so that Enterprise Java Beans 3.0 is a complete turnaround it it’s direction. Spring has got a lot of traction as an EJB-Lite (and I mean that with the most positive connotations). Enterprise Java Patterns are much better understood (just search the IBM site), if not more widely understood.

Where’s the Ajax and the impact of multiple, small , web requests on application scalability? The JSON (as part of the Web Services)? Does it cover Java Server Faces and the emerging Ajax enabled Java Presentation Frameworks? What about workflow and rule engines and Java Messaging Services (JMS)? How about the tool integration to make your teams life easier when building the designs that you , as an Architect , have come up with? I don’t see Security in there , nor any of the other JSR (Java Specification Requests) that have come out of the broader Java community in the last 3 years.

And that’s before I go on about the only ‘technology alternative’ being offered is .Net – the PHP , Ruby and Oracle guys will have something to say about that! All have strong cases to make on a project by project basis. What about off the shelf products (both open source and commercial) that could , depending on the project, give you most of the functionality you need and you just have to customise the remaining 20%?

Maybe I’m being unfair, and the above is not the aim of the course.

For info, it’s on in the Gresham hotel on Dublin’s O’Connell Street from the 6th to the 9th of March. If you want a good solid foundation in Enterprise Java, and if somebody else is paying for it then it’s probably to be recommended. It might even help you get certified as a ‘Sun Enterprise Java Architect’. But unless you’re in an outstanding group, don’t expect it to be cutting edge.

Are you going – prove me wrong and leave a comment!

Project Module

  • Introduction
  • The Value Propositions of J2EE and EJB
  • J2EE vs..NET
  • Requirements of the Auction Application
  • Group Discusssion: J2EE or not, EJB or not
  • Activity: Identify the Auction Objects
  • Vertical Slices
  • Activity: Identify Vertical Slice
  • Communicating Architectures

Persistence Module

  • Pros and cons of JDBC
  • Object Relational Mapping
  • Java Data Objects (JDO)
  • EJB 2.x CMP Model and Relationships
  • EJB 3
  • Other O-R mapping solutions
  • Group Discussion: Persistence Matrix
  • Activity: Persistence Strategy for the
    Auction
  • Advanced Transaction and Concurrency
    Control topics
  • Activity: Identify the Transactions

Scalability Module

  • Principles of Scalability and Fault
    Tolerance
  • Application Server Clustering solutions
  • Activity: Scaling the Auction

Integration Module

  • Messaging
  • Activity: Messaging in the Auction
  • Connectors
  • XML, Web Services and SOA
  • Activity: Enterprise Application
    Integration
  • Activity: B2B Integration

Application Design Module

  • Top Ten J2EE Design Patterns
  • Activity: Design patterns or not
  • Activity: Complete the design
  • Group Discussion: Custom Consulting

Watch out Java – Windows Workflow is coming!

Workflow is core to most business as it describes the core of what they do. Workflow can be as simple as ‘Search for Flights, Select Flight, Pay, Recieve Email confirmation’, to something much more complex (e.g. a Mortgage application). Many systems already have workflow in them, only they don’t know it. The problem is then that the Business People (who understand the workflow) can’t see how it is implemented in (hidden behind code), while the technical people don’t understand the business process. Workflow (closely related to Rule Engines) aim to solve this problem.

I recently attended an Irish .Net Developers presentation by Aiden O’Connor(long story), about the new Windows Workflow, currently in Beta as part of Microsoft .Net. While workflow in Enterprise Java is nothing new (Serverside Article), the implementation of Workflow in Visual Studio will bring it’s ideas to a wider audience, and force the Java workflow people to ‘raise their game’.

So, why should you be interested in Windows Workflow?

  1. Visual Studio has always had ‘Drag and Drop’ building of Systems. Now it will also have ‘Drag and Drop’ flowcharts (it looks a bit like Visio or other drawing tools). When the process hits a stage an Event is triggered and appropriate code called (e.g. similar to a mouse click on a form).
  2. It is likely that Business Analysts will use a Visual design tool to draw up the workflow. Programmers will then handle events at each stage in the workflow – a much easier process as they just have to concentrate on a single step, and not worry (so much) about the bigger picture.
  3. Long lived workflows and processes can be handled easily. For example, if we have issued the ticket and are waiting for the customer to check in (weeks later), state will be persisted automatically.
    It brings the workflow ideas from a niche to a wider audience. Even the Java based frameworks will benefit from this.

  1. It is part of the .Net framework – the equivalent in the Java world of it coming free with the JVM. It will run anywhere .Net does, and one workflow can span multiple machines (this was buggy in the beta, but it is a known issue).

CRM Experts predict 2006

TechTarget is running it’s CRM predictions for 2006. Among the top predictions are:

  • CRM (Customer Relationship Management) will become less of a standalone function, and even more highly integrated with business process.
  • SugarCRM (Open Software) will make it’s breakthrough into the mainstream (we told you so).
  • SugarCRM will not only become a viable alternative to low-end Oracle and SAP , but also to online services , such as SalesForce.com
  • Voice over Internet (VOIP – think Skype) will become increasingly important in the  call-center.

Wired Article – The Long Tail

Before I got into IT, I was involved in Supply Chain Management – the stuff that gets your Cornflakes from a farmers field to your breakfast table.

One of the biggest problems in retailling has been an abundance of supply – unlike the previous 100 years where you could ‘never get anything in Ireland’ , be it staple foodstuffs or the latest Gucci Handbags, these are now available at Brown Thomas and shops all over Dublin (the Handbags, not the potatoes).

Unfortunately, shelf space can’t increase at the same rate, so most shops are stocking only the ‘Hits’ – the products that appear to the lowest common denominator of the mass market. This is a problem if you music tastes go beyond ‘Busted’, if you want an extra special Christmas present or or part for your Hifi that ‘they just don’t make anymore’

Step forward the internet. If you look at the success stories of the internet – Amazon, EBay, Online Travel, they all aim at the estimated 50% of purchases that are individual rather than mass market. Read the Wired Article here that explains more.

I have seen the future of web applications and it is ….

Jotspot . It’s not that it is very much a Web 2.0 company. It’s more that it draws together a lot of previous ideas into one easy to use package.

  • It’s easy to use – if you can use Microsoft Office , you can use JotSpot
  • It’s easy to develop – ‘Power Users’ not developers can do it (the sort that come up with fancy Excel Spreadsheets).
  • It’s web based, is available everywhere and uses a very fluid Ajax interface
  • It can be easily extended , so all the people currently playing around with PHP and websites can get up and running more quickly.
  • It’s free, with a more powerful commercial version

Other ‘out of the box’ features include being able to import Excel Spreadsheets and have them available as online applications. It also comes with ready build applications such as CRM , Project Management Tools, Colloboration Tools etc

Jotspot is exactly the sort of ‘Component based Architcture’ that Java Developers have been aiming towards. It ties the portability of Java, the ease of development of Visual Basic and the promise of Lotus Notes. It also has a full set of easy to use XML API’s , so a wave a client applications tied into a Jotspot server is not far off.

Do Software Patents really Affect you?

The Economist is running one of it’s in depth Surveys on Software Patents and the Market for idea’s. Some of the content is available online but here is the 10 second version:

* The market for idea’s is one of the key drivers of Economic Growth.
* Large Companies are gathering Patents as a means of defense against other people enforcing patent claims on them.
* Patents , if used unwisely, can be a bit like the tolls that used to be charged travellers – good for the local warlords but bad for everybody else.
* Many large companies , including IBM and Novell are donating Patents to Open source as a means of helping the open software , and hence their own , interests.
* As other countries (e.g. China and India) gather their own Patent portfolio, the attitude to Patents and Copyright, instead of one way traffic, will become more balanced – for example the US Cogress was ready to forcibly licence an anti-anthrax drug from a German Company post 9-11. Expect

A good forum for expressing your views on Patents is Digitial Rights Ireland.

ERP and CRM Solutions

80% of Java projects end up build the same thing over and over (Web-Java-Database).

There’s frameworks out there (e.g. Struts , Spring and Hibernate) to reduce the effort , but Compiere goes one step further – it gives you a complete ERP (Enterprise Resource Planning) and CRM (Customer Relationship Management) solution in a box , which you can then customize for your end client.

Compiere is very good ,as befits a project that is consistently in the top 10 on sourceforge. So , if you have any interest in Java and Oracle , you should check it out at http://www.compiere.org. Worked with this product in my days with firstpartners.net in Dundalk , Ireland , and good as it was then , the product has matured a lot more (included Database independence)

Follow

Get every new post delivered to your Inbox.

Join 698 other followers