Skip to main content
Version: 1.5.1

Data Structures

TTLParams

OORT has three queues for any data topic: urgent, bulk, and surplus. Data in the urgent queue stage is transmitted first, followed by data in the bulk queue stage, followed by data in the surplus queue stage.

The developer may set a file's Time-to-live (TTL) for each stage individually. For lower priority data it is possible to skip the urgent stage and add the data directly to bulk, or skip both the urgent and bulk stages and add directly to surplus.

Time-to-live (TTL) parameters for a sent item are described below.

See SendFileRequest for an example.

Members

Unless otherwise specified, all time values are in seconds.

NameTypeDescriptionDefault
urgentintTTL for urgent queue -- data here is transmitted first, and moved to bulk when TTL expires9000 (2.5 hours)
bulkintTTL for bulk queue -- data here is transmitted second, and moved to surplus when TTL expires43200 (12 hours)
surplusintTTL for surplus queue -- data here is transmitted third, and deleted when TTL expires172800 (48 hours)

Data in all three queues is transmitted First In First Out (FIFO). Below is a guideline for how to determine the appropriate TTL values for a given piece of data your payload is producing:

  1. Do you want this data type to skip the line and get downloaded ahead of the rest of your data? If no set urgent TTL to zero. If yes set urgent TTL to the number of seconds you want the skipping to be in effect.
  2. Does this data at some point become stale, i.e. substantially less valuable to you? If no, you don't need to set it, the default value will be applied. If yes, set bulk TTL to the number of seconds after which you consider it stale.
  3. Once this data becomes stale do you still want to try to download it if there’s remaining downlink budget for your payload? If yes set surplus TTL to the number of seconds you wish to continue trying before the data is deleted.

DeliveryHints

Delivery hints are used to inform the recipient of the file about its expected location and permissions.

NameTypeDescriptionDefault
dest_pathstrPath of the file on the destination filesystem
modestrFile mode in octal form. For example: 760 means that the user can read+write+execute, the group can read+write, and others have no access

SendOptions

Options to apply to a send request

See SendFileRequest for an example.

Members

NameTypeDescriptionDefault
TTLParamsTTLParamstime-to-live parameterssee TTLParams
reliablebooleanwhether to send an item reliable, i.e., with retriestrue
delivery_hintsDeliveryHintsDelivery information provided when the file was submitted to the pipeline[optional]
tagsdict(str, str)a structure for optional file tags[optional]

SendFileRequest

A request to send a file via the Data Pipeline API

from oort_sdk_client.models import (
TTLParams, SendOptions, SendFileRequest
)


ttl = TTLParams(urgent=9000, bulk=43200, surplus=172800)
send_options = SendOptions(ttl_params=ttl, reliable=True)
request = SendFileRequest(destination='ground', topic='logs',
filepath='/file/to/send',
options=send_options))

# ... use request ...

Members

NameTypeDescriptionDefault
destinationstringthe destination to send the file to-
filepathstringThe source file path. Must be absolute-
topicstringThe pipeline topic to send the file to-
optionsSendOptionsThe options to applysee SendOptions

SendFileResponse

The response received from a send file request.


# create SdkApi agent, SendFileRequest request

response = agent.send_file(request)
print('The file was sent with uuid {}'.format(response.uuid))

Members

NameTypeDescriptionDefault
UUIDstringthe unique identifier for the file transfer-

FileInfo

Information about the file and the transfer request.

See RetrieveFileRequest for an example.

Members

Times are unix epoch times (i.e., seconds since Jan 1, 1970)

NameTypeDescriptionDefault
idstringthe UUID for the file transfer-
pathstringthe original path this file was sent as-
sizeintegerthe original size of this file-
modifiedintegerthe time this file was most recently modfied-
createdintegerthe time this file was created-
crc32stringCRC-32 calculated for the file-
delivery_hintsDeliveryHintsDelivery information provided when the file was submitted to the pipeline[optional]

AvailableFilesResponse

Response to available files query

See RetrieveFileRequest for an example.

Members

NameTypeDescriptionDefault
filesFileInfo[]list of the available files-
overflowbooleantrue if there are mote files available than could be returned in a single call-

RetrieveFileRequest

Request to retrieve a file from the Data Pipeline API

from oort_sdk_client import SdkApi
from oort_sdk_client.models import FileInfo, RetrieveFileRequest

available = agent.query_available_files(thetopic).files
if not available:
print("No files available")
else:
for f in available:
print("Retrieving {}".format(f.id))
req = RetrieveFileRequest(
id=f.id,
save_path="/tmp/{}".format(os.path.basename(f.path)))
rfinfo = agent.retrieve_file(req)
print("Retrieved {}".format(rfinfo.id))

Members

NameTypeDescriptionDefault
idstringthe UUID for the file transfer-
save_pathstringThe absolute path for the file to be saved to.-

ErrorResponse

Any error returned from the Data Pipeline API.

Members

NameTypeDescriptionDefault
statusintegerstatus code for the error-
messagestringThe error message-