46
Consulting/Training The Past, Present, and Future of Server-Side Web on Windows

The Web on Windows

Embed Size (px)

Citation preview

Page 1: The Web on Windows

Consulting/Training

The Past, Present, and Future of Server-Side Web on Windows

Page 2: The Web on Windows

Consulting/Training

In the beginning

Page 3: The Web on Windows

Consulting/Training

Page 4: The Web on Windows

Consulting/Training

Server-side scripting (VBScript, JScript), XML/XSLT, etc.

Generate markup on the server, push to client

Relatively little work happening in the browser

Page 5: The Web on Windows

Consulting/Training

Skillset mismatch between application dev and web dev

(languages, statefulness, etc.)Interpreted execution, synchronous

I/O… bad perf and scale

“Your markup chocolate got in my app logic peanut butter”

Page 6: The Web on Windows

Consulting/Training

Thus was born

Page 7: The Web on Windows

Consulting/Training

Page 8: The Web on Windows

Consulting/Training

Page-based forms over data metaphor “unified” application and

web developmentStill generating markup on the server

Still not much happening in the browser

Page 9: The Web on Windows

Consulting/Training

Increasing web app sophistication pushed boundaries of the framework

Forms over data metaphor not always desirable

Law of Leaky Abstractions

Page 10: The Web on Windows

Consulting/Training

And so we got a few modest improvements

Page 11: The Web on Windows

Consulting/Training

Page 12: The Web on Windows

Consulting/Training

And some slightly more ambitious ones

Page 13: The Web on Windows

Consulting/Training

Page 14: The Web on Windows

Consulting/Training

Utilize latent CPU cycles on the client

Improve the user experience

Maintain a developer upgrade path

Page 15: The Web on Windows

Consulting/Training

Plug-in based app model died on the vine

Canned AJAX behaviors performed poorly, unattractive relative to newer

options

Microsoft zigged, the world zagged

Page 16: The Web on Windows

Consulting/Training

Then, a bit of a reset

Page 17: The Web on Windows

Consulting/Training

Page 18: The Web on Windows

Consulting/Training

Borrowed from Rails (and Smalltalk, etc.) to achieve formal separation of

data, logic, and presentation

Back to generating “real” HTML

Still integrated with core ASP.NET pipeline

Page 19: The Web on Windows

Consulting/Training

Still (mostly) about server-side markup generation

Still drags around legacy ASP.NET (Web Forms is still in your

AppDomain!)Heavyweight, prescriptive model

Page 20: The Web on Windows

Consulting/Training

Meanwhile, the world moved on

Page 21: The Web on Windows

Consulting/Training

Page 22: The Web on Windows

Consulting/Training

So more recently… a few nods to reality

Page 23: The Web on Windows

Consulting/Training

Page 24: The Web on Windows

Consulting/Training

However

Page 25: The Web on Windows

Consulting/Training

Modern web stack isstatic HTML + JS + CSS + JSON

Web API is great, but by default I get System.Web.dll too

<sadTrombone />

Page 26: The Web on Windows

Consulting/Training

Do I Really Need ASP.NET Anymore?

Page 27: The Web on Windows

Consulting/Training

Page 28: The Web on Windows

Consulting/Training

Page 29: The Web on Windows

Consulting/Training

Fast, scalable network server - hosts V8 JavaScript engine

Simple model:lite EXE host + JS libs you choose +

your code

Page 30: The Web on Windows

Consulting/Training

Vibrant ecosystem: routing, view engines,security, data access, etc.

Multi-core concurrency is achieved viamultiple processes, not multiple threads

Page 31: The Web on Windows

Consulting/Training

All I/O is non-blocking, uses internal thread pool

Non I/O-based request processing occurs on a single threaded event

loop, with minimal per-request allocation

Page 32: The Web on Windows

Consulting/Training

Page 33: The Web on Windows

Consulting/Training

Page 34: The Web on Windows

Consulting/Training

So, node is great for two main reasons:

Async I/O ensures high scale

Event loop model helps ensure minimalmemory allocation per request

Page 35: The Web on Windows

Consulting/Training

So it’s settled, then?Node wins?

Page 36: The Web on Windows

Consulting/Training

The <ahem>Empire</ahem> Is Striking Back

Page 37: The Web on Windows

Consulting/Training

Host

Server

Middleware

Application

OWIN and Katana

owinhost.exeIIS

YourApp.exe

System.Web

WCFHttpListene

r

Web API

SignalR

YourWare

Task Invoke(IDictionary<string, object>)

Task Invoke(IDictionary<string, object>)

Task Invoke(IDictionary<string, object>)

IDictionary<string, object>

Page 38: The Web on Windows

Consulting/Training

ASP.NET Project “Helios”

Page 39: The Web on Windows

Consulting/Training

Page 40: The Web on Windows

Consulting/Training

Helios is an OWIN-compatible network server

Helios requires IIS, but does not run in the context of System.Web*

Helios can run outside of OWIN proper

Page 41: The Web on Windows

Consulting/Training

Take the good parts of ASP.NET (pluggable programming models,

async, IIS integration, etc.)

Leave behind the bad parts (System.Web monolith, weird stuff

like 401 302, etc.)

Page 42: The Web on Windows

Consulting/Training

Borrow liberally from node (async bydefault, extension via middleware,

minimal ceremony, etc.)

Still utilizes thread-based concurrency vs. node’s event loop

model

Page 43: The Web on Windows

Consulting/Training

Doesn’t support higher-order models like MVC (may or may not ever

support these)

Cannot reference ASP.NET pipeline intrinsics…HttpRuntime, HostingEnvironment, etc.

Page 44: The Web on Windows

Consulting/Training

In several important ways,Helios is “node.net”

Almost certainly represents the future of ASP.NET

Page 45: The Web on Windows

Consulting/Training

Introducing… the HAIR stack (?)

Helios – AngularJS – IIS - RavenDB

Page 46: The Web on Windows

Consulting/Training

How to satisfy two core constituencies?

How to foster node’s third-party module community for Helios?

Node’s appeal: simple, opt-in dev model?Or is it JS on the server?Implications for ASP.NET?