{"id":104,"date":"2017-02-10T20:53:07","date_gmt":"2017-02-10T20:53:07","guid":{"rendered":"http:\/\/67bricks.com\/blog\/?p=104"},"modified":"2017-02-10T20:53:07","modified_gmt":"2017-02-10T20:53:07","slug":"nixos-and-marklogic-9","status":"publish","type":"post","link":"https:\/\/blog.67bricks.com\/?p=104","title":{"rendered":"NixOS and MarkLogic 9"},"content":{"rendered":"<p>This week, Rodney talked about\u00a0<strong>Nix<\/strong> &#8211; the NixOS\u00a0Linux distro and NixOps tooling, and Simon talked about <strong>MarkLogic 9 Early Access<\/strong> that we have been working with for a few months.<\/p>\n<p><strong>Nix Expression Language<\/strong> is a declarative functional language, with aspects that are similar to Haskell, Scheme, and YAML. It&#8217;s a domain-specific language that can perform tasks similar to Ansible for configuration, and similar to make for building packages and projects while keeping track of dependencies and when they change.<\/p>\n<p><strong>NixOS<\/strong> is a Linux distribution that uses Nix EL to describe the configuration of a machine, built on the Nix package manager. It has atomic upgrades and rollbacks of packages.<\/p>\n<p><strong>NixOps<\/strong> again uses Nix EL, but at a higher level to describe how to\u00a0provision a set of machines in a cloud environment like AWS. Unlike other tools like Puppet or Ansible, NixOps describes the complete desired state of the machine &#8211; so if you manually install a package that NixOps isn&#8217;t expecting, it will uninstall it again.<\/p>\n<p>A Nix file can be NixOps will provision machines based on a description in Nix EL. However, Nix builds are run in an isolated envi<\/p>\n<p>We&#8217;re not currently using Nix for deployment (we generally use Ansible), but Rodney is using it on his desktop, and thinks\u00a0it is a good set of tools.<\/p>\n<p>We have been using <strong>MarkLogic 9 Early Access<\/strong> for a few months. Simon talked about the new features around data integration, security, and manageability, and the improvements to the Query Console.<\/p>\n<p>The &#8216;template driven extraction&#8217; feature allows us to define templates that convert XML or CSV files to row data or triples on insert. It is best on &#8216;row like&#8217; data, such as XML with a set of repeated components, and allows you to define anchor elements via XPath, and then a set of relative XPaths that define particular data fields to be extracted from that content. You can then query this data via a select, or in conjunction with other data via the Optic API.<\/p>\n<p>The &#8216;Optic API&#8217; allows joins and aggregates over documents, row data and triples &#8211; for example, combining a SPARQL query of graph data with a SQL query of relational data. This is valuable because different data is\u00a0often represented and queried in a form that is particular to the style of data &#8211; but needs to be combined with other data to be useful. For example, purchase data might be best represented as a relational database style set of rows, but then processed by aggregating it and combining it with metadata on what is being purchased that is best represented as\u00a0nodes in a graph database.<\/p>\n<p>The &#8216;data movement SDK&#8217; extends capabilities that were previously available via tools such as mlcp and corb, and exposes them via a Java API. This allows bulk ingestion of documents, and their transformation.<\/p>\n<p>The &#8216;entity services&#8217; is a modelling framework for data stored in MarkLogic. It makes it easier to harmonize data from different sources into a consistent model, using the &#8216;envelope pattern&#8217; to wrap and preserve the original data. It&#8217;s not doing anything that couldn&#8217;t have been done manually in previous versions of MarkLogic, but simplifies the code for this.<\/p>\n<p>The most interesting new security features allows permissions for XML content to be assigned at the element level, rather than at the document level. So, hiding elements within a document based on the role of the user, or making elements read-only by role. This is interesting for some of our applications that make particular parts of documents available based on the user.<\/p>\n<p>One of the small but important improvements to the query console is displaying different results for each query tab. This makes working with it a lot better. It also displays type-ahead autocomplete suggestions for function names &#8211; this is also useful, although initially disconcerting.<\/p>\n<p>In all, MarkLogic 9 offers a number of interesting new features. We are currently using the Early Access version of it. We&#8217;ve encountered and raised a few issues with it, which have been fixed, and we&#8217;re looking forward to it being launched.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, Rodney talked about\u00a0Nix &#8211; the NixOS\u00a0Linux distro and NixOps tooling, and Simon talked about MarkLogic 9 Early Access that we have been working with for a few months. Nix Expression Language is a declarative functional language, with aspects that are similar to Haskell, Scheme, and YAML. It&#8217;s a domain-specific language that can perform &hellip; <a href=\"https:\/\/blog.67bricks.com\/?p=104\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;NixOS and MarkLogic 9&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=104"}],"version-history":[{"count":2,"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":106,"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions\/106"}],"wp:attachment":[{"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.67bricks.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}