Skip to content

3. Web service

Jaewook Byun edited this page Feb 23, 2024 · 1 revision

Chronoweb REST web service

Chronoweb is an open-source web information system that analyzes temporal information diffusion with a unified RESTful web service. Users are able to create, retrieve, update, delete, and traverse graph elements such as vertices, edges, vertex events and edge events. Furthermore, the server allows subscribing a specific vertex source with an incremental computation program.

Resource Pattern in regular expression

The following resource pattern enables to represent a graph element in a unified way.

  • Vertex: ^[^|_]+$
  • Edge: ^[^|]+\|[^|]+\|[^|_]+$
  • VertexEvent: ^[^|]+[+-]?[0-9]+$
  • EdgeEvent: ^[^|]+\|[^|]+\|[^|]+[+-]?[0-9]+$

CRUD example

  • Create or Update an edge event
HTTP.PUT /graph/{edgeEventID}
  • Retrieve an edge event
HTTP.GET /graph/{edgeEventID}
  • Delete an edge event
HTTP.DELETE /graph/{edgeEventID}

OpenAPI 3.1 Specification

The full description of the web service can be found in the followings:

Example: temporal information diffusion

Create a graph

HTTP.PUT /graph/Jack|contact|Mary_1
HTTP.PUT /graph/Mary|contact|Jack_1

HTTP.PUT /graph/Sarah|contact|David_2
HTTP.PUT /graph/David|contact|Sarah_2

HTTP.PUT /graph/Jack|contact|Sarah_3
HTTP.PUT /graph/Sarah|contact|Jack_3

HTTP.PUT /graph/Sarah|contact|Mary_4
HTTP.PUT /graph/Mary|contact|Sarah_4

HTTP.PUT /graph/David|contact|Mary_5
HTTP.PUT /graph/Mary|contact|David_5

HTTP.PUT /graph/David|contact|Emma_6
HTTP.PUT /graph/Emma|contact|David_6

HTTP.PUT /graph/Sarah|contact|David_7
HTTP.PUT /graph/David|contact|Sarah_7

Subscribe Jack with 'IsAfterReachability' Kairos program at a time 0

HTTP.GET /graph/0/IsAfterReachability/Jack

Exploit an incrementally updated result, called Gamma Table

HTTP.GET /gammaTable/0/IsAfterReachability/Jack
{
 "time" : 0,
 "source": "Jack",
 "program": "IsAfterReachability",
 "gamma" : {
  "Jack" : 0,
  "Sarah" : 3,
  "David" : 5,
  "Mary" : 1,
  "Emma" : 6
 }
}