Skip to content

A distributed production environment to exploit the potential of Signal Collect.

License

Notifications You must be signed in to change notification settings

Innova4DReaumobile/census_framework

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Census v0.2.0

Census is a distributed production environment built to exploit the potential of Signal Collect.

More documentation files can be found in /docs, including how to setup Census in Google Compute Engine and how to add new algorithms to the library.

Features

  1. Census has a library of implemented graph algorithms to be computed.
  2. Census uses Neo4j to facilitate the data interaction.
  3. You can use Census with static servers of your own or install it in Google Compute Engine to have computing instances on demand that Census can manage.

How to use Census

Census is a service with a RESTful API, so to compute an algorithm all you need to do is send a POST with a json to http://localhost:9000/control/compute (change the host to the host where Census is installed). Lets see different uses:

Note: All the examples uses curl to send the http request.

Compute on a local host using the same Census Control server

curl -X POST -H "Content-Type: application/json" -d '{
  "algorithm": "SSCloseness",
  "bulk": "all-sources",
  "engines": [
    {"server-ip": "127.0.0.1", "server-port": 9000}
  ],
  "graph": {
    "tag": "Profile",
    "host": "http://example.com/",
    "port": 24789,
    "user": "admin",
    "password": "root"
  }
}' http://localhost:9000/control/compute

The algorithm field tells census what algorithm to compute.
The bulk field tells census for how many vertices the computation should be done, some options are: all-sources, all-pair, singlet.
The engines field tells census where are the Census Engine servers it can use. The graph field has all the information of the Neo4j database to use.

Compute using static servers and sending variables

curl -X POST -H "Content-Type: application/json" -d '{
  "algorithm": "SSCloseness",
  "bulk": "singlet",
  "vars": ["idnode1"],
  "engines": [
    {"server-ip": "10.42.265.1", "server-port": 9000},
    {"server-ip": "10.42.265.2", "server-port": 9000},
    {"server-ip": "10.42.265.3", "server-port": 9000}
  ],
  "graph": {
    "tag": "Profile",
    "host": "http://example.com/",
    "port": 24789,
    "user": "admin",
    "password": "root"
  }
}' http://localhost:9000/control/compute

Here the vars array is sent to the computation, in this case it means the source vertex to use. We will use singlet as our bulk option to compute the SSCloseness for only one node.

On this request we are also using 3 servers with Census listening on port 9000.

Compute with a Google Compute Engine installation

curl -X POST -H "Content-Type: application/json" -d '{
  "algorithm": "SSCloseness",
  "bulk": "all-sources",
  "instances": 100,
  "graph": {
    "tag": "Profile",
    "host": "http://example.com/",
    "port": 24789,
    "user": "admin",
    "password": "root"
  }
}' http://10.234.254.20:9000/control/compute

Here we are supposing that the ip 10.234.254.20 is a Google Compute Engine's public ip with a Census instance listening.

The instances field will tell Census to try use the GCE api and create 100 servers with Census for the computation of SSCloseness for each source.

About

A distributed production environment to exploit the potential of Signal Collect.

Resources

License

Stars

Watchers

Forks

Packages

No packages published