|
NetKernel News Volume 4 Issue 1
January 11th 2013
What's new this week?
- Repository Updates
- Update Discussion
- Tom's Blog
- Active URI Builder Tip
- RDF Sesame Style
- On The Consequences of Giving a Tablet to a Parent
Catch up on last week's news here
Repository Updates
The following updates are available in both the NKEE and NKSE repositories...
- kernel 1.32.1
- fix to stop potential for very rare cpu spin when waiting for synchronous requests. Thanks to David Hoffman and Nic Spilman at Bestbuy for discovering this.
- lang-groovy 1.13.1
- Tightened up use of GroovyClassloader in the GroovyCompiler transreptor to clear internal cache earlier and synchronize during the compile phase for safety. Thanks to Kevin Treague at Findlaw.com for reporting this.
- layer0 1.94.1
- new createAsyncResponseFrom() method to handle a special corner case with responding to async requests out of line - used in the new cut-to-the-chase throttle (see below)
- layer1 1.41.1
- added expiry functions to ScratchPadOverlay
- module-standard 1.55.1
- improvements to stability of boot with complex module configurations. Thanks to Chris Cormack at DeltaXML for providing suitably complex architectures.
- nkse-control-panel 1.27.1
- added ability for a page to contain multiple info boxes (usually on different tabs)
- nkse-doc-content 1.44.1
- Various small updates and fixes to content.
- nkse-search 1.18.1
- Fixed broken link to Lucene advanced search syntax reference
- system-core 0.34.1
- fix to improve accuracy of cpu reporting on status tab and request and threads view
The following updates are available in the NKEE repository...
- nkee-architecture 1.8.1
- NEW cut-to-the-chase throttle added
- nkp 1.14.1
- fix so that client reconnects to restored servers faster. Thanks to Tom Geudens and Frédéric Berger at Steria for discovering this.
Update Discussion
We've put out a batch of updates today comprising some fixes, some new features and some enhancements.
The kernel update provides a small change to a re-entrant request synchronisation object that eliminates an extremely rare possibility that under heavy load a kernel thread could get into a permanent spin. We're grateful to David Hoffman for taking the time to report and provide a detailed diagnoses of this.
The change to Groovy is more of a precaution than a fix - but after reports from Keith Treague of an unreproducible class loading inconsistency we decided it would be prudent to synchronize the use of the GroovyClassLoader's compilation and, as a precaution, to also pre-emptively clear its internal cache before (rather than after) it is used to compile a groovy script.
The NKEE architecture components now offers the new "Cut to the Chase" throttle (or as I called it last time - the Queue Jumping Throttle). This tool is used in the forthcoming release of the NKEE cache visualization tools - which will be released along with the new cache very very soon.
Finally, after some investigation, the method by which the CPU consumption for a thread (and the whole system) is reported has been enhanced. Its been a long running annoyance that Java seemed to repeatedly understate the CPU use when compared to that reported by the underlying operating-system. Tony has discovered a new way to improve the accuracy and sampling and to provide a much more reliable metric. This new CPU data now underpins all of the CPU related reporting tools - such as the Threads and Requests view and the CPU status chart.
Tom's Blog
Tom can't sleep so he's written a set of modules...
http://practical-netkernel.blogspot.be/2013/01/pinky-and-brain.html
Active URI Builder Tip
Here's something useful to know about. You may at some point ask "where is the builder for constructing active URIs"? Something that will normalize argument order and take care of the escaping and provide a String of the complete active URI?
The solution is to just use the INKFRequest like this...
req=aContext.createRequest("active:foo") req.addArgument("baa", "baz"); req.addArgument("boo", "bob"); id=req.getIdentifier()
Which in the id string would produce...
active:foo+baa@baz+boo@bob
Note that a request has no implications on the context or the state of an endpoint - you can construct and discard them with no side-effects. But of course this tip is exclusively for constructing reference identifiers - don't use addArgumentByValue() else you'll not get what you bargained on.
RDF Sesame Style
The prolonged leisure of the holiday gave me the time to get back to some good old playful exploration of technology!
After a briefing from Brian Sletten on the "State of the Art of Semantic Technology" - which made me realise that I'm behind the times and there are some old things that we should attend to as well. So I knuckled down and got my head around the Sesame RDF API.
Here's a preview release (fully functional just not quite a complete set of tools) that replicates a fair subset of the Jena RDF tools but now on the light weight Sesame representation model...
- urn.org.netkernel.rdf.sesame-trunk-11-1-13.jar - the library module
- urn.test.org.netkernel.rdf.sesame-trunk-11-1-13.jar - the unit test module
Please give this a good kicking and let me know what you think. I want to add triple-store integration tools next - something that does for RDF persistence what the JDBC-based active:sqlXXXX tools do in mod-db. Also there'll be an interoperability module to provide transreptors from the world of Jena to the world of Sesame.
In the mean time here's the guide from the documentation with an idea of what's already done. (After install the docs will be located here.)
RDF Sesame Library Guide
Introduction
The RDF Sesame Library is a library for parsing, serializing and processing RDF models. It is based on the Aduna Sesame library.
This library provides a toolset for working with RDF models. It consists of utility services for parsing and serializing the RDF serializations including XML/RDF, N3, Turtle and N-Triple syntax.
Once parsed the RDF models are represented as Sesame Models wrapped by with an ROC-safe immutable NetKernel representation IRepSesameModel.
Thread Safety
Please carefully read the notes on thread safety and concurrency. Sesame is a light weight API and its design assumes the user will take responsibility for all concurrent access.
Parsing RDF
There are at least four serialized forms of RDF, this library provides parsers for XML/RDF, N3, Turtle and N-Triple syntaxes.
- sRDFParseXML parses XML/RDF
- sRDFParseN3 parses N3
- sRDFParseTURTLE parses Turtle
- sRDFParseN-TRIPLE parses N-Triple
Each parser produces an in-memory Sesame Model contained in a IRepSesameModel.
Serializing RDF Models
The library provides serializers which can serialize a resource with a IRepSesameModel to XML/RDF, N3, TURTLE and N-Triple syntaxes.
- sRDFSerializeXML Serializes XML/RDF
- sRDFSerializeN3 Serializes N3
- sRDFSerializeTURTLE Serializes Turtle
- sRDFSerializeN-TRIPLE Serializes N-Triple
Default Parser/Serializer
These default transreptions are not yet implemented
By default the library will assume that XML/RDF encoding is being used. For example if an accessor such as jRDFModelUnion receives a binary stream aspect it will use the RDF/XML transreptor to attempt to parse to an IRepSesameModel. Equally if an IRepSesameModel is to be serialized then the library will default to an XML/RDF serialization. Defaults can be avoided by using the appropriate parse/serialize accessors discussed above.
Set Operations
The library provides a set of accessors for performing set operations on Sesame models. The results of a set operation is another Sesame Model resource.
- sRDFModelUnion obtain the the union of two models
- sRDFModelIntersection obtain the the intersection of two models
- sRDFModelDifference obtain the the difference of two models (vive la difference)
These advanced set operations are not yet implemented...
Set comparisons are provided by the following accessors which each return a boolean aspect.
- sRDFModelContainsAny determine if one model contains any members of another model
- sRDFModelContainsAll determine if one model contains all of another model
- sRDFModelIsIsomporphic determine if two models are isomorphically equivalent
- sRDFModelIsEmpty determine if a model is empty
Future Work
- SAIL persistence mechanisms are not supported yet. All RDF model resources are in-memory.
- SPARQL Query is not yet implemented but can be achieved using the low-level sesame APIs which are exported in the classpath.
- Interoperability library - to provide transreption between Jena and Sesame models.
On The Consequences of Giving a Tablet to a Parent
If, like me, you decided to modernise your family's IT experience by giving the gift of a tablet this Christmas, then you will know that the physical gift is merely the tip of the giving iceberg. The unspoken and hidden cost lies in the implicit service contract you're committed to.
I will not name or shame my parent (it was my mother) but last night I received the following important support question...
"I love my tablet. But... I keep losing the typewriter and I don't know how to get it back."
"You don't need a typewriter - you've got the tablet now."
"No the TYPEWRITER. The typewriter at the bottom of the screen keeps disappearing..."
Have a great weekend.
Comments
Please feel free to comment on the NetKernel Forum
Follow on Twitter:
@pjr1060 for day-to-day NK/ROC updates
@netkernel for announcements
@tab1060 for the hard-core stuff
To subscribe for news and alerts
Join the NetKernel Portal to get news, announcements and extra features.