Pro ASP.NET SignaIR. Real-Time Communication in. Keyvan Nayyeri. .NET with SignaIR 2.1. Apress. Darren White

Similar documents
Pro ASP.NET SignalR. Real-Time Communication in.net with SignalR 2.1. Keyvan Nayyeri Darren White

Web Sockets and SignalR Building the Real Time Web

"Charting the Course... MOC A Introduction to Web Development with Microsoft Visual Studio Course Summary

Application Development

Real Time Apps Using SignalR

"Charting the Course... MOC B Developing Microsoft SharePoint Server 2013 Core Solutions. Course Summary

MS-20487: Developing Windows Azure and Web Services

Real-Time SignalR. Overview

Practical Node.js. Building Real-World Scalable Web Apps. Apress* Azat Mardan

Pro ASP.NET SharePoint Solutions. Techniques for Building SharePoint Functionality into ASP.NET Applications. Dave Milner.

Introduction to Web Development with Microsoft Visual Studio 2010 (10267A)

Course Outline: Course 10267A: Introduction to Web Development with Microsoft Visual Studio 2010 Learning Method: Instructor-led Classroom Learning

Pro JavaScript. Development. Coding, Capabilities, and Tooling. Den Odell. Apress"

Pro Windows 8.1. Development with. XAML and C# Jesse Liberty. Philip Japikse. Jon Galloway

Modern App Architecture

Jim Jackson II Ian Gilman

Course Outline: Course 50466A: Windows Azure Solutions with Microsoft Visual Studio 2010

20486-Developing ASP.NET MVC 4 Web Applications

Introduction to Web Development with Microsoft Visual Studio 2010

DEVELOPING WEB AZURE AND WEB SERVICES MICROSOFT WINDOWS AZURE

Automation through Chef Opscode

C# Programming: From Problem Analysis to Program Design. Fourth Edition

COURSE 20487B: DEVELOPING WINDOWS AZURE AND WEB SERVICES

Course Outline. Introduction to Azure for Developers Course 10978A: 5 days Instructor Led

COURSE OUTLINE: OD10267A Introduction to Web Development with Microsoft Visual Studio 2010

Create Web Charts. With jqplot. Apress. Fabio Nelli

Developing ASP.NET MVC Web Applications (486)

IN PRACTICE. Daniele Bochicchio Stefano Mostarda Marco De Sanctis. Includes 106 practical techniques MANNING

10267 Introduction to Web Development with Microsoft Visual Studio 2010

Microsoft Official Courseware Course Introduction to Web Development with Microsoft Visual Studio

Open Source Library Developer & IT Pro

Pro Business Applications with Silverlight 4

Developing Web Applications Using Microsoft Visual Studio 2008 SP1

DE Introduction to Web Development with Microsoft Visual Studio 2010

P a g e 1. Danish Tecnological Institute. Developer Collection Online Course k Developer Collection

Beginning ASP.NET. 4.5 in C# Matthew MacDonald

10267A CS: Developing Web Applications Using Microsoft Visual Studio 2010

Developing ASP.NET MVC 5 Web Applications

Building Effective ASP.NET MVC 5.x Web Applications using Visual Studio 2013

Deccansoft Software Services

SharePoint 2013 Central Administration

Installing and Administering a Satellite Environment

ASP.NET Using C# (VS2017)

Using and Developing with Azure. Joshua Drew

Introduction to Web Development with Microsoft Visual Studio 2010

Developing Windows Azure and Web Services

Platinum~Pro (v21.0): Deployment Guide (v1.2)

brief contents PART 1 INTRODUCING WINDOWS PHONE... 1 PART 2 CORE WINDOWS PHONE... 57

[MS20487]: Developing Windows Azure and Web Services

Developing Microsoft Azure Solutions

Beginning Sensor. Networks with Arduino. and Raspberry Pi. Apress- Charles Bell

70-487: Developing Windows Azure and Web Services

DE-2310 Developing Web Applications Using Microsoft Visual Studio 2008 SP1

Contents in Detail. Foreword by Xavier Noria

CHAPTER 1: A QUICK TOUR 3

"Charting the Course... SharePoint 2007 Hands-On Labs Course Summary

Consuming Office 365 REST API. Paolo Pialorsi PiaSys.com

Developing Microsoft Azure and Web Services. Course Code: 20487C; Duration: 5 days; Instructor-led

Microsoft Developing Windows Azure and Web Services

Service Level Agreement for Microsoft Azure operated by 21Vianet. Last updated: November Introduction

Gladinet Cloud Enterprise

Developing Microsoft SharePoint Server 2013 Core Solutions

Programming Windows Azure

CHAPTER 1: INTRODUCING C# 3

COURSE 20488B: DEVELOPING MICROSOFT SHAREPOINT SERVER 2013 CORE SOLUTIONS

Course 20488A: Developing Microsoft SharePoint Server 2013 Core Solutions

70-486: Developing ASP.NET MVC Web Applications

Developing Microsoft SharePoint Server 2013 Core Solutions Course Contact Hours

Pro ODP.NET for Oracle. Database 11 g. Edmund Zehoo. Apress

"Charting the Course... MOC A Developing Data Access Solutions with Microsoft Visual Studio Course Summary

"Charting the Course to Your Success!" MOC A Developing High-performance Applications using Microsoft Windows HPC Server 2008

Django with Python Course Catalog

Developing Microsoft SharePoint Server 2013 Core Solutions

Content Pack. Content Pack objectives

Vb Net Tutorial For Beginners Visual Studio 2010 Express Windows Service Template

Introduction to PTC Windchill ProjectLink 11.0

Adobe Experience Manager

MS 20488: Developing Microsoft SharePoint Server 2013 Core Solutions Duration: 5 Days Method: Instructor-Led

Pro ASP.NET MVC 2 Framework

Pro XAML with C# From Design to Deployment on WPF, Windows Store, and Windows Phone. Buddy James. Lori Lalonde

IIS Installation for.net Application. Md. Saifullah Al Azad

Developing ASP.NET MVC 5 Web Applications. Course Outline

G, H I, J K, L. Git distributed version control system, 67 repository, 67 TFS, 68 GitFlow, 76 77

Developing Solutions for Google Cloud Platform (CPD200) Course Agenda

Installing SharePoint Server 2007

SharePoint 20488: Developing Microsoft SharePoint Server 2013 Core Solutions. Upcoming Dates. Course Description. Course Outline

Developing Enterprise Cloud Solutions with Azure

Gladinet Cloud Enterprise

2310C VB - Developing Web Applications Using Microsoft Visual Studio 2008 Course Number: 2310C Course Length: 5 Days

Contents at a Glance. vii

Developing ASP.Net MVC 4 Web Application

COURSE 20486B: DEVELOPING ASP.NET MVC 4 WEB APPLICATIONS

Junos Security. Rob Cameron, Brad Woodberg, Patricio Giecco, O'REILLY. Tim Eberhard, andjames Quinn INFORMATIQNSBIBLIOTHEK UNIVERSITATSBIBLIOTHEK

Practical IPv6 for Windows Administrators

Mobile Apps Sample Solution

20486: Developing ASP.NET MVC 4 Web Applications (5 Days)

Programming Microsoft's Clouds

Microsoft Visual Studio 2010

ArcGIS Runtime: Building Cross-Platform Apps. Rex Hansen Mark Baird Michael Tims Morten Nielsen

"Charting the Course... Agile Database Design Techniques Course Summary

Transcription:

Pro ASP.NET SignaIR Real-Time Communication in.net with SignaIR 2.1 Keyvan Nayyeri Darren White Apress

Contents J About the Authors About the Technical Reviewer Acknowledgments Introduction xv xvii xix xxi Chapter 1: Introduction to the Real-Time Web and ASP.NET SignaIR 1 Evolution of the Internet 1 Why the Client-Side Experience Is More Important than Ever 2 Real-Time Web Application Development 3 Examples of Real-Time Web Application Development 3 Facebook 3 Twitter 5 Google Search 5 Google Docs 6 JabbR 6 ShootR 7 HistoryofASP.NET SignaIR 8 What Is ASP.NET SignaIR? 9 ASP.NET SignaIR Architecture 10 Main Challenges for Real-Time Web Development 11 Transport Options 12 Long Polling 12 Forever Frame 12 vii

Server-Sent Event 12 WebSockets 12 How ASP.NET SignaIR Uses Transports 13 Summary 13 Chapter 2: Overview of SignaIR 15 Technologies Behind SignaIR 15 Open Web Interface for.net (OWIN) 15 Connection Transports 16 Dependency Resolver 16 Task Parallel Library 19 Message Backplanes 19 Supported Server Platforms and Clients 19 Server Platforms 20 Client Platforms 20 Getting Started with SignaIR 21 NuGet 21 First Sample Application 23 When to Use SignaIR 33 Understanding the User Experience 34 General Categories of SignaIR Applications 34 When Not to Use SignaIR 34 Extensibility of SignaIR 35 OWIN Components 35 loc Containers 35 Scaling Out with Message Backplanes 35 Limitations of SignaIR 36 Server Platform Limitations 36 Client Platform Limitations 36 Message Backplane Limitations 36 External Limitations 37 viii Summary 37

Chapter 3: Developing SignaIR Applications Using Hubs 39 Overview of Hubs 40 Getting Started with Hubs 41 Route Configuration 45 Customize the Hubs Proxy Location 45 Cross-Domain Connections 47 Multiple Hub Declaration..49 Custom Hub Names 51 Custom Types 53 Groups 55 Accessing Particular Clients 58 Connection Lifetime Management 60 Context 61 State Management 62 Tracing 65 HubDispatcher 67 HubPipelineModule 68 Summary 68 Chapter 4: Developing SignaIR Applications Using Persistent Connections 69 What Is a Persistent Connection? 69 Properties of a Persistent Connection 69 How Persistent Connection Works 70 Using a Persistent Connection Instead of a Hub 71 How to Configure Persistent Connections 73 Persistent Connection Route Configuration 74 Global Timeout and Keep-Alive Configurations 74 HostContext Configuration 75 ix

Server Communication to Clients Over Persistent Connections 75 Negotiation 76 Ping 77 Connect 78 Send 78 Poll 78 Abort 79 Signaling Between Server and Clients 79 Server-side Events 79 Client-side Events 80 Communication and Signaling Example Using a JavaScript Client 82 Server Code for Client Example 82 JavaScript Client Example 83 Connection Grouping 86 GroupManager 86 Group Membership 86 Group Persistence 88 Summary 89 Chapter 5: Troubleshooting ASP.NET SignaIR Applications 91 ASP.NET SignaIR Troubleshooting Overview 92 Using Chrome Developer Tools for Client-Side Debugging 92 Using Fiddler for Client-to-Server Communication Debugging 100 Debugging the Server-Side Execution 102 Tracing Features 103 Summary 106 Chapter 6: An Overview of the Clients that Support SignaIR 107 Clients Supported by SignaIR 107 Client Configuration 107 Client and Server Communication 110 X

connection.tracewriter = Console.Out;Connection Lifetime Events 111 Server Example for Clients 111 HTML and JavaScript Clients 117 Persistent Connection Client 117 Hub Client 118.NET Clients 121 Persistent Connection Client 121 Hub Client 124 Silverlight Clients 127 Persistent Connection Client 127 Hub Client 131 Windows Store Clients 136 Persistent Connection Client 136 Hub Client 139 Windows Phone 8 Clients 144 Persistent Connection Client 144 Hub Client 149 Summary 154 Chapter 7: How to Extend and Customize SignaIR Functionality 155 Extensibility of the SignaIR Core 155 Implementing a Custom Dependency Resolver 155 Extending Existing Components 157 Replacing Individual SignaIR Components 157 Self-Hosting SignaIR Outside of IIS 159 Self-Host Example 160 Adding Windows Authentication and IIS Pipeline Stages to Applications 165 Linux and OS X Support Using the Mono Framework 167 What Is the Mono Framework? 167 Setting Up the Development Environment 168 Setting Up the Hosting Environment 171 xi

Creating a Mono SignaIR Server «'' Mono Framework on OS X 175 Using the Xamarin Add-in for Visual Studio to Create ios and Android SignaIR Clients 175 Setting Up the Xamarin Add-in for Visual Studio 175 Creating Android Applications 175 Chapter 8: Configuration, Deployment, and Security Aspects of SignaIR 193 Authentication and Authorization in ASP.NET SignaIR 194 Authentication and Authorization for Hubs 194 Authentication and Authorization for Persistent Connections 197 Configuration Aspects of ASRNET SignaIR Applications 199 Recommended IIS Settings for ASRNET SignaIR Applications 199 Default Message Buffer Size 199 Maximum Concurrent Requests per Application 200 Maximum Concurrent Requests per CPU 200 Request Queue Limit 201 Deploying ASRNET SignaIR Applications 201 Performance Counters 201 OWIN and ASRNET SignaIR 205 Summary 209 Chapter 9: Case Study 1: Stock Ticker 211 Project Overview 211 StockTicker Server Side 214 Startup 214 Stock Domain Class 214 StockTicker Hub 216 StockTicker Back-end Provider 217 StockTicker Client Side 222 HTML 222 JavaScript 223 Summary 226 xii

Chapter 10: Building a Collaborative Drawing Application 227 Project Overview 227 Developing the Server 228 Enabling Real-Time Interactivity Using SignaIR 228 Adding API Endpoints 243 Securing the Server 248 Setting Up the Dependency Resolver 258 Setting Up the OWIN Pipeline 263 Hosting the Server in Azure 266 Implementing the RoleEntryPoint Class 266 Creating the Cloud Service 268 Creating the Azure SQL Database 269 Configuring the Worker Role 275 Testing Deployment Locally 277 Deploying an Application to the Cloud 278 Scaling the Server 280 Developing the Clients 291 Developing the Client Homepage 291 Developing the Client Canvas Room 302 Summary 325 Index 327 xiii