Top Banner
C++ and the Cloud Steve Gates Visual C++ / Parallel Computing Platform Microsoft Corporation
18

Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Mar 28, 2015

Download

Documents

Emiliano Gamby
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

C++ and the Cloud

Steve GatesVisual C++ / Parallel Computing PlatformMicrosoft Corporation

Page 2: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

An incubation effort to:

Support client -> server communication in native code with a modern C++ API design

Support writing Azure-based and on-premise REST services in modern C++

Let developers fall into a “pit of scalability success” by designing the I/O libraries to primarily provide asynchronous APIs

Experiment with actor-based programming model(s) in C++

CasablancaWhat is it?

Accomplished by set of libraries, tooling, and hosting services

Cross platform – public API is only C++11 (Win32, WinRT, Linux)

Open source (fall 2012)

Eventual supported release as the Azure SDK for C++

Page 3: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

Inspirations and basic principles

Highlight some of the major features

HTTP, JSON, Azure Storage, Async I/O, Tooling and Deployment

Demos and code walkthroughs

CasablancaOverview

Page 4: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

.NET

Client APIs, asynchronous libraries

Node.js

Simplicity, asynchronous-only I/O libraries

Erlang

Actor model: scalable, safe, robust server-side code

CasablancaInspiration

Page 5: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

CasablancaArchitecture

Async File I/O

TimersBinary

Serializers

JSONParser & Writer

Azure / IIS Host Windows Executable Host

Windows 7 / 8

IOCPPPLWinHTTP/HTTP.sys

HTTPClient & Listener

TCPClient & Listener

Web SocketsClient & Listener

UDPClient & Listener

Apps & Libraries

Azure Service

s

Windows Live

XboxLive

C++Actors

BingMaps

Page 6: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

Service scalability is often bounded by I/O efficiency and per-connection resource consumption

CasablancaAsynchrony

Essential for responsive GUI

Asynchrony is hard, requiring code to be rewritten with inverted control flow (callbacks)

Composition of asynchronous operations is even harder without library or language support

Page 7: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

REST is the main pattern in use for web services

Mostly for stateless services, but can be used for stateful services, too (although that violates its core principles).

Much less complex than SOAP

Supported in Java, .NET, JavaScript, Ruby, Python, etc.

Native code developers on Windows can use OSS libraries or complex Win32 C APIs

CasablancaREST

Page 8: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

DemoHello World

http_client client(L"http://localhost/helloworld");

http_response response = client.request(methods::GET).get();

std::wstring response_string = response.extract_string().get();

Page 9: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

Text-based serialization format

Based on JavaScript

CasablancaJSON

JSON has become the de facto standard for serializing data for REST services

Much less complex than XML

Supported by most language environments on the Web

Page 10: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

BlobsSimple, file-like, storage

Azure StorageBlobs, Tables, Queues

TablesNon-relational table storage

QueuesSmall (64KB) messages queued persistently in the cloud

Cloud-based storagePersistent, redundant, available everywhere (client, on-premise server, cloud)

Page 11: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

DemoGuest Book

Page 12: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

DemoVideo Streaming

Page 13: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

DemoImage Stitcher

Page 14: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

CasablancaAzure Integration

Casablanca is focusing on providing the following native-code integration points out-of-the box:

VS template(s) for building Azure projects in C++

Library bindings for Azure storage, service bus, and service runtime

Azure hosting in both web roles and worker roles

Page 15: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

We’re also providing capabilities for building on-premise services in C++:

CasablancaOn-premise

Integration with IIS

A stand-alone host (console executable, not NT service)

Page 16: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

Download binaries, samples, and documentation at

http://msdn.microsoft.com/en-us/devlabs/casablanca.aspx

CasablancaMore Information

Forum

http://social.msdn.microsoft.com/Forums/en-US/casablanca/threads

Questions

[email protected]

Release Timeframe

Open source this fall, client side supported release end 2012/early 2013

Page 17: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as

of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES,

EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 18: Microsoft Confidential. An incubation effort to: Support client -> server communication in native code with a modern C++ API design Support writing Azure-based.

Microsoft Confidential.

Requires C++11 support for lambdas and move semantics

CasablancaC++ Actors

C++ library based on Erlang concepts

Actors

Message-passing

Failure-resistant pattern support