-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathschema.js
66 lines (63 loc) · 2.93 KB
/
schema.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (c) 2022, NVIDIA CORPORATION.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
'use strict';
const schema = {
gpu: {
description: 'An abstract interface to the node-rapids api, supported by a server.',
schema: {
'/': {
method: 'The name of the method to apply to gpu_cache data.',
caller: 'Either an object that has been stored in the gpu_cache or a static module name.',
arguments: 'Correctly specified arguments to the gpu_cache method.',
result: 'Either a result code specifying success or failure or an arrow data buffer.',
}
}
},
graphology: {
description: 'The graphology api provides GPU acceleration of graphology datasets.',
schema: {
read_json: {
filename: 'A URI to a graphology json dataset file.',
result: `Causes the node-rapids backend to attempt to load the json object specified
by :filename. The GPU will attempt to parse the json file asynchronously and will
return OK/ Not Found/ or Fail based on the file status.
If the load is successful, four tables will be created in the node-rapids backend:
nodes, edges, clusters, and tags. The root objects in the json target must match
these names and order.`,
returns: 'Result OK/Not Found/Fail'
},
read_large_demo: {
filename:
'A URI to a graphology json dataset file matching the sigma.js/examples/large-demos spec.',
result: `Produces the same result as 'read_json'.
If the load is successful, three tables will be created in the node-rapids backend:
nodes, edges, and options.`,
returns: 'Result OK/Not Found/Fail'
},
list_tables: {returns: 'Tables that are available presently in GPU memory.'},
get_table: {
':table':
{table: 'The name of the table that has been allocated previously into GPU memory.'}
},
get_column: {':table': {':column': {table: 'The table name', column: 'The column name'}}},
nodes: {
returns:
'Returns the existing nodes table after applying normalization functions for sigma.js'
},
nodes: {bounds: {returns: 'Returns the x and y bounds to be used in rendering.'}},
edges: {return: 'Returns the existing edges table after applying normalization for sigma.js'}
}
}
};
module.exports = schema;