|
||||
IntroductionThis guide is a concise guide to NetKernel. It assumes the reader has a reasonable comprehension of the following standard technologies.
Things you don't need to know but which will eventually be useful.
Exec SummaryNetKernel is a URI request scheduler. All resources are requested through Universal Resource Acccessors (a generalization of servlet/CGI). There are two types of URA - data accessor and active accessor. URAs can make requests for other resources provided by other URAs. A process is a managed series of URA requests. NetKernel SchedulerNetKernel is a micro-kernel for scheduling and issuing Universal Resource Identifier (URI) requests. All NetKernel processes are comprised of URI requests. URI Requests are resolved and issued to Universal Resource Accessors (URAs). URAs are services configured to receive and process URI requests. URA's are generally implemented as Java classes - URA's are a generalization of earlier URI endpoint service technologies such as CGI or Servlet. URI requests to a URA may be of the following types
These types are NetKernel/URA specific and, though analogous, are nothing to do with HTTP (Get/Post/Put etc). A resource is anything at all. It could be an image file, an XML document, a PDF,... equally, since all processes are URI requests, a resource can be dynamically created as the result of process. However all resources are accessed through URAs. Example: file: schemeAll requests for URI's with the file: scheme are handled by the File URA. eg There are two broad categories of URA. Data Accessors handle an entire URI scheme. The File Accessor is a data acccessor. Active Accessors are software components addressed by URI. Most URAs are active accessors. Modules and URAsURAs are made available in modules. Generally technology specific URA's are grouped together in a single module - for example standard XML URA's are in the ext_xml-ura module. A module publishes a public URI address space. Any URI request that matches this address space may be handled in the module. A module also has an internal URI address space, it may import another module's public address space into it's internal address space. In this way modules can be combined into applications. An in depth guide to the module architecture is available here.
A URA is bound to a module's internal URI address space by a regular expression mapping defined in the module's definition. In the example above
the File URA is provided in the ext_layer1 module. A URI request matching the regex pattern Example: xslt URA
XSLTs are performed by the XSLT Accessor in the ext_xml-core module. The XSLT accessor is exported in the public address
space as Active URIs
The XSLT example above shows the
It is a URI which may contain named sub-parts each of which is also a URI, active URI's can therefore be nested to any depth. NetKernel's active URI implementation ensures that all the URIs in an active URI are appropriately escaped. Active URIs are used to create or process a resource. For example here is an active URI to apply the XSL Transform style.xsl to an xml document doc.xml
This example is pass-by-reference. It is also possible to use active URI's to pass by value. (see URRequest Javadoc). URA requestsA URA is not just the end of a request chain. A URA can also issue requests to the scheduler for resources. A process on NetKernel is therefore a tree of interactions between multiple URA services. Synchronous/Asynchronous URAsURAs which issue requests can be written to be synchronous or asynchronous. The scheduler supports either model. If a synchronous request is issued the scheduler will ensure that the number of underlying Java threads is adequate to prevent deadlock. Accessors such as DPML are optimized to issue asynchronous requests. In general for custom URAs it is fine to develop synchronous accessors. Thread SafetyURAs are assumed not to be threadsafe by default. The scheduler manages thread scheduling to an accessor and will not concurrently schedule requests to an accessor. URAs which are written to be threadsafe can be marked threadsafe, the scheduler may then issue concurrent requests. ExceptionsUncaught or runtime exceptions are handled by the scheduler. The scheduler will issue the request up the request call stack to any parent requestors. A URA may choose to handle received exceptions. An Accessor may also issue an Exception as the result of any request. The exception stack trace, including the requestor chain which caused an exception, is available in XML form. High-Level LanguagesAll NetKernel processes consist of sequence of URI requests. It is possible to write an entire process in a URI though generally hand crafting active URIs is not appropriate. A high-level language on NetKernel is an active URI compiler and request initiator. For example the DPML-runtime simply builds active URIs and issues the requests. DPML manages application state in the form of variables. Often variables are placed as pass-by-value arguments to an active URI request.
|
||||
|
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited
|
||||