SOA Product Marketing Lessons from Burger King - to ESB or not to ESB

Paul Brown @ 2003-11-23T08:00:00Z

On a walk with my wife Friday night, I was struck by the number of optometrists crammed into one stretch. Perhaps my neighborhood is just full of myopic people, but it is a well-known fact that the best place to put a Burger King is across the street from a McDonald's. This got me thinking about the ESB and product marketing in the service-oriented architecture space.

Being first is good, e.g., “first-mover advantage”, if people know where you're going. I think that the ESB (Enterprise Service Bus), a term coined by Gartner for one of Sonic Software's products, is going to turn out to be an interesting case study, since, as Dave Chappell points out, it seems to be turning into a legitimate product category with the in-kind entry of IBM and WebMethods. (A messaging bus itself is not new: the first three letters in TIBCO are an acronym for The Information Bus, software that was developed in the mid-1980's and whose commercialization formed the basis for TIBCO's products.)

The question of the moral higher ground in the ESB space is moot: with a concise definition, a burger is a burger, so decide whether you want it flame-broiled, prefer a bundle with industry-leading fries, or would rather spend three times as much to get it on a plate with table service. (If you ask me, the best burgers on the planet are served at a tavern in Portland, OR.)

While I haven't decided what I think of ESBs as an architectural construct, we need more concrete concepts like the ESB as a means of customer education and categorization. In my non-MBA's view of software product marketing, any marketing message boils down to, in no particular order, who it's for, what it is, why it's necessary, and how it's used.

The challenge for vendors in the service-oriented architecture space is to create more burgers.

(comment bubbles) 0 comments

SAX Events as an Alphabet

Paul Brown @ 2003-11-22T08:00:00Z

Applying XPath to a SAX stream for filtering or selective construction of heavier-weight objects (like a DOM) is one of the PAQ (perennially asked questions) on xml-dev.

Almost two years ago, I was fooling around with an approach to applying XPath expressions to SAX streams by looking at the SAX events as the letters in an alphabet and passing them through a collection of automata. If the automaton hit an accept state, the expression had a match in the document. My plan was to use the concept for high-performance XPath-based routing of streaming XML documents, and initial indications were that a SAX parse with queries was substantially faster than building a DOM (with no queries) for smallish (~5kb) XML documents.

Like most weekend projects, it eventually went by the wayside, and even then I had skipped some of the nastier bits (e.g., reverse axes) of XPath and only got as far as implementing the necessary operations to merge multiple machines together on AND and OR. (Anders Moeller's dk.brics.automaton does a nice job for plain old regular expressions.)

And I would have been late to the game anyway… Apropos to a recent posting on Slashdot, if I'd thought to type the query XML and event and “finte state” into CiteSeer, I would have seen that other people were already looking at the problem in similar ways. Specifically, I would have found a paper from 2000 by Mehmet Altinel and Michael Franklin in which they discuss a scalable, event-driven, finite state machine-based approach to executing XPath queries.

This is top-of-mind right now because I ran across some recent work from Feng Peng and Sudharshan Charwathe that uses a hierarchical arrangement of pushdown transducers to model an XPath expression, and it will actually draw the hierarchy! The project is called XSQ, and there is a poster that gives a nice summary and an example.

(Among others, Dan Suciu's XMLTK and the YFilter project are also worth a visit.)

(comment bubbles) 0 comments

Pi Calculus and Product Placement

Paul Brown @ 2003-11-18T08:00:00Z

Peter Fingar and Howard Smith have published a short paper entitled Workflow is Just a Pi Process and publicized it with a message on the W3C Choreography mailing list and a message on the BPEL TC mailing list. (I will at some point have to read BPM: The Third Wave, but it's deep in the queue.)

Point?

It would be easier to take the paper seriously if the key reference were available for review and if it didn't do product placement for Intalio every few paragraph... (Product placement in a semi-serious piece of work is an interesting concept: I wish I had thought about financing my academic research by, e.g., naming variables Coke and Sprite instead of foo and bar or using specific makes of automobile in sample problems. NSF funding comes and goes, but people always drink Coke...) Nonetheless, the paper may contain an idea, and that's pretty good - for discussion at the least. (I attribute the quip that "most papers contain at most one idea while good papers contain at least one" to J.P. Serre.)

Counterpoint(s)

The Smith/Fingar paper takes some pretty broad strokes at workflow and at pi calculus, and there are already enough well-qualified people taking the other side of the discussion that I probably won't add anything productive:

  • Wil van der Aalst has been thinking about this sort of thing for a while and has a website dedicated specifically to workflow patterns. After being attacked by Smith on the BPEL list, Wil van der Aalst supplied a response on the choreography list.
  • The paper also provoked a response from the WfMC. The paper is titled Does Better Math Make Better Business Process? and is written by Jon Pyke, the WfMC Chair, and Roger Whitehead, the director of Office Futures.
  • The fact is that pi calculus, with some enhancements, is well-suited to modeling workflow-type interactions, but just what the "best" set of enhancements is (with respect to usability and economy of expression) and how one maps an agreeable XML description language (e.g., BPEL) into executable units isn't so plainly obvious. (People have invested significant thought just into enhancements; see, e.g., join calculus.)

The Point

The point is the commonly-held vision that process orientation will be a next step for software engineering where a new abstraction will subsume (some of) the current complexity associated with state, communication, and description. Compilers and object-oriented languages represent earlier advancements, and it's worth recognizing the difference between the aesthetically ideal approaches and the ones that won in the marketplace.

In fact, the execution back-end should not be the focus of a business process management or workflow management vendor, since whatever output a design tool generates can probably be mapped into a number of different execution models. (This doesn't address runtime management, retrospective analytics, and notifications, but those can also be built modularly on top of a clean implementation of an execution environment.) Vendors will compete and customers will (and currently do, by and large) make selections based on the richness of the business functionality (localization, security, identity, rules, AI,...) that a system provides as well as the accompanying methodology for modeling and remodeling processes.

It's Not All Bad...

As a former mathematician, I'm happy whenever anyone gets out the pompoms for something that involves regular languages, automata, graphs, etc., even if it reads more like a marketing piece than (somewhat) serious work. If it involves a spectacularly complex way to add numbers, so much the better. I also love detail, precision, and thorough argument.

I will be very happy if pi calculus replaces Fermat's Last Theorem, Good Will Hunting, A Beautiful Mind, or (please please please) fractals as the standard conversation that follows "Oh, so you're a mathematician..." at cocktail parties. (It's like asking a cardiologist about bunyons.) Just the same, if I wasn't busy, I actually enjoyed the people who used to knock on my office door with a proof that π (3.1415..., you know) was a rational number, a proof that P=NP, or even the occasional chemist or physicist with an interesting geometry problem.) Ultimately, interest will generate funding for fundamental research, and that's good.

(comment bubbles) 0 comments

WYSIWYGINWYRW

Paul Brown @ 2003-11-16T00:00:00Z

I've spent time this weekend working on a couple of book chapters in Microsoft Word. After a few hours wasted pasting and repasting code snippets and tagging text with different formats, I've come to the conclusion that WYSIWYGINWYW, i.e., WYSIWYG (what you see is what you get) is not what you really want. At least, it's not what I really want. With the millions of lines of code and thousands upon thousands of hours of testing and refinement in Microsoft Word, has it really gotten us anywhere? I suspect that the $10B annual cost of solitaire and other games in the workplace pales in comparison to the time spent tweaking bullets, mapping to and from outlining formats, and dealing with header/footer transitions.

I will admit to being "old school" in that I like to put two spaces after a period even though aesthetically challenged people insist that it's no longer necessary with proportional-width fonts. (See, e.g., this note.) My progression of text creation devices started with a mechanical typewriter that jammed if I typed more than 35-40 words per minute, and progressed through DOS versions of WordPerfect and Microsoft Word on the Mac to TEX, which served me well from 1989-1999 (other than a brief detour into troff). And then it was back to Microsoft Word for "collaboration" with others, but using the markup in SnipSnap is making me nostalgic.

I want:

  • a textual format that is amenable to diff, patch, and revision tracking tools;
  • relatively simple markup like wiki or TeX that is less limited than HTML and less daunting than DocBook;
  • support for code (like DocBook or SnipSnap's {code} macro) but with TeX's uniform support for both inline and displayed elements;
  • support for in-line annotations (like DocBook); and
  • straightforward management of inclusions and artifacts (like table of contents or indexes).

And I want my coauthors and coworkers to like the fact that I use it.

(comment bubbles) 0 comments

Create Multi-Level Delimited Output from a SAX Stream

Paul Brown @ 2003-11-13T00:00:00Z

One of the standard questions about generating non-XML output from an XML document is how to produce CSV, and a natural generalization is how to produce multi-level delimited output with a comma for one level, a semi-colon for the next, etc. This task can be accomplished with XSLT, but it can also be accomplished (perhaps more simply) with SAX and Java.

This post illustrates how to build a org.xml.sax.ContentHandler that turns an XML hierarchy into an equivalent hierarchy of delimited text, along with a trick for dealing with whether delimiters go before, after, or between tokens. Putting a delimiter before or after each token is straightforward, and putting a delimiter only between tokens is equivalent to putting a delimiter before each token other than the first one.

Code

First, we need a few imports and a class declaration:

import java.io.IOException;
import java.io.Writer;
import org.xml.sax.Locator;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;

public class DelimiterizerHandler
  extends DefaultHandler {

The choice to extend DefaultHandler as opposed to implementing ContentHandler is arbitrary but does save typing a few empty method bodies, since we're ignoring things like processing instructions.

These contants control the placement of delimiters at each level, and the two arrays hold the delimiters and placements for each level. (The 0th level is the top one.)

  public static final int DELIMITER_BEFORE = -1;
  public static final int DELIMITER_BETWEEN = 0;
  public static final int DELIMITER_AFTER = 1;
  private int _depth;

  private String[] _delimiters;
  private int[] _directions;

The array of boolean flags is used to track whether the first token in a group has been output, and the integer is used to track the maximum expected depth of the hierarchy. (This is better than either of the alternatives: lots of bounds checking or ArrayIndexOutOfBoundsExceptions.) The boolean flag is used to control text output.

  private boolean[] _flags;
  private int _maxDepth;
  private boolean _enableText;

The rest of the fields hold objects supplied either by the user or by the XMLReader that is sending events.

  private Locator _locator;
  private Writer _w;

The constructor does nothing more than configure the internal parameters:

  public DelimiterizerHandler(String[] delimiters, int[] positions) {
    _delimiters = delimiters;
    _directions = positions;
    _maxDepth = positions.length;
    _flags = new boolean[_maxDepth + 1];
    if (_delimiters.length != _maxDepth) {
      throw new IllegalArgumentException("The cardinality of delimiters and positioning flags must be equal.");
    }
  }

Thus, if we wanted a CR-LF pair after all top-level records, a semi-colon between all second-level records, and a comma between all third-level records, we would use:

  new DelimiterizerHandler(new String[] {"\015\012",";",","},
    new int[] {
      DelimiterizerHandler.DELIMITER_AFTER,
      DelimiterizerHandler.DELIMITER_BETWEEN,
      DelimiterizerHandler.DELIMITER_BETWEEN
    }
  )

Keeping track of Locator information is not strictly necessary, but it is useful in providing detailed error information with a SAXParseException.

  public void setDocumentLocator(Locator locator) {
    _locator = locator;
  }

Next, we need setter/getter methods for the output java.io.Writer and some convenience methods to avoid wrapping each output operation with a try/catch block. (The method bodies will be in-lined by the JVM at some point anyway.) Notice the use of SAXParseException to provide detailed exception information through the Locator that the XMLReader passed to us.

  public void setWriter(Writer w) {
    _w = w;
  }

  public Writer getWriter() {
    return _w;
  }

  private void out(String s)
        throws SAXException {
    try {
      _w.write(s);
    } catch (IOException ioe) {
      throw new SAXParseException("IOException creating output: "
                                  + ioe.getMessage(), _locator, ioe);
    }
  }

  private void out(char[] c, int start, int len)
        throws SAXException {
    try {
      _w.write(c, start, len);
    } catch (IOException ioe) {
      throw new SAXParseException("IOException creating output: "
                                  + ioe.getMessage(), _locator, ioe);
    }
  }

The startDocument event initializes the state of the handler when the XMLReader starts sending events. In practice, the right place to put initialization code is in the startDocument event. In theory, an XMLReader is required to always call the endDocument method on ContentHandler, so clean-up code could be placed in the endDocument method.

  public void startDocument()
        throws SAXException {
    if (_w == null) {
      throw new SAXParseException("No output Writer is configured.",
                                  _locator);
    }
    initFlags();
    _depth = -2;
  }

The starting value for _depth is selected based on my habitual preference for preincrement versus postincrement and the assumption that the document element in the input XML does not count as a level.

The characters method has a gate on it to prevent the output of superfluous whitespace between elements, and this represents the assumption that some amount of superfluous whitespace may be floating around.

  public void characters(char[] c, int start, int length)
        throws SAXException {
    if (length != 0 && _enableText) {
      out(c, start, length);
    }
  }

The meat of the handler is in the state tracking code for the startElement and endElement events.

  public void startElement(
    String uri,
    String localName,
    String qName,
    Attributes atts)
    throws SAXException {
    if (++_depth > _maxDepth) {
      throw new SAXParseException(
        "Depth of XML exceeds number of delimiter specifications.",
        _locator);
    }
    if (_depth > -1) {
      if (_directions[_depth] == DELIMITER_BEFORE
        || (_flags[_depth] && _directions[_depth] == DELIMITER_BETWEEN)) {
        out(_delimiters[_depth]);
      }
      _flags[_depth] = true;
    }
    _enableText = _depth > -1;
  }

  public void endElement(String uri, String localName, String qName)
        throws SAXException {
    if (_depth > -1 && _directions[_depth] == DELIMITER_AFTER) {
      out(_delimiters[_depth]);
    }
    // clear the flag for the level above
    if (_depth < 2 && _depth > -2) {
      _flags[_depth + 1] = false;
    }
    --_depth;
    _enableText = false;
  }

The initial setting of _depth at -2 means that once the document element is consumed, _depth is -1, and then when a first-level element is encountered, _depth is zero after the initial preincrement operation.

The text output enablement here is a bit kludgey and, as-is, only really protects against whitespace that occurs outside of the first-level elements.

This utility method initializes the flags by running through the array. This could be substituted in practice by simply creating a new array, since boolean variables are initialized to false in my experience, but I've never looked at the Java language specification to see if this behavior is specified.

  private void initFlags() {
    for (int i = 0; i < _maxDepth; ++i) {
      _flags[i] = false;
    }
  }
}

The best way to see how the various pieces work together is to use a Java debugger and step through the code.

Enhancements

This code can be extended to provide some additional behaviors like outputting the local name of the element at some levels, in which case this provides a simple (and very fast) way to reproduce things like EDI messages from XML representations.

(comment bubbles) 0 comments

VNC for Web Demos and Collaboration

Paul Brown @ 2003-11-06T01:00:00Z

At various times, we've used Webex, Centra, and Placeware for on-line demos, sales meetings, and collaboration. All have their benefits (record sessions), differentiators (private network, voice over IP), and pitfalls (platform, browser version, or firewall incompatibility), but I had to kick myself a couple of days ago when a partner of ours used VNC to host a web demonstration: free, cross-platform, good enough web collaboration software had been staring me in the face for almost four years. (I've been using VNC for remote server management for years.)

So, earlier in the day, I hosted a web session for remote clients on Windows and Linux machines from my PowerBook with a simple, single-port NAT hole through our firewall and voice hosted our usual conference call system; total cost (other than the conference call) and total hassle of zero. I wish I'd thought of this a couple of years ago.

(comment bubbles) 0 comments

The Prisoner's Dilemna and Post-Bubble Software Sales

Paul Brown @ 2003-11-06T00:00:00Z

The Prisoner's Dilemna is a classic, simple game where players must choose between collusion and defection. The short summary is that collusion is preferable but requires trust between the participants, and thus the Prisoner's Dilemna is used to model many biological and economic scenarios.

Vendor vs. Customer and Vendor vs. Vendor

There are two Prisoner's Dilemna configurations in enterprise software sales: one between any one vendor and the customer, and one among the competing vendors. Consider the standard sales pitch: "We provide a total solution to every problem, and our total solution is better than the next guy's." The vendor knows that this is false, and the customer knows that this is false from experience if nothing else.

The vendors have to assume that at least one of the other vendors will optimistically assess their capabilities (i.e., be dishonest) in this fashion, so every vendor choose the defection option. (As an aside, optimistic assessment, within reason, is one strategy for building a business, i.e., sell what you can build, and the customer may actually win in the balance. However, unless that's something that can be replicated over and over, it's also a going out of business strategy, viz. Ponzi.) Conversely, the customer genuinely wants to believe in an easy answer and chooses to trust every vendor who can make a credible case.

Destructive Symbiosis

Which came first, the expectation of easy answers or the dismissal of difficult questions? Either way, it's bad for all involved, as the frog and scorpion both drown.

I worked on an RFI a few days ago, answered "No" to things that our product didn't do, answered "Yes" to the things that it did, and ended up making the initial cut for the confused but pleasantly surprised customer. Time will tell if I made the right choice, but from my perspective, it was a simple proposition: why fight for a ticket to a losing game?

(comment bubbles) 0 comments

All Posts contains 398 items in 57 pages of 7 items each:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57