Showing posts with label aggregation. Show all posts
Showing posts with label aggregation. Show all posts

Monday, June 20, 2005

On Iframes, WSRP, REST and Portals

I'm still getting lots of good feedback to my presentation on REST - the web style (background) which I will summarize shortly. One of the more curious responses was to something that I didn't even dwell on in the presentation; indeed I think I skipped past it in my concern to get the big picture articulated. I suppose it was the proximity of yet another acronym, WSRP, to a couple of slides about complexity in the IBM technology stack, and a very public case study bemoaning the fact that Websphere Portal only added bookmarking after 3 years that raised a little concern. This was part of my subsequent response to one of those comments, slightly edited for clarity.

On Prescience


I fully agree, we should celebrate any and all who contributed to us internalizing the web style in WebSphere Portal. We should be very explicit about the pain we and our customers suffered and the evident gains that came once we learned our lesson.

The notion that it was still a struggle to get that simple feature (the ability to bookmark) included in the WebSphere Portal 5.1 release is actually a commentary on our previous attitude to the web style.

I would add to the list of those to be celebrated, those screaming Cassandras who were incredulous that we could ship a web product while ignoring url addressability and even tried to prototype some rudimentary addressability and sneak it in back when we had commit privileges to the core. If only we had had more nerve or had been able to better communicate the importance of this point... I know it normally takes 3 releases for a product to become useful, but sometimes magic can happen in the first release and with that comes thought leadership (Glory) and perhaps also some money (Gold).

On Iframes, WSRP, REST and Portals


Leading with the iframe invocation argument was always the weakest argument of those who I'll cast as the "K-stationers" in the early days of WebSphere Portal. After all, and like you note, even though iframes may provide
  • easy integration of existing content
  • multi-threaded download in the browser to lower the latency for the user
  • caching closer the client (indeed in the client)
  • offloading the portal by removing a layer of indirection in the portlet -> portal server -> client browser route
  • introducting the possibility of moving aggregation to the client (leveraging Moore's law and bandwidth increases to the client)
  • further recasting the "Portal Server" to a "Portlet server"(in other words there should be no difference between a "remote" and a local portlet) etc . That is the lesson of uniform interfaces in the web (e.g. URIs)

Now that's a pretty strong "weak argument" but we should acknowledge that Iframes also have downsides. Iframes mess with user expectations especially with respect to focus and some browser conventions are a little upset by them (e.g to bookmark, you need to right click on the frame in question). Browsers did solve the issues with the navigation history after a few years, but there was a little confusion in the interim with back button and refresh etc).

6 years on, I hope I have learnt to recognize the stronger aspects of an argument about systems design. What we didn't recognize or adequately evangelize was the value of the other aspect of an approach that more fully embraced the web, namely:
Basing the application semantics of the portal directly on URIs and the use of those 4 verbs that are the core of the web.

To explain, HTTP is an application-transfer protocol. It is something that works at the application layer. It has its native notion of how CRUD like operations are done (GET, POST, PUT, DELETE).

The REST proposition again:
  • Identification Of Resources
  • Manipulation Of Resources Through Representations
  • Self-Descriptive Messages
  • Hypermedia As The Engine Of Application State

I haven't kept abreast of WSRP in the past 5 years and thus my characterization of it was perhaps a little careless, but that's what you do when you make a presentation that borders on the provocative. In mitigation, I'll confess to being what I've termed a Layer Stripper.

Let me handwave a little... It strikes me that building an application protocol with CRUD like functionality that will typically (or even solely) be used over HTTP can lead to a little impedence if one is not careful.

To take my Technical Arteriosclerosis Terminator scalpel to WSRP, I would only ask:
  • Do the CRUD like operations in WSRP map one to one with HTTP's native semantics? In other words, is the moral equivalent of a PUT in the WSRP world implemented as a PUT when the "transport" is HTTP?
  • Is this true of at least those 3 verbs at the core of the Web (GET? POST? DELETE?). (I'll assume that WSRP adds perhaps more verbs in its applications semantics).
  • Are the security primitives going to be leveraging HTTP's native security features or are we rolling our own?
  • Are there any other "transports" other than HTTP? Is there a CORBA mapping for WSRP?


RFC 3205 On the use of HTTP as a Substrate should be required reading here.

I'll suggest that if we were starting from scratch we might do the following
  • Start with Resource Modeling and ask: what are the core resources that need to be identified in a remotely invoked portlet?
  • What representations need to be returned? For this we'd probably pick some standard Portal XML vocabulary or, for browser rendering, an XHTML format, for pervasive rendering some other Markup Language
  • What are the operations that need be performed on said resources?
  • What HTTP verbs are appropriate for each operation when we manipulate those resources?


Joe Gregario's Show Me The Code column has been going through this exercise with the example of a bookmarking service - well worth reading. A remote portlet may have more complex semantics but one should go through this to clarify our design and architecture. I assume that WSRP implementors went through such a process as that spec was standardized.

The result would be something like simple URI commands returning representations and manipulating them using well-worn HTTP semantics. I very much hope that is what WSRP has evolved into. We'd get:
  1. Visibility to HTTP intermediaries, first the caching proxies in the web sense. (like the page caching in the portal)
  2. Since we'd be using URIs, someone may think up new uses for our remote portlets and be able to easily embed them in their application through simple hyperlink and the use of the appropriate verbs etc. Third party Glue Layer people could "remix" our portlets through pipelining and filtering or whatever else those people do (I'll note that IBM recently bought Gluecode)


With this approach there is no API per se, the interface contract is explicitly manifested in the exchanged hypermedia and associated operations on the resources.
"What? No API?" "This RESTful stuff has no substance". "Where is the value add?"

That indeed is the paradox of the web style. The "API" is typically HTTP/URI/HTML/XML.

The fourth plank of the REST proposition is a difficult thing to internalize, I certainly couldn't express it adequately 6 years ago.
"Hypermedia as the engine of application state"

Ponder that for a few weeks.

[Update] James Snell adds: "HTTP is the programming model".

Some have suggested that one would additionally require some service description language, perhaps WSDL, for such a service. On that, the jury is still out. In the example I highlighted in the presentation, Google Maps didn't publish any WSDL. Craigslist didn't publish any WSDL. They simply had a clean URI api with well-defined parameters that were obvious to any developer with a week to spare and idle curiousity satisfied by the View Source impulse. It was obvious what verbs to apply: POST or GET, PUT (they don't delete their maps, but if they did, that is how one would proceed). Third party intermediaries simply figured out that url hierarchy and the associated verbs, the identified resources and what formats the representations were retuned in. Then they manufactured serendipity. Now there is no binding contract and things can get broken at any time but it wouldn't be in Google's interest in their competition with Mapquest or Terraserver to break people that compose applications on their platform and brings eyeballs and mindshare to their company.

This then is my argument for changing the frame of the debate:
There's a complexity and layering argument that naturally falls out of the REST viewpoint which should guide the applications that one builds.

The web is about identifying important resources and exchanging representional state. There are certain constraints that are made to enable global scope and evolution. Being on the web, is being an active participant in this scheme of things.

Identifiers lead almost to having the location field as the command line.

Resource modeling as your starting point sets you in direct consonance with this notion and exposes you to ease of composition.

e.g. Jon Udell's Library Lookup project

An information architecture that starts with hypemedia lends itself to the construction of simple interaction designs for both humans and machines, and there are huge amounts of tools readily available for this.

The question is then one of leverage; leverage in economic terms is all about making externalities work for you. The endpoint of this approach to system design is what I call a virtuous cycle of managed serendipity.


One response to this piece was that actually WSRP stood up quite well to those questions I had hand-waved in its direction, apparently it was not too complex, it addressed wider issues and use-cases etc. I think that is great and hopefully the leaks have been plugged in that spec so that it can be mapped reasonably to HTTP; I guess the argument is that it is not an unnecessary layer. I'm still unclear if WSRP is ever used with a "non-HTTP transport" or security, I'll dig into that at some point. In any case, the point of my talk was the same scrutiny should be brought to bear on all of IBM's technology stack and unnnecessay layers shed and/or leaky abstractions plugged to make them work better with the web style.

A later follow-up, privately-addressed, asked:
"Isn't a "portlet" fundamentally a presentation-level object? Why is the concept of "portlet remoting" not considered an oxymoron? Shouldn't we be talking instead about the simple expression of web services as data (with, perhaps, media-type detection as an enabler of polymorphism"
There was lots more and quite fulminant at that, I'd have to say that's all true and expressed more concisely than I did. It's good to know that there are like-minded people around. I didn't mention content-negotiation in my response but that is another aspect built into the web style that can be leveraged but that is constantly being reinvented at higher levels and layers. There's lots more to say but that's the lay of this technology world... In evangelism the first step is to get people sensitized, after that it's best to proceed one argument at a time.



P.S. I've been told there's been too much technology toli of late so I'll try to push some literary, musical or African toli to the head of the queue, it can be more fun and oftentimes more rewarding.

File under: , , , , , , , , , , , , , , , , , , , , , , , , , ,

Tuesday, June 14, 2005

On Tags in Technorati

In the great tradition of blogging allowing one to cc the world, here's a short email to David Sifry and support@Technorati

Enhancements to Technorati Tags


Great to see the beginnings of tag aggregation at Technorati in the past few months, the beta UI is even better. It's a great glue layer solution, one that got me to tag the 100 or so posts I've written on my blog. One nitpick: you seem to give undue great prominence to tags that use the technorati.com namespace. From reading the guide to Technorati tags, I had thought that other namespaces using the rel=tag attribute would show up in the aggregation user interface, but they don't seem to, at least not yet... What gives?

In any case, I have a couple of enhancement requests:

For members who have claimed a blog, in addition to the cosmos for a given blog, please provide
  1. a list or "tag cloud" of all tags used by that blog (or link to said tag list or cloud)
  2. Also for members-only, and for claimed blogs only, I'd like to see the list of tags used for a given post
For example, if I tag my forthcoming post about those parasites that got my blog temporarily consigned to the "Spam Blackhole in Technorati" a couple of months ago with "blackholes, spam, technorati" I should be able to later on navigate and see the list of tags used and not just from my blog but also from technorati.

Ideally the tags should be listed as hyperlinks under the post (ala delicious) but I would settle for a nice new icon like the ubiquitous cosmos icon (great branding by the way). When clicked it would display the tags used.

Bonus points: display the list of tags others have used (extra credit) ranked by authority, or date. Some nice visualization could come into play also if one was to be ambitious to show the evolution of tags used over time. (And I'll buy you some Schnapps or Palm Wine).

I understand that such a feature would decrease performance since it ties the search engine more deeply with the tag aggregation engine. But it is so much nicer and promotes immediacy wouldn't you think? Being able to pivot on tags by simply clicking a link is very satisfying.

Bonus points, allow specification of uri parameters to slice and dice the tags, and blog posts, eg. being able to see all posts tagged with a given tag query. (with an option to specify internal tags and external). Your garden variety RESTful api at work here

I do that with del.icio.us as my poor man's categorization. For example, this is a link to my Cambridge Toli Chronicles

Lastly, and lowest on the totem pole of feature requests, how about some metrics about the tags used per blog. Statistics give some comfort to people. I'd like to know how many tags I've used. I can eyeball my tag list at delicious and figure out that its probably 100-200 or so (I'm so verbose). But I'm a lazy sort, and I believe in the Lazy Web.

A Technorati Tag Chat


P.S. don't you just love that Google has been so delinquent as to give you the opportunity to gain such a headstart not just in blog search but also now in tag aggregation since they don't even provide categories in Blogger. The current situation gives rise to chats like the following from just a few weeks ago:

Koranteng@Toli    did you mean this absurd sequence...< ol>
  • write a post...
  • post to blogger....
  • write tags in delicious (wait a few minutes to better get a sense of what to tag since, if you tag as you write, they aren't useful...
  • copy tags from delicious and generate technorati tags using technorati tag bookmarklet...
  • copy said technorati tags and paste in updated post to blogger...
  • and then if I feel like it (if I want to save it or if it is about to go into a for pay subscriber-only walled garden then furl my post copying keywords and navigating the awful ui for multiple topics therein...[Furl's UI for multiple topics is awful even though it could be easily fixed and I've sent suggestions to their support to no avail]
  • That's a twilight zone... not quite Orwellian but echoes of Beckett and Waiting for Godot

    JJMG    I have started three separate ST topics with you

    JJMG    (1) yes the absurd sequence although I thought it was
    1. add the technorati tags with the bookmarklet;
    2. copy the resulting tags out of the post and post your posting to delicious; I didn't know about furl
    JJMG    anyway, I can't believe how ridiculously many steps you have to make to post to your blog with tags

    JJMG    you'd think there would be a way to at least tag to delicious and technorati at once, and in fact these two postings imply that you can:

    JJMG    but you aren't using their technique

    JJMG    your HREFs at the bottom of your postings are all technorati hrefs

    JJMG    and then you just HAPPEN to post the same posting to delicious with the same tags

    Toli    all because Blogger doesn't implement categories.... I believe that typepad categories now get mapped to technorati tags...

    JJMG but those two pages imply that if you use HREFs that point to delicious, then they become technorati tags, but in fact it appears that they do not
    JJMG    (there is a rel="tag" thing in there which is supposedly what makes technorati think it's a tag
    JJMG    so, for instance, at the bottom of the freshblog's postings

    Toli    right but that is just technorati playing favourites in its aggregation ui to things that are 'proper' technorati tags

    JJMG    so at the bottom of the freshblog postings, all the hrefs are to http://del.icio.us/jrfj44
    JJMG    yours are all to technorati
    JJMG    yours actually work, but theirs don't, so I don't know why they document that theirs do
    JJMG    when I say yours "work" I mean that you can go to technorati.com/tag/ and you show up
    JJMG    when you do, say, technorati.com/tag/how-to, you don't get the freshblog thing in the technorati list, although you can get to it from the delicious list, so I kind of miss the point of what they are documenting in those two pages ...

    Toli    they might have but again technorati are the aggregator so they decide what happens... I really hope google buys all of these services up
    Toli    yep the spirit of the technorati inital proposal about the rel=tag implied the kind of flexibility but then reality stepped in

    JJMG    in fact those two postings I just sent you
    JJMG    they say
    JJMG    "I just learned that technorati tags do not need to actually link to technorati. This is important because for a while now I've been using delicious as a way to make categories on my blog posts. "
    JJMG    simply having the rel="tag" is supposed to make it a "technorati tag"
    JJMG    but -- again, the technorati UI doesn't seem to treat it the same way unless it really links TO technorati
    JJMG    anyway ...

    File under: , , , , , , , , , , , , , , , ,