Field | +Type | +Description | +
---|---|---|
Table "applications" - to store applications state. | +||
id | serial | - |
name | text | Application name. |
data | text | Stored as JSON. Configuration: image, command, args, volumes, envs, etc. State: is application running, error, events, restart count, etc. |
Table "consumers" - to store data access requests and consumed amount of data by consumers. | +||
id | serial | - |
chain_id | text | On-chain consumer identification like Substrate account id. |
requested | integer | Overall requested amount of data in KB. |
consumed | integer | Overall consumed amount of data in KB. |
Table "requests" - to store on-chain request for the data. | +||
id | serial | - |
chain_id | text | For idempotency: %block_number%_%event_index_in_block% . |
requested | integer | Requested amount of data in KB. |
Table "data" - to store data produced by applications. | +||
id | serial | - |
app_id | integer | Link to applications table by id: applications.id . |
seq_num | blob | Sequence number for idempotency. |
data | blob | Data itself. |
Table "data_sync" - to process synchronization with IPFS. | +||
id | serial | - |
data_id | integer | Link data from data table by id: data.id . |
consumer_id | integer | Link consumer from consumers table by id: consumers.id . |
synced_at | integer | Timestamp. |
expired_at | integer | Timestamp. |
Table "devices" - to store and index decentralized identities attributes to find particular data type or device. | +||
id | serial | - |
chain_id | text | On-chain id: Substrate account id. |
data_type | text | Data type like temperature, speed, etc. |
location | text | Location as coordinates or place name. |
price_access | text | Price to access the data. |
price_pin | text | Price to pin the data for some time. |
additional | text | Additional attributes which is stored as JSON. |
Table "system" - to store additional data for properly provisioner work. For example in this table we can store last indexed block number. | +||
id | serial | - |
key | text | - |
val | text | - |