42. For better Comet go Threadless: Manos de Mono or Node.js Just Remember Mordac will likely need bribing to deploy it
43. Faye is a Bayeaux server for Node.JS http://faye.jcoglan.com/
44. Resources Contention, poor performance, and deadlocks: http://support.microsoft.com/kb/821268 ASP.NET Thread Usage on IIS 6.0 and IIS 7.0: http://blogs.msdn.com/b/tmarq/archive/2007/07/21/asp-net-thread-usage-on-iis-7-0-and-6-0.aspx Improving ASP.NET Performance: http://msdn.microsoft.com/en-us/library/ff647787.aspx PageAsyncTask: http://msdn.microsoft.com/en-us/library/system.web.ui.pageasynctask.aspx MVC Async Controllers: http://msdn.microsoft.com/en-us/library/ee728598.aspx Should DB Calls be Async? http://blogs.msdn.com/b/rickandy/archive/2009/11/14/should-my-database-calls-be-asynchronous.aspx AspComet: http://github.com/nmosafi/aspcomet Bayeux and Cometd: http://svn.cometd.com/trunk/bayeux/bayeux.html Manos De Mono: http://github.com/jacksonh/manos Node.JS: http://nodejs.org/ FAYE: http://faye.jcoglan.com/
45. We would like to thank our sponsors and supporters for helping us bring you this event
46. Please complete the feedback form in your delegate pack for a chance to win some great prizes. Please remember to return the form before you enter the lock note, or leave the event.
Editor's Notes
We want the perf counter to be zero.
Demo:Copy deployment to \\\\webserver\\DeploymentsSwitch to server and run the deployment – use the batch command with /Y optionRun TailspinSpyworks (port 8080!) – use VS web load testShow perf counters:ASP.NET\\Requests in Application QueueASP.NET\\Requests CurrentShow IIS session diagnostics (via IIS mgr) and request queue states
Means page executes asynchronouslyCan run async tasks, but only until pre-render completesWithout Async=True errors get thrownDemo:Async pagesRun load test againNOTE – no real difference. If anything a little worse.Only apply where multiple activities being performed, and where activity is not CPU boundEach async == extra threadDon’t manually create threads!Web service calls use CLR threads as does QueueUserWorkItem – tune thread pool
Show glimpse in action: http://getglimpse.com/
Demo:RSS AggregatorSynchronous fetching == slow Async = better, but async on main threadParallels = best – spawns multiple threads, but leads to thread starvation in a web farmTurn offAsync in page directive and check the error
IIS is still threaded so the issues from earlier still applyLong polling reduces the issue somewhat
Show web chat workingShow long polling in chromedev toolshttp://webserver:8082/jquery.aspxStep through some of the server side code (from the processrequest method onwards) Show JSON content of messageWalkthrough of some of the codeCometHttpHandler. IHttpAsyncHandlerMessage comes in, converted from JSONPushed onto message busDone!Your code?Clients subscribeBack end pushes onto message busASPComet also supports callback messages, not just long polling