Objects overview

The objects model and how it lets you store and access files across Lattice

In Lattice, an object is a data model that represents a single file or a piece of data. Implemented around Anduril’s resilient content-delivery network (CDN), the Objects API distributes objects around the Lattice mesh.

Use the Objects API together with Entities to implement use cases such as track thumbnails, and vessel manifests.

Limits

An object must be less than 1 GiB in size.

Data distribution

Each Lattice environment runs an instance of the CDN. In a Lattice mesh deployment, every node in the mesh runs a single instance of the CDN. This lets Lattice retrieve objects using a tiered lookup mechanism:

Architectural diagram showing the content-delivery network used by Lattice.

If the requested data is not cached locally, Lattice queries peers at the same layer in the mesh. If a peer has the data, a request is issued to stream and cache the blob locally before sending it to the client. If no peers at the same layer have the requested data, the system queries nodes in the next highest layer, following a specific precedence order.

Object schema

The Objects API implements the PathMetadata and ContentIdentifier schemas to store and retrieve objects across the Lattice environment:

PathMetadata:

content_identifier
ContentIdentifierRequired

String that uniquely identifies the object path in your environment.

size_bytes
IntegerRequired

The size of the object in bytes.

last_updated_at
DatetimeRequired

The time when the object was last updated.

expiry_time
datetime

The future time at which expires an object expires and is deleted from the environment.

ContentIdentifier:

path
StringRequired

The unique object path in your environment.

checksum
String

The SHA-256 checksum of the object used to verify the integrity of the data in Lattice.

Object lifecycle

An object in Lattice has the following lifecycle states:

1

Create

When you upload an object, Object Store updates the object’s last_updated_at.

2

Expire

When an object expires, Object Store automatically deletes it from Lattice. You can define an expiry_time by setting the optional Time-to-Live header when uploading the object. If you associate an object with an entity in Lattice, your app must handle resetting the entity’s media component accordingly.

3

Delete

You can delete an object from Lattice before it expires by using the DeleteObject API. Similar to when an object expires, you must handle resetting the entity’s media component if the object is associated with an entity in Lattice.

What’s next?