A web application could expose a resource via markup or scripting.
As markup, an element could be used that acts as a proxy for the resource (e.g. the img element in HTML). The element's attributes and content can specify
- the URI for the resource when this is known
- optionally the URI for a resource broker
- metadata that the broker can use to locate a matching resource
- optionally security context information
Binding the resource may take some time and an event should be raised to indicate that binding is complete, and likewise when the resource is unbound.
The interface is decoupled from the access control mechanism, but there clearly needs to be a way to signal error conditions via suitable events.
The binding process should establish the transport path for subsequent exchange of events, and this may involve creating a peer to peer connection through one or more Firewalls and NATs. For managed services, the event path will be routed via a coordination point.