Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

Move over Memcached and Redis, here comes Netflix's Hollow

$
0
0

Move over Memcached and Redis, here comes Netflix's Hollow

A new open source project released by Netflix after two years in internal use is being positioned by the company as a powerful way to cache datasets that change constantly.

Hollow is a Java library and toolset aimed at in-memory caching of datasets up to several gigabytes in size.Netflix says Hollow's purpose is threefold: It’s intended to be far more efficient at storing data; it can provide tools to automatically generate APIs for convenient access to the data; and it can automatically analyze data use patterns to more efficiently synchronize it with the back end.

Let’s keep this between us

Most of the scenarios for caching data on a system where it isn’t stored―a “consumer” system rather than a “producer” system―involve using a product likeMemcached or Redis. Hollow is reminiscent of both products, since it uses in-memory storage for fast access. But it isn’t an actual data store like Redis.

Unlike many other data caching systems, Hollow is intended to be coupled to a specific dataset―a given schema with certain fields, typically a JSON stream. This requires some prep work, although Hollow provides some tools to partly automate the process. The reason for doing this is so Hollow can store the data in-memory as fixed-length, strongly typed chunks that aren’t subject to Java’s garbage collection. As a result, they’re faster to access than conventional Java objects.

Another purported boon with Hollow is that it provides a gamut of tooling for working with the data. Once you’ve defined a schema for the data, Hollow can automatically produce a Java API that can supply autocomplete data to an IDE. The data can also be tracked as it changes, so developers have access to point-in-time snapshots, differences between snapshots, and data rollbacks.

Faster all around

A lot of the advantages Netflix claims for Hollow revolve around basic operational efficiency, namely faster startup time for servers and less memory churn. But Hollow’s data modeling and management tools are also meant to help with development, and not just speed production.

“Imagine being able to quickly shunt your entire production dataset―current or from any point in the recent past―down to a local development workstation, load it, then exactly reproduce specific production scenarios,” Netflix says in its introductory blog post.

One caveat, Netflix says, is that Hollow isn’t suited for datasets of all sizes―“KB, MB, and GB, but not TB” is how the company puts it in its documentation. That said, Netflix is also implying that Hollow reduces the amount of sprawl required by a cached dataset. “With the right framework, and a little bit of data modeling, that [memory] threshold is likely much higher than you think,” Netflix writes.

Viewing all articles
Browse latest Browse all 6262

Trending Articles