Llamaverse

Loading the llamaverse

personClever Llamas
databaseMinimum MarkLogic Version: 8

The llamaverse is a collection of documents and assets that form the base environment used to demonstrate the capabilities of MarkLogic throughout our articles. This allows people to work with examples in the context of freely available data. It is based on llamas that take on human characteristics complete with interests, personalities, hobbies, medical conditions and backgrounds. The llamas are all guests of the Clever Llamas Santuary - a global network of farmlands dedicated to the care of llamas in need. As the code samples change, so will the llamaverse. Therefore, the llamaverse is published in releases. Each article that utilizes the Llamaverse will clearly state the minimum version of the Llamaverse that is required to run the code samples in the article.

Getting The Llamaverse

The repository can be found here: https://github.com/cleverllamas/llamaverse

It is published as a complete gradle project that can be built and deployed to a MarkLogic server. The project contains all the content thatcode samples used in the articles that utilize the llamaverse. The nature of a ml-gradle means that the content is also easily referenced directly in the directory strucure for those that just want to look at it or want to use/deploy it in a different way. However, the added benefit of deploying the llamaverse is that it will also create the roles, users, privileges and TDE templates that are required to work with the llamaverse samples.

Retrieve as Source Code to Clone and Deploy

As an example. Version 1.0.0 can be seen here: https://github.com/cleverllamas/llamaverse/tree/1.0.0

browse 1.0.0

Retrieve as Source Code to Clone and Deploy

As an example. Version 1.0.0 can be seen here: https://github.com/cleverllamas/llamaverse/releases/tag/1.0.0

archive 1.0.0

Roles and Priviliges

Two base roles are created in the llamaverse. A 'llamaverse-writer' role and a 'reader' role. The 'writer' role has the ability to write to the database and the 'llamaverse-reader' role has the ability to read the assets from the llamaverse.

The 'llamaverse-writer' role will be assigned with default permissions to be set on each document that is created through that role.

Basic privileges are added to the 'llamaverse-writer' role to allow for the creation of documents and assets in the llamaverse.

A URI privilege is created and added to the 'llamaverse-writer' role to protect documents in the llamaverse.

Users

The llamaverse has two users, 'cleverllamas-mother' and 'cleverllamas-llama'. The 'mother' user has the 'llamaverse-writer' role and the 'llama' user has the 'llamaverse-reader' role

It is good practice to use the cleverllamas-llama user to read the llamaverse content. IN general, this will ensure that you are seeing the resultsa as intended. Some articles may suggest otherwise. To do so, you can wrap your code in an invokeFunction that uses the cleverllamas-mother user to read the content. This can be seen in many of the articles that utilize the llamaverse.

TDE Templates

The llamaverse has TDE templates that are used to create a view on the data in the llamaverse. These will be referenced in the articles that utilize each template.

Content

The llamaverse contains a number of documents that are used to demonstrate the capabilities of MarkLogic. The content is available in a raw format (the base format usually JSON or XML)

In addition, the same content is also wrapped in an envelope to help with articulation the articles.

├── backstories # Information about each llama's background
├── farmlands # Three different farmlands that the llamas live in around the world
├── llama-movement # Tracking information about the llamas' movements over time
└── llamas # The llamas themselves
    ├── medical-conditions # a brief description of the types of medical conditions that llams can have
    └── secret-powers # a brief description of the types of secret powers that some llamas have
  • There are times in which we may add additional content to just the raw dataset if it is more to help with a single article.

Need Some Help?


Looking for more information on this subject or any other topic related to MarkLogic? Contact Us (info@cleverllamas.com) to find out how we can assist you with consulting or training!