This is a slide presentation introducing NetKernel, a kind of "REST operating system" from 1060.org.
The title reflects what I often heard by co-workers who'd never heard of NetKernel.
The talk tries to place in context why NetKernel is the right tool for right now - or at least should be on the short list of tools to look at.
1. What Is This
NetKernel Thing
Anyway?
Darren Cruse
August 5, 2010
(for the Lambda Lounge of St. Louis)
Wednesday, August 11, 2010
2. Preface
(one slide answers all)
Wednesday, August 11, 2010
3. Whatâs This NetKernel Thing?
âą A âREST Based Microkernelâ
âą Written in Java
âą Originally developed at HP Labs over 10 years ago
âą Started life as an XML framework ala Cocoon
âą Generalized over 4 versions into a general purpose
âResource Oriented Computingâ framework (though
it maintains esp. strong XML support).
âą The main guys split off from HP and formed their
own company called 1060 Research Limited
âą Itâs sold under a dual source license - i.e. free for open
source projects, paid for commercial projects.
Wednesday, August 11, 2010
4. (that was the short answer -
now the longer one)
Wednesday, August 11, 2010
5. Chapter 1:
Lots of Computers
(macro)
Wednesday, August 11, 2010
6. In the Beginning There
Was One Computer
âą Plus a 300 baud modem
âą I had hair
âą Things were simple then
(BASIC built in the ROM!)
Wednesday, August 11, 2010
7. State Of The Art
âą 0.89 MHz Processor
âą 4K RAM
âą 192 x 128 Screen
Resolution
âą Audio Cassette Storage
Wednesday, August 11, 2010
18. Moore No More?
(nope - but itâs a different world)
Wednesday, August 11, 2010
19. âThe Multi-Core Problemâ
What This Means For Software: The Next Revolution
The revolution in mainstream software development from structured programming
to object-oriented programming was the greatest such change in the past 20 years,
and arguably in the past 30 years. There have been other changes, including the
most recent (and genuinely interesting) naissance of web services, but nothing that
most of us have seen during our careers has been as fundamental and as far-reaching
a change in the way we write software as the object revolution.
Until now.
Starting today, the performance lunch isnât free any more. [...] But if you want your
application to beneïŹt from the continued exponential throughput advances in new
processors, it will need to be a well-written concurrent (usually multithreaded)
application. And thatâs easier said than done, because not all problems are inherently
parallelizable and because concurrent programming is hard.
Edited from: âThe Free Lunch is Overâ, Herb Sutter
(http://www.drdobbs.com/architecture-and-design/184405990)
Wednesday, August 11, 2010
20. Postscript to Chapters 1 & 2
(in case itâs not obvious)
Whatâs the connection between âlots of computers on
the networkâ (chapter 1) and âlots of cores on a cpu
dieâ (chapter 2)?
The answer: Stuff running in Parallel
Wednesday, August 11, 2010
21. Chapter 3a:
The Web
Wednesday, August 11, 2010
22. Chapter 3a:
The Web
(of Lies and Deceit)
Wednesday, August 11, 2010
23. âOh yeah the guys are using this new thing Service Oriented
Architecture.
They put their software on a whole bunch of servers. That
means itâs guaranteed to scale and have good performance
and be like super super reliable.
Itâs really simple it uses this new thing called SOAP. That
stands for simple something or other. All they have to do is
connect up these âserviceâ things how hard could that be.
And they said something called REST I donât what that is but
it sounds easy too I guess itâs so easy the developers get to
rest.
Itâs going to save us lots of time and money it really sounds
great.â
Actual made up conversation
between Product Managers, Circa 2003
Wednesday, August 11, 2010
24. Chapter 3b:
The Web
(for real this time)
Wednesday, August 11, 2010
25. The Web is a Very Successful
âDistributed Systemâ
(with some very nice qualities)
â Flexibility
â It's fairly easy to rearrange things at the server/network level, e.g.
move a document (or dynamic âserviceâ) from one node to another.
â Heterogenous Technologies
â Different servers can easily use different technologies (e.g. different
languages).
â Scalability
â In general, services scale easily, if they're stateless and placed behind
multiple machine clusters with load balancers.
â Availability / Ease of Deployment
â As long as you have at least two servers running the service, you can
hot deploy services leaving the old service running for a time while
you're starting the new service ("rolling restart").
Wednesday, August 11, 2010
26. RESTful HTTP Based Services
(bring the webâs benefits between servers)
b
a
l Service 1
a
l
App n
o
c
a Server
e Service 1
d
r
Browser
b
a
l b
a a
n l Service 1
c a
App
e n
Server c
r
e Service 2
r
Wednesday, August 11, 2010
27. NetKernel Modules and âMicro-Servicesâ
(bring the webâs benefits inside servers, as well as between)
b
a
l
a
l
n
o
c
a
e
d
r
Browser
b
a
l b
a a
n l
c a
e n
r c
e
r
Wednesday, August 11, 2010
28. So what are these granular services doing
âinsideâ my program?
(revisiting those nice web qualities)
â More Flexibility
â Now thereâs more opportunities to easily change things (e.g. change your
persistance strategy for some resource), often with just a conïŹguration change.
â And more opportunities to rearrange things on the network, e.g. moving a
module to a different server and talking to it with some remote protocol instead
of NetKernelâs in memory protocol.
â Partly this is possible because of NetKernelâs caching which replicates local
representations of remote resources just like a browser would (the reason itâs
called âREpresentational State Transferâ! :).
Wednesday, August 11, 2010
29. So what are these granular services doing
âinsideâ my program?
(revisiting those nice web qualities)
â More Heterogenous Technologies
â Easily use and intermix many of the popular JVM languages within a single
application. Java, Javascript, Groovy, JRuby, Scala, Clojure (experimental), Beanshell,
XSLT, XQuery, etc.
â Add support for other languages if youâd like. Each language is supported by a
module called a âlanguage runtimeâ and you can write your own as an âadapterâ for
an existing tool. e.g. I added support for the Jakarta Velocity templating language
and it wasnât hard.
â Language runtimes follow the same REST principles which the rest of the system
does. e.g. In NetKernel, an XML ïŹle transformed to an HTML ïŹle via an XSLT is
much the same as a Groovy source ïŹle transformed to a class ïŹle by the Groovy
compiler runtime. Your groovy code will automatically be recompiled when you
modify it just as your html will be updated when you modify the xml. This applies
to any and all of NetKernelâs supported scripting languages.
â As a consequence, under the new NetKernel Protocol you can even execute code on
a remote NetKernel server that physically resides on your local server. This is not a
feature âadded onâ to NetKernel so much as a natural consequence of itâs design.
Wednesday, August 11, 2010
30. So what are these granular services doing
âinsideâ my program?
(revisiting those nice web qualities)
â More Scalability
â NetKernelâs internal multi-threaded scheduler is to internal requests, as a
load balancer is to a web or application server.
â Resource ârepresentationsâ are immutable.
â Accessor methods should be coded to be thread safe i.e. stateless.
â More cpu cores mean more throughput / more simultaneous requests
processed.
â For faster response times, developers incorporate asynchronous requests to
run sub-requests in parallel.
â Third party libraries that are not thread safe can be wrapped in a module
marked as such - in which case NetKernel will single thread them.
â Representations that are not immutable can be locked explicitly - but this is
not typical usage of NetKernel (itâs more of an escape hatch for bad code :).
Wednesday, August 11, 2010
31. So what are these granular services doing
âinsideâ my program?
(revisiting those nice web qualities)
â More Availability / Easier Deployment
â Modules can be hot deployed via the âAppositeâ tool while a system is live and
running.
â If problems are encountered the deployed module can be rolled back leaving
just the original module.
â Modules are versioned and clients to services can indicate the version(s) they
desire.
â This allows that multiple versions of the same module can be deployed
simultaneously. e.g. A âstable versionâ and a ârelease candidateâ version.
Wednesday, August 11, 2010
32. The network really is the computer...
(and URIs are a sort of âmachine independentâ memory address)
âCLOUD OF RESOURCESâ
N
E
T
W
O
R
K
NETKERNEL CACHE (IN- NETKERNEL CACHE (IN-
MEMORY) MEMORY)
B B
U U
S S
CORE 1 CORE âNâ CORE 1 CORE âNâ
Wednesday, August 11, 2010
33. You sound like a used car salesman.
(is this some kind of infomercial?)
âJust a note that I was skeptical of NetKernel until I tried it and got used to it a little
bit.
It helped me see some things I hadnât realized before which is how many lost
opportunities Iâd created in my âservice orientedâ system design because of how
different I was doing things inside my code from the way things are done between the
services.
To give a simple example, if I need to read a ïŹle in a program in java I typically write
some code and use the File object to read the ïŹle. I don't use "ïŹle://" like we do from
our browser. As a result, if I want to change where that information comes from, say
read it from a blob in Oracle, or read it from an XML database, or maybe a better
example: read it from another machine RESTFully using HTTP - each of those feel
like a fairly serious change, but not when everything has a URI like in NetKernel.â
Darren Cruse,
NetKernel Advocate (seriously)
and inventor of the âUltra-Toeâ Toe Nail Brightening System,
the only toe nail brightening system with Toe-nail-isol!!
Wednesday, August 11, 2010
34. Thanks for listening.
Reach me at:
darren.cruse@gmail.com
Watch me blab at:
http://bangthekeyboard.wordpress.com
Wednesday, August 11, 2010