Microsoft scaled down its flagship database, squeezing it into 500MB and running it on edge hardware.

The cloud is becoming increasingly distributed, with container technologies allowing easy deployment of what had been cloud functionality to devices at the edge of the network. What began with function-as-a-service runtimes has now graduated to supporting PaaS tools and technologies, stretching the cloud platform from public hyperscale data centers down to low-cost devices running on your network.

Microsoft has been talking about “the intelligent cloud and the intelligent edge” for a long time now, with a focus on finding ways around the bandwidth crunch between data sources and data processing in cloud architectures. There’s a certain level of self-interest in this approach, with hyperscale data centers close to cheap power but a long way from metropolitan population densities and relatively cheap bandwidth. If power is cheap and data is expensive, then why not process it close to the source?

SQL Server everywhere

At the heart of much of Microsoft’s cloud platform is its SQL Server database, now grown into a family of databases that work across public and private clouds; at desktop, data center, and hyperscale; and on both Windows and Linux. That family of databases has recently been joined by a new member: Azure SQL Edge. Designed for IoT (Internet of Things) and edge gateway scenarios on Intel and ARM hardware, it’s a small, containerized database that can operate both while connected and disconnected, providing a place to preprocess and stream data that can be developed remotely and delivered and managed from Azure.

Like the rest of the SQL Server family, Azure SQL Edge is a relational database with nonrelational capabilities. You can use it for traditional table-based storage, or instead work with JSON documents, with graph content, or with time-series data. That combination ensures you can use it for many different roles, but with a focus on IoT applications. It’s built on the SQL Server engine so there’s no need to learn new skills; the same techniques and programming tools you use on larger SQL Server instances work just as well on Azure SQL Edge, with T-SQL queries and functions developed elsewhere fully supported.

Azure SQL Edge deployment options

Azure SQL Edge can be deployed in two different ways. If you’re using Azure IoT Edge to deploy and manage IoT applications, you can find it on the Azure Marketplace and deploy it directly into your instances from the Azure Portal. If you’re using it on unmanaged systems, then it’s available in a container in Docker Hub and can be downloaded and run as a stand-alone container or used as part of a Kubernetes container orchestration. This last option is particularly interesting if you’re considering working with one of the edge-focused Kubernetes implementations, such as Canonical’s MicroK8s or Rancher’s K3s.

It’s important to remember that Azure SQL Edge is a variant of the Linux SQL Server release, and its container’s base operating system is Ubuntu 18.04. To get support, any host will need to run either 18.04 or 20.04 LTS releases of Ubuntu (so you can build and test applications on any Windows 10 PC running Windows Subsystem for Linux). You can use other Linux hosts or even the Windows version of Docker, but they won’t be tested and may not have all the services and applications needed to run your database.

Once a container instance is up and running, you can connect to it using the built-in command line tools (if you’re not running on ARM64, which doesn’t currently support sqlcmd). From here you can create tables and test queries, much like any other SQL Server database. In practice, you’re more likely to work with it remotely, using your choice of management and development tools. You need to ensure that appropriate container ports are open as part of the initial configuration process to use external tools.

Much of Azure SQL Edge is designed to support traditional database operations; there’s additional support for basic stream analytics to work with real-time data from devices. You can use this to build applications that filter data before uploading to a central processing application in Azure, or as a feed into machine-learning applications that work with models developed on Azure or development PCs and exported as ONNX (Open Neural Network Exchange).

#azure #sql #programming #developer

Getting started with Azure SQL Edge
2.10 GEEK