The following steps are used to create a new edge instance
- Create a System within a ClearBlade Platform instance
- In the newly created System, create an Edge
- Assign the Edge an access key
- Install the Edge Raspberry Pi image
- Use the help to start the edge that points to
- Instance url
- System key
- Edge key
The following lifecycle occurs once the edge has successfully started and opened a connection to the base control system on a ClearBlade instance:
Edge updates the base control system with connection details related to internal IP Addresses and ports
Edge requests all of the latest information regarding its system schema including
Services / libraries
User table schema
Device table schema
Edge requests users data and updates the edge user table
Edge requests the device data and updates the edge device table
Edge attempts to maintain an open connection with the base control system to keep users and devices in sync
The edge offers a disconnected mode while running without an active IP connection, but Edge must start with an IP connection. While offline, all Edge based services, data collections, users, roles, devices, triggers and timers are able to interact with each other.
An online event results in the Edge triggering its online sync requirements to update to the latest system schema and user / device information with the base control system.
Reconnect / Conflict Resolution
During offline events, it is possible that the Edge will have a different state than the base control system. Resolution of state conflicts fall under two types:
- System Schema - Edges will always default to the instance definition of the schema
- User and Devices - Users and devices will be reconciled according to their last modified date on the base control system.
Edges have the ability to persist across restarts or work in a cache-only mode. When starting with the local flag, the edge will only keep a local cache of all collection information. When the Edge is restarted, any information in the edge that is not stored in the base control system instance is lost.
Edge Data Constraints
By default the ClearBlade platform can grow infinitely to store analytics, events, logs, and histories. This poses a risk to gateway devices that have limited resources and run for long periods of time. The Edge offers a lean mode which is ideal for long running Edge instances. Running Edge in lean mode results in the following:
- Analytics information is not stored
- Logs are not persisted
- Histories are taken off of queues when they are read.