October 9, 2018
.NET, .NET Core, .NET Framework, Analytics, Architecture, Azure, Azure, Azure Cosmos DB, Azure Functions, Azure IoT Suite, Cloud Computing, Cold Path Analytics, CosmosDB, Emerging Technologies, Hot Path Analytics, Intelligent Cloud, Intelligent Edge, IoT Edge, IoT Hub, Microsoft, Realtime Analytics, Visual Studio 2017, VisualStudio, VS2017, Windows
TTL capability within Azure Cosmos DB is a live saver, as it would take necessary steps to purge redudent data based on the configurations you may.
Let us think in terms of an Industrial IoT scenario, devices can produce vast amounts of telemetry information, logs and user session information that is only useful until we operate on them and take action on them, to be specific up to finate period of time. Once that data becomes surplus, we need an application logic that purges these old records.
With the “Time to Live” or TTL, Microsoft Cosmos DB provides an ability to have your documents automatically purged from database storage after a certian period if time(which you configured)
- This TTL by default can be set on a document collection level and later can be overridden on a per document basis.
- Once the TTL is set, Cosmos DB service will automatically remove the documents when its lifetime is over.
- Inorder to track TTL, Cosmos DB uses an offset field to check when it was last modified. This field is identifiable as “_ts”, which exists in every document you create. Basically it is a UNIX epoch timestamp. This field is updated everytime when the document is modified. [Ref: Picture1]
Enabling TTL on Cosmos DB Collection:
You can enable TTL on a Cosmos DB collection simply by using Azure Portal –> Cosmos DB collection setting for existing or during creation of a new collection)
TTL value needs to be set in seconds – if you need 90 days => 60 sec * 60 min * 24 hour * 90 days = 7776000 seconds
Below is a one of the reference architecture in which Cosmos DB – TTL would be essentially useful and viable to any Iot business case:
Hope that was helpful to get some understanding. For more references visit: Cosmos DB Documentation
April 25, 2017
AMQP, Analytics, Azure, Azure IoT Suite, Cloud Computing, Cloud Services, Cloud to Device, Communication Protocols, Connected, Connectivity, Device to Cloud, Emerging Technologies, HTTP 1.1, Identity of Things (IDoT), Intelligent Cloud, Intelligent Edge, Internet of Things, IoT, IoT Central, IoT Devices, IoT Edge, IoT Hub, IoT Privacy, IoT Security, Machines, MQTT, PaaS, SaaS, Stream Analytics
Microsoft has today released their IoT SaaS offering for customers and partners called as “Microsoft IoT Central”. IoT Central enables powerful IoT scenarios without requiring cloud solution expertise and also simplifies the development process and makes customers to make quick time to market solutions, making digital transformation more accessible to everyone without overhead of implement solutions end to end.
As per Microsoft :
“IoT Central provides an easier way to create connected products that propel digital business. Take the complexity out of the Internet of Things (IoT) with a true, end-to-end IoT software as a service (SaaS) solution in the cloud that helps you build, use, and maintain smart products.”
Benefits of IoT Central:
- Proven platform and technology with enterprise grade security.
- Reduced complexities of setting up and maintaining IoT infrastructure and solutions.
- Building smart connected products with lesser cost and lesser overhead would ensure higher customer satisfaction.
- Quickly adapt to changing environments.
For those would need control on implementing end to end can still choose the PaaS solution Azure IoT Suite.
Below is a picture from @JanakiramMSV’s article from forbes.com, to help you have a high level look at all the IoT offerings from Microsoft.