Developers

Ontology

The Paglo ontology is like a database schema that defines the structure in which data is placed. If you are adding data, the ontology tells you where each type of data should be placed. If you are searching for data, the ontology tells you where to find each type. For example, to find the IP address of a particular interface, you can write select ip_address from /network/device/interface. How do you know to use the /network/device/interface path? Ontology.

You don't need to know the ontology at all to use Paglo successfully, but it can be useful to:

The Paglo ontology is not externally enforced, so it's possible to write a Crawler plugin that sends data to totally different locations in a different structure. However, that data won't be searchable.


Datatype formats

Some datatypes require (or we encourage) the following formats:

  • Timestamps — Use UTC timestamp format: ‘2007-07-27T18:16:21.0000000Z’
  • MAC addresses — Use the colon-hex format like this: 00:01:02:03:04:05

Viewing your ontology

The Ontology page displays the organization of all the information in your database. It does not include information that your Crawler has not collected. It can, however, include data that you have manually entered. This data is specific to your company. It is never combined with or affected by data from other companies. As such, the following screenshot represents a slice of one database, and not necessarily how any other database is organized.

To view your Ontology:

  1. Login to your Paglo Web account.
  2. At the bottom of any page, click the Developers link.
  3. On the Developer Tools page, click the Ontology tab.
  4. This page displays the nodes that currently exist in your database.


Using your ontology

This page is especially useful for the PQL user who prefers to write queries with specific paths instead of by process of elimination. You can search the Ontology page to find the specific path to the type of data you want, paste that in the Search field, and add the appropriate PQL action term (SELECT, INSERT, MERGE, UPDATE, or DELETE), and you have your query.

To utilize your Ontology page:

  1. In the Filter field, enter the datatype you want, and click the Search button.
  2. For example, if you hunt for doc in the ontology in the screenshot above, you will find that the path is /data/doc.

  3. Copy the path and paste it into the search field at the top of the page.
  4. Add one of the following PQL keywords to form a query:
  5. For example, to see all the data at the level of the doc node, type SELECT * FROM /data/doc. Based on the ontology pictured above, the results show a list of documents, titles, and content.


Apps

Paglo provides a structure for third-party applications or other systems to store data that doesn't correspond to any existing branch of the tree. Developers can then store data that is specific to the domain of their application, or otherwise does not belong in the existing tree. This structure is defined as /apps, followed by a reverse naming convention similar to that used in Java libraries:

/apps/domain_suffix/company_name/application_name

For example, if a company called Acme.com wanted to store data specific to an application called Toasters, they would use: /apps/com/acme/toasters.

There is no required relation to domain names, but it is a convenient method for distinguishing the data of different developers. The structure below the /apps node is at the discretion of the individual developer.

The /apps node contains the following subnodes:

  • /
    • apps — applications that store data in Paglo
      • com — domain name of submitter is broken into parts to form the elements of the tree (may be org, net, etc.)
        • my_company — domain name of submitter, such as 'Paglo'
          • my_application — name of submitter's application (such as 'network_map')

The data below the my_application node can reside in any artibrary format that you want. From this node on, each application developer determines the format for their application.


How do I find out more?