Slides

Report
Casablanca
What is it?
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++
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++
Microsoft Confidential.
Casablanca
Overview
Inspirations and basic principles
Highlight some of the major features
HTTP, JSON, Azure Storage, Async I/O, Tooling and Deployment
Demos and code walkthroughs
Microsoft Confidential.
Casablanca
Inspiration
.NET
Client APIs, asynchronous libraries
Node.js
Simplicity, asynchronous-only I/O libraries
Erlang
Actor model: scalable, safe, robust server-side code
Microsoft Confidential.
Casablanca
Architecture
Azure / IIS Host
Binary
Serializers
JSON
Parser & Writer
HTTP
Client & Listener
WinHTTP/HTTP.sys
Windows Executable Host
Apps & Libraries
C++
Actors
Azure
Services
Timers
Bing
Maps
Windows
Live
TCP
Client & Listener
Xbox
Live
Web Sockets
Client & Listener
PPL
Async File I/O
UDP
Client & Listener
IOCP
Windows 7 / 8
Microsoft Confidential.
Casablanca
Asynchrony
Service scalability is often bounded by I/O efficiency and per-connection resource
consumption
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
Microsoft Confidential.
Casablanca
REST
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
Microsoft Confidential.
http_client client(L"http://localhost/helloworld");
http_response response = client.request(methods::GET).get();
std::wstring response_string = response.extract_string().get();
Demo
Hello World
Casablanca
JSON
Text-based serialization format
Based on JavaScript
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
Microsoft Confidential.
Azure Storage
Blobs, Tables, Queues
Cloud-based storage
Persistent, redundant, available everywhere (client, on-premise server, cloud)
Blobs
Simple, file-like, storage
Tables
Non-relational table storage
Queues
Small (64KB) messages queued persistently in the cloud
Microsoft Confidential.
Demo
Guest Book
Demo
Video Streaming
Demo
Image Stitcher
Casablanca
Azure Integration
Casablanca is focusing on providing the following nativecode 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
Microsoft Confidential.
Casablanca
On-premise
We’re also providing capabilities for building on-premise
services in C++:
Integration with IIS
A stand-alone host (console executable, not NT service)
Microsoft Confidential.
Casablanca
More Information
Download binaries, samples, and documentation at
http://msdn.microsoft.com/en-us/devlabs/casablanca.aspx
Forum
http://social.msdn.microsoft.com/Forums/en-US/casablanca/threads
Release Timeframe
Open source this fall, client side supported release end 2012/early 2013
Questions
[email protected]
Microsoft Confidential.
© 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.
Casablanca
C++ Actors
C++ library based on Erlang concepts
Actors
Message-passing
Failure-resistant pattern support
Requires C++11 support for lambdas and move semantics
Microsoft Confidential.

similar documents