PGX 21.1.1

Execution Modes

This page presents an overview of the different usage modes of PGX.

PGX in Local Shell Mode

The simplest usage mode for PGX is the local shell mode. As the name suggests, the user interacts with a PGX instance running locally on the same machine via a command-line shell interface. The PGX shell dynamically interprets and executes user commands to invoke the underlying PGX functionality.

The local shell mode is useful for the following situations:

  • The user wants to run some quick graph analyses on small graph data with their personal computer. The PGX shell provides a lightweight way of running graph analysis immediately with PGX, without writing a Java application, and without requiring a powerful server machine.

  • The user is currently exploring the data set and trying different graph algorithms on it whenever some idea occurs to them. The interactive nature of the PGX shell fits perfectly for such a user.

Local Shell Mode

Figure: PGX Local Shell Mode

Read the following section to learn more about PGX in local shell mode:

Install and start PGX in Local Shell Mode PGX Shell Guide

PGX in Remote Server Mode

In the remote shell mode, the main PGX execution engine is deployed as a RESTful application on a powerful server machine, while the PGX shell connects to it remotely from the user's personal computer. The PGX shell provides the same functionalities in remote mode as in local mode. Also, multiple clients can connect to the same PGX server at the same time. In the latter case, the PGX server is time-shared among these clients.

The remote mode is useful for the following situation:

  • The user wants to perform graph analysis on a large data set with a powerful server-class machine that has many cores and a large memory.
  • The server-class machine is (potentially) shared by multiple clients.

Remote Shell Mode

Figure: PGX Remote Shell Mode

Read in the following guides how to install and start the PGX server in shared memory mode (single machine, scale up) or distributed mode (multiple machines, scale out):

Installing and starting the PGX shared memory server Installing and starting the PGX distributed server

PGX in Local Java Mode

PGX can also be embedded into a user application as a normal Java library.

The embedded mode is useful for the following situation:

  • The user wants to build up a serious application (or service) where the graph analysis is a part of its functionality.

Local Java Mode

Figure: PGX Embedded Mode

Read in the following guide the functionalities offered by the PGX APIs: PGX APIs

Deploy PGX as Servlet Web Application

You can also run shared memory PGX inside of a web application. PGX ships with a WAR-file which can be deployed directly into your favorite servlet container:

Deploying PGX into Tomcat Deploying PGX into Weblogic

PGX Client

Once a remote PGX server is set up and running, refer to this guide to learn how to connect to a server:

Connecting to a running PGX server