Enterprise Web 2.0 – Free Book

I’ll blog about it in more detail later, but I’ve just posted the first chapter of the Enterprise Web 2.0 book online. It is being written as a dissertation for the Msc. in Advanced Software Engineering in UCD , Dublin. The working title is ‘Financial knowledge capture using Rules , Workflow, Search and Enterprise Web 2.0‘.

Red Piranha Logo

To kill 4 birds with one stone, It also serves as a manual to the updated Red-Piranha project.[link to old website (search only). New website in progress] .

25,000 People Download Mans Brain from Internet

Yes, it’s incredible , but true. Red Piranha is everything (well , not exactly everything) that I’ve learnt in 7 years of Java consulting, all wrapped up in a nice easy to go bundle. It’s Enterprise software that gets knowledge out of people’s heads and into a PC (no , it’s not as painful as it sounds!).
Red Piranha Fish Logo

I hadn’t checked the stats for a while , so I’m astonished to learn that 25,000 people have downloaded a copy from sourceforge. What’s more amazing is that these downloads are for version 1 – a sort of ‘mini Google’. As I write this post the latest (beta) version is being made available to developers. This moves it firmly into the Enterprise Web 2.0 space, adding workflow, rules and rich internet application capabilities (including Ajax and mashups) – more on this blogpost.

By the way , if you’re looking for more information on Enterprise Web 2.0 , you can check out Jerry Bowles blog on this area.

And the results of the Virtual Java Meetup are …

And the results of the Virtual Java Meetup are … here. Names have been changed to protect the innocent.

If you couldn’t be bothered reading the entire thing , the results of the Dublin Jury on ‘what technologies should I be learning in the next 12 months’ are:

  • Web services are going to be big, but only if they can be simple.
  • EJB 3 and Netbeans are both worth taking a look at again, they are now much better than the previous versions that gave them a bad name.
  • Middleware (e.g. workflow and Rules Engines) are interesting in a corporate environment, but there is a high barrier to entry.
  • Struts , and to a lesser extent JSF , will continue to be dominant Java Web frameworks, despite not being the best technical choice.
  • A lot of companies are still using Java 1.4, but may make the leap to Java 6 (Mustang).
  • Service Orientated Architecuture (SOA) is a nice idea, but not so many projects have been implemented using it.
  • IDE’s (Netbeans / Eclipse / JDeveloper) can deliver a lot of value, but only if backed up by lower level tools (e.g. Ant and Maven).
  • More for the next 24 months , keep an eye on Apache Service Mix.

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
Follow

Get every new post delivered to your Inbox.

Join 726 other followers