Databases Reference
In-Depth Information
signifies a different class of computing concepts that challenge you to reflect on how
computation is done.
ROC combines the UNIX concept of using small modular transforms on data mov-
ing through pipes, with the distributed computing concepts of REST , URI s, and cach-
ing. These ideas are all based on referential transparency and dependency tracking to
keep the right data in your cache. ROC requires you to associate a URI with every com-
ponent that generates data: queries, functions, services, and codes. By combining
these URI s, you can create unique signatures that can be used to determine whether a
resource is already present in your cache. A sample of the NetKernel stack is shown in
figure 10.13.
As you can see from figure 10.13, the NetKernel software is layered between two
layers of resources and services. Resources can be thought of as static documents, and
services as dynamic queries. This means that moving toward a service-oriented inter-
mediate layer between your database and your application is critical to the optimiza-
tion process. You can still use NetKernel and traditional, consistent hashing without a
service layer, but you won't get the same level of clever caching that the ROC approach
gives you.
By using ROC , NetKernel takes REST concepts to a level beyond caching images or
documents on your web server. Your cache is no longer subject to a simple time-
stamped eviction policy, and the most valuable items remain in cache. NetKernel can
be configured to use complex algorithms to calculate the total effort it takes to put an
item in cache, and only evicts items that have a low amount of effort to regenerate or
are unlikely to be needed. To get the most benefits, a service-oriented REST approach
should be used, and those services need to be powered by functions that return data
with referential transparency. You can only begin this journey if your system is truly
free from side effects, and this implies you may need to take a close look at the lan-
guages your systems use.
Application
Logical addresses
(URls)
NetKernel sits between your static
resources and dynamic services
layers to prevent unneeded calls
to your NoSQL database.
NetKernel separates logical
resources expressed as URIs
from the physical calls to a
NoSQL database.
Resources/Services
NetKernel TM
Resources/Services
Physical
addresses
NoSQL database
OS/VM
Network addresses
Network
Figure 10.13 NetKernel works similarly to a memcache system that separates the
application from the database. Unlike memcache, it's tightly coupled with the layer that's
built around logical URIs and tracks dependencies of expensive calculations of objects
that can be cached.
 
Search WWH ::




Custom Search