<!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG-spv-->{"id":445188,"date":"2017-02-07T07:26:00","date_gmt":"2017-02-07T03:26:00","guid":{"rendered":"http:\/\/nhub.news\/?p=445188"},"modified":"2017-02-07T10:17:15","modified_gmt":"2017-02-07T08:17:15","slug":"netflix-introduces-hollow-a-java-library-for-processing-in-memory-datasets","status":"publish","type":"post","link":"http:\/\/nhub.news\/fr\/2017\/02\/netflix-introduces-hollow-a-java-library-for-processing-in-memory-datasets\/","title":{"rendered":"Netflix Introduces Hollow, a Java Library for Processing In-Memory Datasets"},"content":{"rendered":"<p style=\"text-align: justify;\"><img style=\"float: left; padding: 5px;\" width=\"300px\" src=\"https:\/\/cdn.infoq.com\/statics_s2_20170202-0441\/resource\/news\/2017\/01\/netflix-introduces-hollow\/en\/resources\/1infoq-object-layout.png\" alt=\"NewsHub\" border=\"0\" \/>Netflix recently introduced Hollow , a Java library and toolkit designed to efficiently cache datasets not characterized as \u201cbig data.\u201d Such datasets may be metadata for e-commerce and search engines, or in the case of Netflix, metadata about movies and TV shows. Traditional solutions for processing such datasets include the use of a datastore or serialization, but typically suffer from reliability and latency issues. Hollow\u2019s getting started guide summarizes the core concepts and nomenclature: <br \/>Hollow manages datasets which are built by a single producer , and disseminated to one or many consumers for read-only access. A dataset changes over time. The timeline for a changing dataset can be broken down into discrete data states , each of which is a complete snapshot of the data at a particular point in time. <br \/>The producer and the consumers handle datasets via a state engine that is transitioned between data states. A producer uses a write state engine and a consumer uses a read state engine. <br \/>Hollow replaces Netflix\u2019s previous in-memory dataset framework, Zeno. Datasets are now represented with a compact, fixed-length, strongly typed encoding of the data. This encoding minimizes a dataset\u2019s footprint and the encoded records are \u201cpacked into reusable slabs of memory that are pooled on the JVM heap to avoid impacting GC behavior on busy servers.\u201d <br \/>To get started with a Hollow example, consider the following POJO: <br \/>A simple dataset based on the POJO above may be populated such as: <br \/>Hollow translates this movies list to the new encoding layout as shown below: <br \/>More details on this encoding can be found in the advanced topics section of the Hollow website. <br \/>The first instance of a producer publishes an initial data state of a dataset ( movies in this example) and consumers are notified on where to find that dataset. Subsequent changes to the dataset are systematically published and communicated to consumers. <br \/>A producer uses a HollowWriteStateEngine as a handle to a dataset: <br \/>A HollowObjectMapper populates a HollowWriteStateEngine : <br \/>The HollowObjectMapper is thread safe and can also be executed in parallel. <br \/>The producer writes the dataset (also known as a blob ) to a defined output stream: <br \/>A client API generates necessary Java files based on the data model and must be executed before writing the initial consumer source code: <br \/>Once the consumer is notified of a published dataset, the consumer uses a HollowWriteReadEngine as a handle to a dataset: <br \/>A HollowBlobReader consumes a blob from the producer into a HollowReadStateEngine : <br \/>The data within the dataset can be accessed via the generated API: <br \/>This will print the resulting output: <br \/>The entire Hollow project can be found on GitHub . <br \/>InfoQ recently featured a detailed interview with Drew Koszewnik , senior software engineer at Netflix and lead contributor to Hollow, regarding Hollow\u2019s specific implementation details.<\/p>\n<p><span>&copy; Source: <a href=\"http:\/\/www.infoq.com\/news\/2017\/01\/netflix-introduces-hollow?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=news\" target=\"_blank\">http:\/\/www.infoq.com\/news\/2017\/01\/netflix-introduces-hollow?utm_campaign=infoq_content&amp;utm_source=infoq&amp;utm_medium=feed&amp;utm_term=news<\/a><br \/>All rights are reserved and belongs to a source media.<\/span><\/p>\n<script>jQuery(function(){jQuery(\".vc_icon_element-icon\").css(\"top\", \"0px\");});<\/script><script>jQuery(function(){jQuery(\"#td_post_ranks\").css(\"height\", \"10px\");});<\/script><script>jQuery(function(){jQuery(\".td-post-content\").find(\"p\").find(\"img\").hide();});<\/script>","protected":false},"excerpt":{"rendered":"<p>Netflix recently introduced Hollow , a Java library and toolkit designed to efficiently cache datasets not characterized as \u201cbig data.\u201d Such datasets may be metadata for e-commerce and search engines, or in the case of Netflix, metadata about movies and TV shows. Traditional solutions for processing such datasets include the use of a datastore or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":445187,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[93],"tags":[],"_links":{"self":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/445188"}],"collection":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/comments?post=445188"}],"version-history":[{"count":1,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/445188\/revisions"}],"predecessor-version":[{"id":445189,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/posts\/445188\/revisions\/445189"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/media\/445187"}],"wp:attachment":[{"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/media?parent=445188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/categories?post=445188"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nhub.news\/fr\/wp-json\/wp\/v2\/tags?post=445188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}