The Fostrom Platform
The Fostrom platform is divided into a few key areas, which work together cohesively to provide a seamless and simple experience.
Let's go over the concepts and parts of the platform.
-
Organizations
You can create organizations and invite other users to collaboratively work on your IoT projects. We have two roles for users currently: owners and members. Owners can create, edit, and delete any resources. Members can currently only view resources. You create fleets inside organizations.
-
Fleets
Almost everything you do on Fostrom stays inside a fleet. All devices, data, actions, logs, and much more, belong to a fleet. You can create fleets inside organizations. You need to pick a region when creating a fleet, which cannot be changed later. Select the region closest to most of your devices, as most requests are handled by your fleet's region.
-
Devices
A device on Fostrom is the virtual representation of your actual device. Think of it like a digital twin. Once you create a device, you get connection credentials, which the device needs to provide while connecting to Fostrom over the various protocols we support. Once connected, your devices can send and receive packets from Fostrom. Devices should send heartbeats, datapoints and messages. Along with that, each device has its own mailbox, which allows it to receive incoming messages reliably. We're building more capability and working on Device SDKs to make the integration process smoother.
-
Packet Schemas
Packet Schemas, simply put, are structured schemas that you define beforehand. You can create a packet schema for either a datapoint or a message. The name of the packet schema matters as that is what you'll use to send a particular datapoint or message to Fostrom. You then add fields (we support many types), essentially defining the shapes of payloads you expect to send and receive. Schemas are always backwards compatible, although you can change the shape and some aspects of fields over time. Schemas give the platform an incredible power: to be correct and reliable. They're used everywhere from your devices sending data, to actions which give you access to payloads, and your devices received structured messages which always follow the schemas you've defined, reducing unexpected runtime errors.
-
Packets
To send a packet to Fostrom, you need to state which packet schema are you sending it for. Fostrom then processes your packet according to the defined schema and stores it. Similarly, when a message is queued in the mailbox of a device (usually through an Action Run), it contains the name of the message's packet schema, which you can use on your device to safely extract the fields you need.
-
Actions
Actions are programmable units of compute, which trigger on incoming messages. We currently support writing code in JavaScript. Your device can send a message, which will then cause an action to trigger on Fostrom, in which you can write some conditional logic for example, and have it execute effects like triggering webhooks or queuing messages for other devices.
-
Webhooks
You can pre-define a Webhook from your Fleet Settings, which you can then trigger in your Action code. Webhooks are retried a few times if the server does not send a 200-range status code.
We're actively developing the platform and adding many more features and capabilities to it. We'll keep these docs updated.
The following pages in this section cover each of these concepts in detail, so make sure to check them out too.