January 2006 Archives

Paul Browne

AddThis Social Bookmark Button

Related link: http://www.firstpartners.net/blog/location/dublin/2006/01/28/give-your-input-int…

I’ve been invited to do a Web 2.0 presention to the Irish Dev / Irish Internet Association (it’s on the 21st Feb in the Morgan Hotel , Dublin, if you’re about in Ireland that day).

So, we have a problem. I consider myself to know a little about Web 2.0, but nobody knows everything about it, even the great Tim O’Reilly and his famous definition of Web 2.0. You might as well try and record every conversation happening in a busy room. I thought I would ask the community.

The Audience is tricky, as it is partly business (to whom Web 2.0 = next dot com boom) and partly technical (to whom Web 2.0 = Ajax) - for the record , I consider both views wrong. We also have only 30 minutes , including a (very quick) demo of how easy it is to migrate to Ajax (based on this Java.net article). A lot of the business concepts will be at the level of this article that I wrote for Ireland’s Business Plus magazine.

I have some notes on the Web 2.0 presentation taking shape over on my website. To cater for the technical side, we’ll probably also (quickly) cover some of the Ajax Enabled Java Frameworks (summary of these here).

What would you say if you were standing in front on this audience?

What do you think? How can I inject a cold dose of reality into this Web 2.0 business?

Amir Shevat

AddThis Social Bookmark Button

“A rose by any other name would smell as sweet”


Shakespeare’s Romeo and Juliet

Product versioning is a matter that lies in the grey area between marketing and R&D. Lets take Java for example (I like Java that is why I use it as an example). On one hand marketing people think that calling a product “5.0 code name Tiger” would be much better than calling it 1.5 (and don’t even think about something like 1.5.0_04-b05). On the other hand, R&D people, though really fond of Tigers, would prefer to see “1.5.0_04-b05” as the version name. This version name provides R&D with the information they require such as the knowledge that a certain bug was fixed in this version. I think that is why SUN markets JAVA as “J2SE 5.0 tiger” but when I run “java –version” on my computer I get “java version 1.5.0_04-b05”.

Another issue with product versioning is the correlation of version numbers between tightly coupled products. I will take our open-source project for example. Our main open-source product, MantaRay, is a JMS provider that comes in 3 different flavors – a pure java implementation, a C++ wrapper over the java implementation and a pure C# implementation. In addition, there are several other components such as the MantaRay Management Console.

Up until the last release we use to give each component its own version number. However, the problem was that we started getting users’ feedback saying that they find this naming convention to be confusing. Every product came with a read-me file that stated the compatibility with the other products’ versions. As a result, we had to deal with bugs that originated from people running incompatible versions of the different products. Moreover, our marketing people did not like the fact that we distribute three different JMS products with different version numbers. They wanted to market a single solution with three flavors.

In order to amend these problems we consolidated all of our sub-products under one version called MantaRay 1.9, we hope this will be less confusing and will generate less product-interoperability errors. I guess you could look at this decision as both marketing and R&D driven.

The bottom line is that a version by any other name would smell as sweet..

Is product versioning an R&D decision or a marketing one?

Paul Browne

AddThis Social Bookmark Button

Related link: http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/diruse-o.asp

Too often we Java people don’t give Microsoft credit for the small but useful things that they do.

If you are Unix head trapped in a Microsoft body (e.g. you must use Windows at work), then you probably miss tools like du (find out disk usage for folders).

While Cygwin gives you the power of the Unix command line (and more) within Windows, what happens if this is restricted as well?

One tool that you may find useful is DirUse from Microsoft.

Paul’s other (non technical) blog

What other Windows tools do you find useful as a Java Developer? (please don’t flame me with ’should be using Linux’ :-)

Tim O

AddThis Social Bookmark Button

Related link: http://www.alistapart.com/articles/web3point0

Zeldman wants us to believe that the ever nebulous Web 2.0 is a bubble defined only by AJAX and Ruby on Rails. His argument rests on whim and an encounter with some loud suit who attended Web 2.0. To Zeldman, one pontificating audience member at a Google debate in New York is enough to prove that Web 2.0 is nothing more than a puff of fad to be disposed with. The sentiment is common.

Needless to say, I disagree with most of his ideas. To say that Web 2.0 is defined by any one technology is to miss the point entirely. Web 2.0 isn’t about LAMP or even open source. It is a general approach to interaction, application design, ideas of community and participation; such ideas can be implemented on any platform be it Java, Ruby of Rails, or .NET. I also get the sense that the media’s mistranslation of words like “blogger” are an affront to his superior technical sensibilities. After reading this piece, you get the sense that “Web 2.0″ is like an underground punk band gone from small, bohemian stages to solid gold, and “the uninformed” are ruining everything just like they did with “Web 1.0″.

What? too hip for “Web 2.0″?

Are you too hip for “Web 2.0″?

Paul Browne

AddThis Social Bookmark Button

Related link: http://www.firstpartners.net/blog/category/business/workflow/

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.
  4. It brings the workflow ideas from a niche to a wider audience. Even the Java based frameworks will benefit from this.
  5. It is part of the .Net framework - the equivalent in the Java world of coming free with the JVM. It will run anywhere .Net does, and one workflow can span multiple machines (this was buggy in the demo, but it is still Beta software).

Workflow, if and when it goes mainstream, has the potential to change the way we program as radicially as Visual Tools and OOP did.

Is workflow going to change your programming style? Are you going to be using workflow in your next project?

Paul Browne

AddThis Social Bookmark Button

Related link: http://www.eclipse.org/projects/callisto.php

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. More Blogs

What do you think could make the Eclipse platform even better?

Robert Cooper

AddThis Social Bookmark Button

Related link: http://www.theserverside.com/articles/article.tss?l=RiAWeb

While — and this may be a faux pas here on O’Reilly, but I hate the “Web 2.0″ moniker anyway — I believe firmly that Java could have a future as a desktop development environment, I don’t buy this at all.

The main problem with this 2.01 development model is you immediately drop what is making 2.0 work so well: integration. With the singular client (browser) the user gets a lot of value-add to every web application. While AJAX tends to work “best”, Flash in limited doses doesn’t change it much. And here I am really talking about little things.

As I write this post, for instance, I am using “resizable text area” and the Google Toolbar’s Spell Check in FF. These DRASTICALLY increase the usability of the O’Reilly blogging system, yet don’t require the server to know anything about it. Other plug ins like Piggy Bank and other whole browsers like Flock continue to dial up the functionality the end user can have without the app developer knowing or having to worry about it. With a fat client, the only real functionality the user gets is that which the developer deems worthy of writing. Even if such a client included a plug in architecture, it most certainly would never have the broad support or utility of things like CTXExtensions, Greasemonkey and the rest of the FF space.

Steven Douglas Olson

AddThis Social Bookmark Button

Have you ever heard of Thomas Harriot?
How about Galileo?

Very few of us have heard of Thomas Harriot, yet there is evidence that he actually used a telescope before Gailileo did.

In August 1609 Harriot used a telescope to look at the moon. Four months later Galileo did the same thing. But Galileo shared his discovery to the world through publication. Harriot did not.

Harriot discovered Snell’s law of refraction before Snell did. Again, Harriot did not publish.

Galileo published his findings on the universe in The Starry Messenger just 10 days after making finishing his observations.

Last year Jesse James Garrett coined the word Ajax and described its use. I have heard any number of people saying that they have done this before, it isn’t really new and on and on.

But they didn’t publish the idea. They didn’t share how to do it with anybody.

And that is my point. If you come up with a new idea, and want to take credit for it, share it with the world and you will get your recognition.

Writing is the technology that brought humans to the next level in advanced technology. Civilizations that prevailed in the past were literate. They could send messages, design things and communicate their ideas through their writings. For every Leonardo da Vinci there are innumerable inventors who carried their ideas to the grave. Writing is the power that can make your ideas transcend time.

Yet writing is looked upon by so many developers as a necessary evil. Not as a technology that will bring to light your application from a backroom mystical magic creation that no one understands but you.

Writing is the same as documenting in the software world. A good design document is as valuable as the source code. It is the most efficient way to communicate how the code should work. Along with a white paper describing the project, a sequence diagram, use cases and other UML diagrams can only help clarify the ideas.

Don’t talk about “self-documenting” source code and expect a developer to understand how it is supposed to work. That is a flawed premise.

First of all, communicating by source code is very inefficient.

Secondly, if the source code is “self-documenting” that means it must be bug-free. How are you supposed to know if a behavior is a bug or not? According to the “self-documenting” source code, there can never be any bugs.

Thirdly, if you document your project, it makes it easier for you to understand how things function. The writing process brings focus on your ideas and that focus may bring refinement to the project.

Finally, as people ask you how the project works, you can use your design documents to explain. You don’t have to spend your time talking about the project; you can refer them to the design documents.

This will make you more efficient and productive, and may even bring you recognition.

Reference: http://magma.nationalgeographic.com/ngm/0305/resources_who.html

Amir Shevat

AddThis Social Bookmark Button

Recently, I have attended a few lectures about service-oriented-architecture (SOA). As we all know, there is a big buzz over SOA and most of that buzz ties-up SOA with Web Services (WS). I do not think this coupling is required or even beneficiary for both technologies.

SOA is an architectural paradigm whose goal is to achieve loose coupling among interacting software applications. Applications invoke a series of discrete services in order to perform a certain task. A service is a unit of work done by a service provider to achieve desired end results for a service consumer.

Web services provide a standard means of interoperating between different software applications. When an application calls web-services it actually invokes remote methods on other applications with the use of XML as a communication protocol (usually over an HTTP transport protocol) .

The common conception is that SOA should be implemented using the WS technology. Most of the WS implementations are based on HTTP as a transport protocol. This fact sets a very big limitation when you use WS to implement SOA. HTTP is a request-response protocol that confines the SOA implementation to a client-server type of services. What do we do if we want asynchronous service invocation? What do we do if we want to build an SOA-event-driven application?

WS can, of course, provide asynchronous calls however, doing so is very cumbersome and requires periodical checking for response by the client or, forcing the client to have its own web-service to handle the response. The “periodical checking for response” approach will probably collapse in a real-world/heavy-load scenarios. But the broader question should be: is it really necessary for every service provider and service consumer to have their own HTTP web-server?

And then there is the question of XML.

XML is hardly the most efficient communication protocol. Some people like XML because it is readable and comprehensible by humans. As oppose to binary data, XML is very easy to edit and understand. Those attributes of XML are a big advantage when one uses XML as a way to configure an application. However, this does not necessarily mean that XML is the suitable means to pass information between applications. We would have computers communicate through spoken language if “comprehensible to humans” was our primary concern in choosing a protocol. Often, other issues such as performance are much more critical to the success of the implementation. Other people say that XML is language independent. I do not buy that. We could have thought of an efficient binary protocol that would be language independent and an acceptable standard. XML is definitely not the only way.

My point is that SOA is cool and WS might be one of the ways to provide access and invocation of some services in and SOA environment. But, other services are better implemented with other technologies. Asynchronous services, for instance, might be better implemented by asynchronous messaging (such as JMS). Heavy duty services, where high volume of data need to be passed between the consumer and the producer may use XML as a control channel (session initiation) but other means to pass the actual data.

The bottom line is that we need to choose the right technology to fit the right task and not to go blindly with the crowds. I guess that this is a good advice for life in general…

Are SOA and web-services really synonymous?

Dejan Bosanac

AddThis Social Bookmark Button

I’ve played a lot with the ActiveMQ JMS provider these days and I think that it is a very good product. Its major weakness is a lack of the proper documentation, which makes an initial introduction to ActiveMQ to last longer that you would expect. In this post I will explain a workaround for some of the issues that I have found, that could save you some time (in case that you get in the same situation as I did).
First of all, let me explain what I have tried to achieve. In my project I wanted to have a queue that would receive messages and process them. In case that message processing throws an exception, I wanted the broker to try three more times before quitting and send that message to the dead letter queue (DLQ).
The simplified listener method that should do the work (when the system is configured correctly) could look like this.

public void onMessage(Message message) {
  try {
      process(message);
      session.commit();
  } catch (Exception e) {
      session.rollback();
  }
}

The message is processed and if all goes smooth the session is committed, which tells the broker that the message is successfully consumed. If any exception occurs, the session is rolled back, which should trigger the broker to send it again (if it complies with its redelivery policy).
As you can assume this solution didn’t work, and here’s why:

  • Redelivery policy configuration does not work in 3.1 - You can configure broker to use certain redelivery policy. It could be done both in the XML configuration file, by specifying the

    <redeliveryPolicy backOffMode="true" maximumRetryCount="2"/>

    tag. You can also try to do this programatically if you are using an embedded broker. But none of this doesn’t seem to work in 3.1 version.
    So before you spend a lot of time trying to make this work in 3.1, please upgrade to 3.2
  • DLQs are working only for topics with durable subscribers - as far as I could find in various forums (and by browsing through the code), DLQ mechanism works only for topics that have durable subscribers. So even if you make redelivery policy to work (in 3.2), DLQ mechanism will not work for ordinary queues. I’m not sure why this is, but it certainly didn’t what I needed.
  • Since DLQs are just ordinary queues, here’s a tip on how you can avoid these two issues:

    public void onMessage(Message message) {
      try {
          process(message);
          session.commit();
      } catch (Exception e) {
          try {
               if (((ActiveMQMessage)message).getDeliveryCount() >= maximumRetryCount) {
                   session.commit();
                   DeadLetterPolicy dlp = new DeadLetterPolicy();
                   String dlq = dlp.getDeadLetterNameFromDestination((ActiveMQDestination)message.getJMSDestination());
                   MessageProducer producer = session.createProducer(session.createQueue(dlq));
                   producer.send(message);
                   session.commit();
               } else {
                   session.rollback();
               }
          } catch (JMSException jmse) {
    	//log the exception
          }
      }
    }

    Our previous example is changed so that now we have an improved exception handling. When the message processing throws an exception, we first check how many times the message has been redelivered. In case that the redelivery count didn’t reach the maximum, we should rollback the transaction (causing the broker to redeliver the message). Otherwise, we create an appropriate DLQ and send the message to it manually. We should first commit the transaction in order to instruct the broker that the message is finally consumed.
    The one of the drawbacks of this workaround is that maximum retry count must be configured for the consumer (listener) as well, since it completes this job now. Of course, if you are using Spring or some other project that enables easy application configuration this is not such a big deal.

    Have you expirienced some of these limitations? What were your workarounds?

    Paul Browne

    AddThis Social Bookmark Button

    Related link: http://www.oreillynet.com/lpt/a/6363

    I used to view colleagues that were interested in testing and bug tracking as people that should get out of the office a bit more and live a little.

    That was many years ago, before I discovered XP, JUnit and the joys of agile programming. Actually the real reason for my change of heart was the fact that if you ignore testing and bugs, they will come back and bite you - the number one cause for late nights in the office when you would rather be elsewhere.

    Having said that, I’ve still to discover a bug tracking tool that I really like. I was ashamed to admit it recently, but ever since O’Reilly published the article Bug Trackers - do they really all suck I know I am not alone.

    Have you found a bug tracking tool that you really like? If so please let me know.

    Advertisement