Instance, GraphSet and Property

This chapter will introduce the installation of Ultipa Server and operations on graphset and properties.

Installing and Deploying Ultipa

Ultipa offers varied ways of deployment, which is compatible with mainstream Linux operating systems. On the other hand, to support cross-platform and virtualization, Ultipa also offers deployment over Docker containers.

Ultipa Installer

Ultipa-installer is the official installation program provided by Ultipa. It supports commonly used Linux operating systems, including but not limited to Centos, Ubuntu, etc. For special application scenarios, please consult with Ultipa Team for rapid support.

Ultipa Server Docker

As long as your system environment supports Docker containers, you will be able to install and load Ultipa Docker Images.

Docker Images simplify the installation process, as the differences amongst heterogeneous systems are isolated by the Docker containership, which further virtualizes a unified running environment for Ultipa system to run like a charm.

To the user end, only port mappings, data directory mounting are the prerequisites for launching an Ultipa instance.

To run an Ultipa image within Docker:

docker run -itd --net=host  --name <your_instance_name>  \
	-v <path_data>:/opt/ultipa-server/data \
	-v <path_config>:/opt/ultipa-server/config \
	<ultipa_image_name>:<tag> start

Ultipa SasS

Ultipa is designed from ground up to be cloud-native. It's recommended to deploy Ultipa system over cloud, which tends to lower TCO (Total Cost of Ownership) with lower maintenance, better extensibility and usability.

Ultipa SaaS will be offered in bundling with top public cloud service vendors around the world in early 2021, please stay tuned for the latest at Ultipa News.

Ultipa Instance

Ultipa Instance stands for an independent minimal unit that can offer services provided by the Ultipa Server. Ultipa Server is designed with high-availability, horizontal-n-vertical scalability. In a clustered setup, an entire (logical) Ultipa Server may contain multiple Ultipa Instances.

Ultipa Server and Instances can be installed with Docker container environment, which is most commonly found in private cloud deployments due to its ease-of-use and heterogeneous OS environment support.

Launch Ultipa Server

To launch an Ultipa Server:

./ultipa-server -d

Note that you'll need to have adequate administer privilege to access and execute the above command.

If your graph dataset is quite large, say, over 1 billion entities (nodes+edges), you might want to increase the size of 'ulimit' on Linux.

Stop Ultipa Server

To stop or shutdown an Ultipa Server:

./ultipa-server stop

Cluster Instance Service

Ultipa Cluster Instance Service is to ensure data consistency and high-availability, and achieve other cluster-wide features. Ultipa cluster supports the following features:

  • HTAP (Hybrid Transaction & Analytics Processing)
  • Load Balancing
  • Self-defined Algorithmic Instance Allocation
  • ACID (strong data consistency) Configuration

Users are advised to adopt and fine-tune their own high-availability & high-data-consistency cluster solutions.

For detailed information on cluster setup, please refer to manuals provided by Ultipa Support Team.

GraphSet

Graphset is short for Graph-Dataset, while 'data' here can be very inclusive. A graphset contains the following information:

  • Nodes and their properties
  • Edges and their properties
  • All indexes built on top of nodes or edges
  • All algorithms, statistical information, privileges and other informational data

During the initial launching of Ultipa instance(s), a default graphset will be created. A logical Ultipa Server may contain multiple graphsets. With the help of uQL, a rich collection of operations can be done against a graphset and its information.

Designate a target graphset before launching graph-level operations. For example, select 'current graphset' in the Ultipa Manager interface, or run certain command in an Ultipa CLI. Please refer to related manuals for detail.

Naming Convention

The naming convention for graphset:

  • Start with letters [a-zA-Z]
  • Only includes underscore (_), numbers [0-9] or letters [a-zA-Z]
  • Length between [2, 32] ASCII characters

listGraph()

To get a list of graphsets on the current Ultipa server:

listGraph()

getGraph()

To get information of a certain graphset on the current Ultipa server:

getGraph().name(<name>)

Example: Show information about graphset 'default'

getGraph().name("default")

createGraph()

To create a graphset on the current Ultipa server:

createGraph().name(<name>)

updateGraph()

To rename a certain graphset on the current Ultipa server:

updateGraph().name(<name>).set({name: <new_name>})

dropGraph()

To delete a certain graphset from the current Ultipa server:

dropGraph().name(<name>)

Properties

Properties in context refer to the properties of meta-data (nodes and edges) of a certain grahpset. A meta-data property is comparable to a column from a certain table in a relational database; multiple properties are therefore comparable to multiple columns from multiple tables.

In Ultipa Graph, there are system-reserved properties introduced at the end of chapter Background, and user-defined properties. The following content is about operations on the user-defined properties, NOT the system-reserved ones.

Naming Convention

The naming convention for user-defined property:

  • Start with letters [a-zA-Z]
  • Only includes underscore (_), numbers [0-9] or letters [a-zA-Z]
  • Length between [2, 32] ASCII characters

The supported data type of user-defined property:

  • string
  • float
  • double
  • int32
  • int64
  • uint32
  • uint64

Please reach out to Ultipa Support Team in case you need support on extra data types.

show()

To show a list of node properties of the current graphset:

show().node_property()

To show a list of edge properties of the current graphset:

show().edge_property()

To show a list of node and edge properties of the current graphset:

show().property()

The following screenshot shows the resulting page after retrieving the node properties from Ultipa Manager:

Figure: Show Node Properties

create()

To create a node property with or w/o description in the current graphset:

create().node_property(<name>,<type>,<description>)

To create an edge property with or w/o description in the current graphset:

create().edge_property(<name>,<type>,<description>)

Example 1:Create node property 'label' with string type:

create().node_property(label, string)

Example 2:Create edge property 'timestamp' with int32 type, and describe as 'time of transaction':

create().edge_property(timestamp, int32, "time of transaction")

alter()

To modify a node property's name and/or description:

alter()
  .node_property(<old_name>)
  .set( {name: <new_name>, description: <new_desc> } )

To modify an edge property's name and/or description:

alter()
  .edge_property(<old_name>)
  .set( {name: <new_name>, description: <new_desc>} )

Example 1:Modify node property 'label' into 'nickname':

alter()
  .node_property(label)
  .set( {name: "nickname"} )

Example 2:Modify edge property 'timestamp' into 'vote', with description 'number of votes':

alter()
  .edge_property(timestamp)
  .set( {name: "vote", description: "number of votes"} )

drop()

A property not in use can be deleted to save disk space. Noting that deleting a property is a real-time operation, and there won't be considerable wait time.

To delete one or multiple properties of node:

drop().node_property(<name>,<name>,...)

To delete one or multiple properties of edge:

drop().edge_property(<name>,<name>,...)

Note: system-reserved properties _o, _id, _from_id and _to_id are NOT to be deleted.

LTE()

LTE is short for Load to Engine, it's an operation to load disk-based properties into Ultipa's high performance graph computing engine. Once a property is loaded via LTE, it can be used by various filtering operations such as A-B query, k-hop query, template queries and graph algorithms.

By default, newly created properties are stored on disk until the user specifically invokes the LTE operation.

Before conducting LTE, make sure there is adequate memory on the disk.

Abundant memory (DRAM) will ensure superior performance and system stability. As the unit cost of DRAM keeps going done, big memory and persistent memory are gaining popularity. The trend of database development, especially graph database and graph computing will see more and more smart utilization of memory. Please keep in mind: Memory is the new disk.

To load a certain node property into in-memory computing/storage engine:

LTE().node_property(<name>)

To load a certain edge property into in-memory computing/storage engine:

LTE().edge_property(<name>)

Note that LTE() operations on smaller graphsets (~1M nodes+edges) are always instant, but take dozens of seconds on larger graphsets (~100M or more nodes+edges). None the less it's all worth the effort as the speed and performance of the LTEed properties in an Ultipa Server are much higher than that of the indexed ones in a traditional database.

UFE()

UFE is the short for Unload from Engine. When a property is not needed for acceleration or filtering operations, UFE() will help reduce memory usage. On the other hand, the property continues to persist on disks, unless it's deleted completely from there.

Note that deleting a property will trigger UFE() if the property is already LTEed.

To unload a certain node property from in-memory computing/storage engine:

UFE().node_property(<name>)

To unload a certain edge property from in-memory computing/storage engine:

UFE().edge_property(<name>)

Note that UFE() will take some time, just as LTE() does, but will not affect other operations.

Check Stats

stat()

To check various system-wide statistical data:

stat()

The result includes the following usage information:

  • CPU
  • Memory
  • License Expiration Date
  • Company
  • Server Type, etc.

The following screenshot shows the resulting page after checking the system statistical data from Ultipa Manager:

Figure: Show Statistical Information