Subject: [alto] Reprise of REST comments

From: "Thomson, Martin" <[email-masked]>
Date: Wed, 10 Nov 2010 15:18:38 +0800

I apologise for this being a reprise of previous comments, but I still feel like the current alto protocol is causing you a lot more work than you need.  

You really want to spend less time on dealing with protocol construction and more time on optimizing cost maps.  By building your own protocol, I don't think you get that.  

The delta between what you have and something that relies more heavily on existing protocol (i.e., HTTP) work is not that large.

There are two things that you should be doing:

 1. describe the data that you want a client to acquire (the fun stuff)
 2. describe how a client might find where information is (the dull and messy stuff)
 3. describe how a client might ask for information, if necessary (the yucky stuff)

If you define formats, and give them MIME types you get part 1.

If you then define meta-formats you get part 2.

If you define a query format for cost map filtering and anything that needs it, you get part 3.

Do it right and you don't have to worry about caching, or the sorts of issues that you are trying to re-invent the wheel for (for example: the ServerA ServerB load sharing example in Rich's presentation just now; load sharing does not need to be visible to clients.  There is lots of experience in building scalable HTTP infrastructure.).

That means that extensions the like of what we're seeing might be done without having to talk about protocols.  All you do is define the format and how that format is identified in the meta-format and discovery parts.

Something like:

 Server has document that lists 
   where a cost map is found
   Where a filtered cost map might be acquired by providing filtering criteria
   Where an endpoint map is found
   And so forth for each of the types you have, plus all the extensions that the server might support

    </alto/costmap>;title="Complete network cost map";type="application/alto-costmap"
    </alto/cost?{ip}>;title="Filtered cost map";type="application/alto-costmap"
    <http://other.server/alto/ep>;title="Complete endpoint map";type="application/alto-epmap"
   
  At the end of each of those links you either find a resource that contains the desired document.

  You use content negotiation and MIME for version negotiation (you don't need to specific versioning stuff that you have already)

  You can also use MIME for identifying the cost types to help a client in selecting the right URL: 

    application/alto-costmap;type=hopcount;mode=ordinal

  Clients can share links (deep links might stop working occasionally, which would necessitate re-discovery, but that's not a big deal).

  HTTP caches (and CDNs...) can redistribute the data

Have a look at RFC 5988 and draft-core-linking for information on how you might provide a collection of links.

Cheers,
Martin