WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

A space provides the context for resolving and evaluating a request. In NetKernel you can "program" spaces. That is you can declaratively configure the way that resource requests will be resolved to endpoints. It turns out that composing spaces allows you to create very elegant software architectures using a whole new world of architectural patterns (these are introduced and explained in the tutorials).

The following section very briefly explains how a space works. Don't worry if this seems very new. The tutorials take you through a hands on tour that will gently get you familiar with what is possible.

Endpoints

Endpoints are located in spaces. When a request is issued into a space, the space sends a resolve request to each of the endpoints it contains until one indicates that it will handle the request. That endpoint is then invoked with the request to evaluate (as we saw in the previous section).

2009-04-27 16:21ZCanvas 1Layer 1Spaceendpointendpointendpoint

Grammars

Endpoints are bound to a Space through a grammar, a technology that describes how an identifier is recognized and parsed. It is often convenient to use a grammar that maps sets of identifiers to an endpoint. This diagram illustrates a request for res:/person/teresa resolving to an endpoint that accepts requests for resources with identifiers in the set starting with res:/person/ by using a grammar with the regular expression res:/person/.*:

2009-09-16 12:50ZCanvas 1Layer 1Spaceendpointres:/person/teresa{res:/person/.*}

NetKernel provides three declarative grammar languages.

  • Simple Grammar allows very quick construction of pattern matching expressions
  • Active Grammar allows easy construction of normalized grammars for services offering an active URI interface.
  • Standard Grammar is a universal and very powerful expression language offering great expressiveness.

Since grammars define the boundary between address spaces and code execution its a good idea to explore and play with the grammar languages. The Grammars Kitchen tool provides a set of examples and an environment to experiment in.

Imports

In addition to partitioning a space into identifier sets, relationships may be established between spaces. For example, in the following diagram an import endpoint brings the resources of space "B" into space "A".

2009-09-16 12:59ZCanvas 1Layer 1Space ASpace BImportres:/person/teresa{res:/person/*}endpoint{res:/person/*}

Comments

The ability to define and configure identifier sets, spaces and relationships between spaces is very powerful. It allows system architects to define the logical structure of applications and systems without being constrained by physical level bindings, API limitations or even representation types.