Upload
josh-lane
View
76
Download
1
Tags:
Embed Size (px)
Citation preview
Consulting/Training
The Past, Present, and Future of Server-Side Web on Windows
Consulting/Training
In the beginning
Consulting/Training
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
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”
Consulting/Training
Thus was born
Consulting/Training
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
Consulting/Training
Increasing web app sophistication pushed boundaries of the framework
Forms over data metaphor not always desirable
Law of Leaky Abstractions
Consulting/Training
And so we got a few modest improvements
Consulting/Training
Consulting/Training
And some slightly more ambitious ones
Consulting/Training
Consulting/Training
Utilize latent CPU cycles on the client
Improve the user experience
Maintain a developer upgrade path
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
Consulting/Training
Then, a bit of a reset
Consulting/Training
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
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
Consulting/Training
Meanwhile, the world moved on
Consulting/Training
Consulting/Training
So more recently… a few nods to reality
Consulting/Training
Consulting/Training
However
Consulting/Training
Modern web stack isstatic HTML + JS + CSS + JSON
Web API is great, but by default I get System.Web.dll too
<sadTrombone />
Consulting/Training
Do I Really Need ASP.NET Anymore?
Consulting/Training
Consulting/Training
Consulting/Training
Fast, scalable network server - hosts V8 JavaScript engine
Simple model:lite EXE host + JS libs you choose +
your code
Consulting/Training
Vibrant ecosystem: routing, view engines,security, data access, etc.
Multi-core concurrency is achieved viamultiple processes, not multiple threads
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
Consulting/Training
Consulting/Training
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
Consulting/Training
So it’s settled, then?Node wins?
Consulting/Training
The <ahem>Empire</ahem> Is Striking Back
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>
Consulting/Training
ASP.NET Project “Helios”
Consulting/Training
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
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.)
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
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.
Consulting/Training
In several important ways,Helios is “node.net”
Almost certainly represents the future of ASP.NET
Consulting/Training
Introducing… the HAIR stack (?)
Helios – AngularJS – IIS - RavenDB
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?