Subject: [nbs] A suggestion for an "on-demand API".

From: Javier Ubillos <[email-masked]>
Date: Tue, 07 Dec 2010 10:24:57 +0100

At IETF79, at some point after the name-based sockets BoF.
Together with Erik Nordmark and Christian Vogt, we sat down, discussed a
bit about name-oriented APIs and gravitated towards this idea:

The cost for behavior and an API should be incremental and optional, in
the sense that; you should only pay the price for a feature if you
really want to have it.

E.g.

* A web-server only requires a session-handle, the web-server will reply
to any-one initiating a session. No "extras" are asked for.

* Some other application might require authenticity of name->IP binding,
and is also prepared to pay the cost for that authenticity (typically a
round-trip).

An example:

Host A (A.left.org) and host b (B.right.org).

* Host A.left.net resolves "B.right.net" to IP(B).

* The packet received by B contains only IP(A) & IP(B).

* The application at B receives only a session-handle.

* Now, B can simply accept the session-handle and respond with data.
This would be the typical behavior for a web-server.

* Or, if B wants to know more, e.g. the IP and/or the name of the sender
it needs to query the API asking for it.

Asking for the IP should be trivial.
Authenticating the name (with the IP) would most likely come with a
cost. Either a round-trip to A, or a round-trip to DNS verifying the
name->IP.

Of course, the initiator could also set requirements for the
communication.

This way, all elements become optional, and are only used if the
application is ready to pay the cost for them.
In the trivial case, an application is simply only using an API which is
friendly and not paying the cost for any of the "extra" features.

// Javier