The purpose of this document is to describe how to use the data storage capabilities provided by the edgeEngine Runtime.
The intended readers of this document are software developers, system engineers, application architects, deployment and security personnel, and other technical professionals who want to understand the details of Data Management under edgeEngine.
After reading this document, you will:
In order to get the full benefit from reading this document, you need to have:
The edgeEngine Runtime is a serverless environment that provides key-value storage capabilities to a microservice by default. The mechanism for storing and retrieving key-value data is the edgeEngine Context Object. (You can read about the details of the edgeEngine Context Object in the Key Concepts section, Understanding the edgeEngine Context Object).
1: context2: ├── storage3: │ ├── getItem(key)4: │ ├── setItem(key, value)5: │ ├── eachItem(callback(key, value))6: │ ├── removeItem(key)7: │ ├── saveFile(fileName, base64EncodedString)8: │ └── deleteFile(fileName)
Listing 1: The functions of the context.storage object.
Developers use the context.storage functions to set, retrieve and delete key-value data. Also, developers can traverse all the stored key-value pairs in the given edgeEngine node using the context.storage.forEach() function.
In addition to storing string and numeric values, the context.storage object allows developers to store the contents of a file according to filename using the function context.storage.saveFile(fileName, base64EncodedString).
All data stored by a microservice is local to the particular device on which the edgeEngine Runtime operates. Sharing data between microservices on various devices requires that developers expose the data stored on a particular edgeEngine enabled device by way of a microservice endpoint that is custom coded. There is no automatic way to access data. All data access is provided by way of custom-coded microservices.
[TO BE PROVIDED]