Posted:
22-April-2008 10:47 Carlos, It is important to understand that in the resource oriented computing abstraction the logical address is not interpreted until it is given to the resolved endpoint. Here are some examples of logical addresses: ffcpl:/resources/programs/myprogram.bsh 445-00-0073 914-337-0985 978-0890420256 (Those are a URI, SSN, telephone number in the US and ISBN-13) These are all valid logical addresses in the context of a ROC system. As you know, NetKernel currently supports only URI addresses. When one observes a limited set of address patterns it may be tempting to look to the microkernel to provide some interpretation of the URI in order to make the coding of accessors easier. However, this would violate the abstraction. The NetKernel Foundation API (NKF) does provide some assistance to endpoint developers above the microkernel and within the context of supporting URI address processing. An endpoint that receives a URI address may ask NKF to parse the URI as an active: scheme URI and provide ways to get at the parameter information encoded in the active: scheme. This is why you can code: context.getRequest().getArgument("operand"); |
Instead of having to do this: context.getRequest().getURI(); |
and parse the logical address yourself. Even with this assistance, it is important that the accessor interprets the URI and determines if any sub-requests should be issued. For example, with this URI: active:mapper+operand@ffcpl:/myURI |
how can the microkernel know whether the mapper is going to read the operand URI and map it to another URI or simply issue a sub-request for that URI? It can't and it shouldn't. Regarding your point about code that you see replicating across your accessors, you could refactor that into an abstract class. -- Randy |