Deploying Raphtory on a server
A remote running instance of Raphtory may be wanted if you wish to run in a separate process on your machine or if you wish to have a raphtory server running on remote infrastructure with more resources.
You will need python3.9 or later and we recommend that you use conda to install python 3.9 and packages
Install conda by following the instructions at https://docs.conda.io/en/latest/miniconda.html
Create conda virtual environment
conda create -n raphtory-conda python=3.9
Activate conda environment
conda activate raphtory-conda
To run Raphtory as a remote process
For any firewalls or network security groups between your client installation and the server, a rule must be added to allow traffic into the server on port 1736 from your client public IP address.
If the deployment infrastructure is on another machine, log into the machine
Run python commands
pip install pyraphtory pyraphtory-jvm
Create context to connect to remote Raphtory
To create a remote context to connect your local client to a remote running instance of Raphtory, you simply call PyRaphtory.remote and pass in the IP address of the host and the port that Raphtory is running on as arguments.
ctx = PyRaphtory.remote("127.0.0.1",1736)
Create new graph using context
Now that the context is set to a remote raphtory server, you can use the new_graph function as usual to create a graph graph = ctx.new_graph(“graph_id”)
Get existing graph using context
If the raphtory server already has a graph that you would like to retrieve graph = ctx.get_graph(“graph_id”)