- Install serverless and setup your AWS profile
git clone [email protected]:plastic-io/graph-server.git
cd graph-server
npm install
sls deploy
Your service is ready to use. Take note of the endpoints beginning with ANY - https://
and wss://
. You will need them when using the Plastic-IO IDE and running your server based graphs. Is OK if you forget to write them down, you can see them again by running sls info
.
- Plastic-IO Graph Scheduler Service
- Plastic-IO Graph Editor IDE Notification Service
- HTTP Graph Scheduler Host
- HTTP/WSS Graph API
- S3 Event Sourced Graph Database
- S3 Artifact Storage
- APIGWv2 Multiuser Connection Manager
This server provides graph services to the Plastic-IO IDE as well as the production runtime for Plastic-IO graphs.
Additionally, this server provides a multi user environment to develop, share, and monitor Plastic-IO graphs.
Plastic-IO graphs are a high level graph programming language built on top of JavaScript and executed with the Plastic-IO Scheduling Engine. Plastic-IO graphs are stored as JSON files. The GUI for Plastic-IO is the Plastic-IO Graph Editor IDE.
You can execute graphs on the server by subscribing events to the lambda "DefaultRoute" in this project. By default, all unbound HTTP traffic to the domain will come to the graph route. What graph gets executed is based on the URL.
<root>/<graph.url>.<graph.vector[].url>
Example:
The following URL would run vector "html" on graph "home"
https://mysite.com/home.html
Graphs are stored by their URL. Once the graph is looked up, the scheduler is invoked with the matching vector's URL.
If no vector URL is specified, the vector URL "index" is assumed. Similarity, if no graph URL is specified, the graph "index" is assumed. That makes the default route to the server "/" the graph "index" and the vector "index".
When you publish a graph, that graph becomes available in the production environment. Changes to the graph will not take effect until you publish the graph once again. You can still test your graph in the development environment after each change.
When you publish your vector or graph, it becomes available to other users of your Graph Database. These published versions are immutable and free of dependency issues. Once a graph or vector is published, users of that artifact can be sure it will never change. Past versions are listed right next to current versions and clearly labeled.
Because you can share the parts of the graph, and entire hypergraphs, Plastic-IO server allows you to build your entire infrastructure using first "low level" JavaScript and then higher level graphical programming, all within the multiuser Plastic-IO IDE.
Because each vector and graph in Plastic-IO are implicitly modular, this makes it so you can reuse the artifacts you create in other graphs very easily. Plastic-IO graph server provides a marketplace of graphs and vectors for developers to choose from, safely and securely.
See https://github.com/plastic-io/graph-editor for for the GUI client for this server.
+-----------+ +------------------+ +-----------------------------+ +----------------+
| | | | | | | |
| Browser | | Local Graph | | Local Remote Graph Copy | | Remote Graph |
| | | | | | | |
+-----+-----+ +--------+---------+ +-------------+---------------+ +--------+-------+
| | | |
| +++ | +++
+----Change---> | | +----Diff Calc----------------Change sent to Server--> | |
| | | | | |
| | | +++ | |
| | | | | | |
| | | <----Diff Calc------+ | | <---Change Sent to Client--+ | |
| +++ +++ +++
| | | |
| | | |