CppCon Program Highlights, 2 of N: C++ and the Modern Web

The CppCon 2014 conference program has been posted for the upcoming September conference. We've received requests that the program continue to be posted in "bite-sized" posts, a few sessions at a time, to make the 100+ sessions easier to absorb, so here is another set of talks. This series of posts will conclude once the entire conference program has been posted in this way.

Note: Early Bird registration ends in about 24 hours from the time of this post.

 

Some people seem to think that "web" and "C++" don't belong in the same sentence, but part of what you need to know about modern C++ is how essential it is for web services, how to use web services from C++ code, and the new tools available to compile C++ code to run in the browser -- any browser. In these talks, the CppCon program covers development in this exciting modern area, and we think you'll see that the speakers include the creators of the key technologies -- Those Who Know and Those Who Do in some of the leading efforts in our industry.

In this post:

  • Emscripten and asm.js: C++'s Role in the Modern Web 
  • Embind and Emscripten: Blending C++11, JavaScript, and the Web Browser
  • Using C++ to Connect to Web Services

 

Emscripten and asm.js: C++'s Role in the Modern Web

All major web browsers are written in C++, but C++ is starting to fill an important role in web *content* as well: While JavaScript is the only standards-compliant language available to websites, compiling other languages to JavaScript has been shown to be practical and effective. This talk will explain how Emscripten, an LLVM-based open source compiler from C++ to JavaScript, lets you run a C++ codebase on the web at near-native speed. To achieve that level of performance, Emscripten emits asm.js, a strict subset of JavaScript that is easy for JavaScript engines to optimize, and was designed specifically as a compilation target for languages like C and C++. We'll also discuss some of the more challenging aspects of compiling C++ to JavaScript, stemming from the C++ language itself, libraries and toolchains, and some thoughts on possible solutions.

Speaker: Alon Zakai, Mozilla. Alan works on Emscripten, an LLVM-based compiler from C++ to JavaScript, as well as other projects related to porting existing content to the web. Twitter handle: @kripken

 

Embind and Emscripten: Blending C++11, JavaScript, and the Web Browser

Emscripten compiles C or C++ source code into JavaScript so it can run in a web browser. Emscripten is commonly used to port games to the web with no download or plugin required.

Embind is a C++11 binding library that makes it easy to expose libraries written in C++ to JavaScript. This allows JavaScript applications to take advantage of existing bodies of C++ code. In addition, C++ compiled into the asm.js subset of JavaScript is often faster than hand-written JavaScript, so Embind makes it convenient to accelerate JavaScript applications by writing high-performance functionality in C++.

With several motivating examples, this lecture will cover the design of embind, how variadic templates and constexpr facilitate interesting optimizations, and how embind minimizes its impact on the size of the generated JavaScript.

Speaker: Chad Austin, Technical Director, IMVU. Chad is a Senior Technical Director at IMVU, where he works on highly scalable backend systems, front-end web architectures, and optimizing the bits and bytes of 3D graphics pipelines. C++ was Chad's first love, and he once mowed "C++" into his back yard before a rainstorm, where it stayed for weeks. Website: http://chadaustin.me Twitter: @chadaustin

 

Using C++ to Connect to Web Services

Many languages have great support for connecting to web services. Trying to connect C++ applications to the cloud is difficult. The C++ standard library doesn't contain anything for networking (yet), and with the proliferation of devices, being able to do so in a cross platform manner is even more appealing. Often requiring use of multiple different styled, and potentially low level, libraries where asynchrony wasn't designed from the start. Or by building your own abstract layers over platform and operating system APIs, all of which distract from focusing on the core logic of your application.

The C++ REST SDK makes connecting to services easier by creating APIs focused on simplicity and asynchrony, built using tasks from the Parallel Patterns Library. This is done by putting together a series of cross platform libraries for working with HTTP, WebSockets, JSON, URIs, and OAuth. In many cases building on top of other popular open source libraries like Boost, OpenSSL, and WebSocket++. This talk will take a practical approach looking at what is involved in connecting to some of the common popular services from C++, using the C++ REST SDK and other libraries. Several tutorial style example and demos will be done using C++ code that runs on all the major platforms.

Speaker: Steve Gates, Microsoft. Steve Gates is a senior engineer on the Visual C++ team at Microsoft. Joining Microsoft in 2007, he's worked on various runtimes and libraries for parallel and asynchronous programming, including the Parallel Patterns Library. For the past couple of years he's been focusing on improving the experience in C++ for connecting to services. Specifically working on the C++ Rest SDK (Casablanca) open source project. Outside of work Steve's interests include growing vegetables, food preservation, and eating great food.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.