1
0
mirror of https://github.com/Microsoft/sql-server-samples.git synced 2025-12-08 14:58:54 +00:00
Files
sql-server-samples/samples/applications/iot-connected-car/README.md
2017-05-06 21:49:22 -07:00

3.6 KiB
Raw Blame History

IoT Connected Car

This code sample demonstrates how a SQL Server 2016 (or higher) memory optimized database could be used to ingest a very high input data rate and ultimately help improve the performance of applications with this scenario. The code simulates an IoT Connected Car scenario where multiple cars are constantly sending telemetry data to an the Azure SQL database.

Contents

About this sample
Before you begin
Run this sample
Sample details
Disclaimers
Related links

About this sample

  1. Applies to: SQL Server 2016 (or higher) Enterprise / Developer / Evaluation Edition, Azure SQL Database (Premium SKUs)
  2. Key features:
    • Memory Optimized Tables and Table valued Parameters (TVPs)
    • Natively Compiled Stored Procedures
    • System-Versioned Temporal Tables
    • Clustered Columnstore Index (CCI)
    • SQL Graph Extensions
  3. Workload: Data Ingestion for IoT
  4. Programming Language: .NET C#, T-SQL
  5. Authors: Perry Skountrianos [perrysk-msft]

Before you begin

To run this sample, you need the following prerequisites.

Software prerequisites:

  1. SQL Server 2016 (or higher) or a Premium Azure SQL Database
  2. Visual Studio 2017 (or higher) with the latest SSDT installed

Azure prerequisites:

  1. Permission to create an Azure SQL Database

Run this sample

  1. Clone this repository using Git for Windows (http://www.git-scm.com/), or download the zip file.

  2. From Visual Studio, open the iot-connected-car.sln file from the root directory.

  3. Right click WinFormsClient and select "Set as StartUp Project" (if it is not already set).

  4. In Visual Studio Build menu, select Build Solution (or Press F6).

  5. Modify the Db connection string in App.config Settings (located in the Solution Items solution folder) to provide YOUR_SERVER, YOUR_USERNAME, and YOUR_PASSWORD

  6. Create the Database and Sample reference data

  • Note: For publishing to Azure SQL you need to create a premium database before setting up the schema and sample data
  1. Build the app and run it.

  2. Press the Setup/Reset DB button to create the DB schema and sample reference data

  3. Start the workload by pressing the Start button

Sample details

High Level Description

Alt text

Visual Studio Solution Projects

  1. Data Generator: Data Generator client library. Uses multiple async tasks to produce a test data workload.
  2. WinFormsClient: Windows Forms Data Generator client.

Disclaimers

The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade applications. This is beyond the scope of this quick start sample.

For more information, see these articles: