SlideShare una empresa de Scribd logo
1 de 47
Upgrading to
ASP.NET Core 3.0
https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30
Blazor
https://...
JS
C#
.NET
How Blazor WebAssembly works
https://...
DOM
Razor Components
.NET
WebAssembly
Blazor on client or server
https://...
DOM
Razor Components
.NET
WebAssembly
https...
DOM
.NET Core
SignalR
Blazor WebAssembly Blazor Server
Razor Components
.NET
.NET Core 3.0May 2020
Blazor on client or server
Blazor WebAssembly Blazor Server
.NET Core 3.0May 2020
https://blazor.net
Build your own pizza store UI with Blazor
https://aka.ms/blazorworkshop
https://www.telerik.com/blazor-ui
“Telerik UI for Blazor components have been built from the ground-up
to ensure you experience shorter development cycles, quick iterations
and cut time to market”
“DevExpress UI for Blazor ships with 12 UI components (including a
Data Grid, Pivot Grid, Charts and Scheduler) so you can design rich user
experiences for both Blazor server-side and Blazor client-side
platforms.”
https://www.devexpress.com/blazor
“The Syncfusion ASP.NET Core Blazor Components library is the only
suite that you will ever need to build an application, containing over 60
high-performance, lightweight, modular, and responsive UI controls in a
single package.”
https://www.syncfusion.com/blazor-components
https://aka.ms/awesomeblazor
https://gitter.im/aspnet/blazor
• Blazor: https://blazor.net
• Docs: https://blazor.net/docs
• .NET Core 3.0: https://dot.net/get-core3
• Visual Studio: https://visualstudio.com/
• Workshop: https://aka.ms/blazorworkshop
• Community: https://aka.ms/awesomeblazor
Try Blazor today!
gRPC
gRPC is…
• Popular open source RPC framework
• Largest RPC mindshare
• Cloud Native Computing Foundation project
• gRPC stands for gRPC Remote Procedure Calls
• Built with modern technologies
• HTTP/2
• Protocol Buffers
• Designed for modern apps
• High performance
• Platform independent
+ =
Protobuf (aka Protocol Buffers)
• IDL (interface definition language)
Describe once and generate interfaces for
any language
• Service model
Service method and structure of the
request and the response
• Wire format
Binary format for network transmission
syntax = "proto3";
message SubscribeRequest {
string topic = 1;
}
message Event {
int32 id = 1;
string details = 2;
}
service Topics {
rpc Subscribe(SubscribeRequest)
returns (stream Event);
}
5052 4920 2a20 4854 5450 2f32
0d0a 534d 0d0a 0d0a 0000 0004
0000 0000 0401 0000 0000 0000
Remote Procedure Calls vs HTTP APIs
• Contract first (proto file) • Content first (URLs, HTTP method, JSON)
• Contract is designed for humans
• Hides remoting complexity
• Content is designed for humans
• Emphasises HTTP
HTTP APIsRemote Procedure Calls
Performance
Developer productivity
Widest audience
Ease of getting started
Demo!
• Create gRPC service using template
• Create gRPC client
• Call service
Grpc.Core
Going deeper: gRPC on .NET Core 3.0
Grpc.Core
Grpc.Core.Api
Grpc.AspNetCore Grpc.Net.Client
• HTTP/2 via Kestrel
• Integrates with ASP.NET
• HTTP/2 via HttpClient
• DelegatingHandler
Key features - Performance
• Low network usage
• HTTP/2 binary framing and header compression
• Protobuf message serialization
0
100
200
300
400
500
600
700
800
1 2 10 20
Size(bytes)
Serialized items
JSON vs Protobuf Size Comparison
JSON
Protobuf
syntax = "proto3";
package sample;
message Test {
string query = 1;
int32 page_number = 2;
int32 result_per_page = 3;
repeated Ticker tickers = 4;
}
message Ticker {
string name = 1;
float value = 2;
}
{
"query": "myQuery",
"page_number": 42,
"result_per_page": 100,
"tickers": [
{
"name": "rPs",
"value": 9.768923
},
{
"name": "WEo",
"value": 6.067048
}
]
}
https://nilsmagnus.github.io/post/proto-json-sizes/
5052 4920 2a20 4854 5450 2f32
0d0a 534d 0d0a 0d0a 0000 0004
0000 0000 0401 0000 0000 0000
Key features - Performance
• HTTP/2 multiplexing
• Multiple calls via a TCP connection
• Avoid head-of-line blocking*
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="Topics.proto" GrpcServices="Server" />
<PackageReference Include="Google.Protobuf" Version="1.23.0" />
<PackageReference Include="Grpc.AspNetCore.Server" Version="2.23.2" />
<PackageReference Include="Grpc.Tools" Version="1.23.0" PrivateAssets="All" />
</ItemGroup>
</Project>
Key features - Code generation
• All gRPC libraries have first-class code generation support
syntax = "proto3";
message SubscribeRequest {
string topic = 1;
}
message Event {
string details = 1;
}
service Topics {
rpc Subscribe(SubscribeRequest)
returns (stream Event);
}
public abstract partial class TopicsBase
{
public virtual Task Subscribe(
SubscribeRequest request,
IServerStreamWriter<Event> responseStream,
ServerCallContext context)
{
throw new RpcException(new Status(StatusCode.Unimplemented, ""));
}
}
public partial class TopicsClient : ClientBase<TopicsClient>
{
public TopicsClient(ChannelBase channel) : base(channel)
{
}
public virtual AsyncServerStreamingCall<Event> Subscribe(
SubscribeRequest request,
CallOptions options)
{
return CallInvoker.AsyncServerStreamingCall(__Subscribe, options, request);
}
}
Key features - Multiple languages
Key features - Streaming
• gRPC uses HTTP/2 to enable streaming
Going deeper: gRPC and HTTP/2 requests
POST /SayHello
host: localhost
content-type: application/json
{"name":"world"}
HEADERS frame
DATA frame
HTTP/1.1
HEADERS frame
DATA frame
HTTP/2
POST /greet.Greeter/SayHello
host: localhost
content-type: application/grpc
1: world
Going deeper: gRPC and HTTP/2 responses
200 OK
date: Mon, 18 Jul 2020 16:06:00 GMT
server: Kestrel
content-type: application/json
{"message":"Hello world"}
HEADERS frame
DATA frame
HEADERS frame
HTTP/1.1
HEADERS frame
DATA frame
HTTP/2
200 OK
date: Mon, 18 Jul 2020 16:06:00 GMT
server: Kestrel
content-type: application/grpc
1: Hello world
grpc-status: Success
Demo!
• Update proto with server streaming call
• Implement on server
• Call from client
Disadvantages – Limited browser support
• Browsers have great HTTP/2 support 
• Browser JavaScript APIs haven’t caught up 
• gRPC-web provides limited support for calling gRPC services
Disadvantages - Not human readable
• HTTP/2 and Protobuf are binary
protocols
• Additional tools required to
debug calls
BloomRPC
SignalR
Automatic
Reconnections
Client-to-server
& server-to-
client streaming
Used in Blazor
Server-side
Components
Azure SignalR
Service
What is SignalR?
Long polling
Request
Response
Request
Event
Client Server
Server-sent events
new EventSource(…)
Message Event
Client Server
Message Event
Message Event
WebSockets
upgrade: websocket
Client Server
messages
HTTP/1.1 101 Switching Protocols 👍
🙂🙂
Azure SignalR Service
Business
Logic
(Hub)
Client
Pages
Web traffic
SignalR traffic
Business
Logic
(Hub)
Pages
Client
Endpoint
Server
Endpoint
SignalR trafficWeb traffic
API / SPA Auth
Migration Blazor gRPC
SignalR
API / SPA
Auth
https://live.dot.net

Más contenido relacionado

La actualidad más candente

A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13Thibault Charbonnier
 
gRPC & Kubernetes
gRPC & KubernetesgRPC & Kubernetes
gRPC & KubernetesKausal
 
Wcf Transaction Handling
Wcf Transaction HandlingWcf Transaction Handling
Wcf Transaction HandlingGaurav Arora
 
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformIntroducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformJeffrey T. Fritz
 
Docker pipelines
Docker pipelinesDocker pipelines
Docker pipelinesChris Mague
 
JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...PROIDEA
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5Malam Team
 
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache CamelOpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache CamelJosé Román Martín Gil
 
OSDC 2018 | Hardware-level data-center monitoring with Prometheus by Conrad H...
OSDC 2018 | Hardware-level data-center monitoring with Prometheus by Conrad H...OSDC 2018 | Hardware-level data-center monitoring with Prometheus by Conrad H...
OSDC 2018 | Hardware-level data-center monitoring with Prometheus by Conrad H...NETWAYS
 
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017Codemotion
 
Introduction to service stack
Introduction to service stackIntroduction to service stack
Introduction to service stackFabio Cozzolino
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquareApigee | Google Cloud
 
Docker Webinar: From Windows 2003 to the Cloud
Docker Webinar: From Windows 2003 to the CloudDocker Webinar: From Windows 2003 to the Cloud
Docker Webinar: From Windows 2003 to the CloudElton Stoneman
 
.NET Core: a new .NET Platform
.NET Core: a new .NET Platform.NET Core: a new .NET Platform
.NET Core: a new .NET PlatformAlex Thissen
 
Introduction to ServiceStack
Introduction to ServiceStackIntroduction to ServiceStack
Introduction to ServiceStackmobiweave
 
Return on Ignite 2019: Azure, .NET, A.I. & Data
Return on Ignite 2019: Azure, .NET, A.I. & DataReturn on Ignite 2019: Azure, .NET, A.I. & Data
Return on Ignite 2019: Azure, .NET, A.I. & DataMSDEVMTL
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideTim Burks
 

La actualidad más candente (20)

A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13A Kong retrospective: from 0.10 to 0.13
A Kong retrospective: from 0.10 to 0.13
 
gRPC & Kubernetes
gRPC & KubernetesgRPC & Kubernetes
gRPC & Kubernetes
 
Wcf Transaction Handling
Wcf Transaction HandlingWcf Transaction Handling
Wcf Transaction Handling
 
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformIntroducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
 
Docker pipelines
Docker pipelinesDocker pipelines
Docker pipelines
 
JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache CamelOpenSouthCode 2018 - Integrating your applications easily with Apache Camel
OpenSouthCode 2018 - Integrating your applications easily with Apache Camel
 
OSDC 2018 | Hardware-level data-center monitoring with Prometheus by Conrad H...
OSDC 2018 | Hardware-level data-center monitoring with Prometheus by Conrad H...OSDC 2018 | Hardware-level data-center monitoring with Prometheus by Conrad H...
OSDC 2018 | Hardware-level data-center monitoring with Prometheus by Conrad H...
 
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
 
Netflix conductor
Netflix conductorNetflix conductor
Netflix conductor
 
Oracle API Gateway Installation
Oracle API Gateway InstallationOracle API Gateway Installation
Oracle API Gateway Installation
 
Introduction to service stack
Introduction to service stackIntroduction to service stack
Introduction to service stack
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at Square
 
Docker Webinar: From Windows 2003 to the Cloud
Docker Webinar: From Windows 2003 to the CloudDocker Webinar: From Windows 2003 to the Cloud
Docker Webinar: From Windows 2003 to the Cloud
 
.NET Core: a new .NET Platform
.NET Core: a new .NET Platform.NET Core: a new .NET Platform
.NET Core: a new .NET Platform
 
Introduction to ServiceStack
Introduction to ServiceStackIntroduction to ServiceStack
Introduction to ServiceStack
 
Return on Ignite 2019: Azure, .NET, A.I. & Data
Return on Ignite 2019: Azure, .NET, A.I. & DataReturn on Ignite 2019: Azure, .NET, A.I. & Data
Return on Ignite 2019: Azure, .NET, A.I. & Data
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-Side
 

Similar a ASP.NET Core 3.0 Deep Dive

gRPC on .NET Core - NDC Sydney 2019
gRPC on .NET Core - NDC Sydney 2019gRPC on .NET Core - NDC Sydney 2019
gRPC on .NET Core - NDC Sydney 2019James Newton-King
 
gRPC on .NET Core - NDC Oslo 2020
gRPC on .NET Core - NDC Oslo 2020gRPC on .NET Core - NDC Oslo 2020
gRPC on .NET Core - NDC Oslo 2020James Newton-King
 
Collector Web Services
Collector Web ServicesCollector Web Services
Collector Web Servicespublisyst
 
Xamarin Form using ASP.NET Core SignalR client
Xamarin Form using ASP.NET Core SignalR clientXamarin Form using ASP.NET Core SignalR client
Xamarin Form using ASP.NET Core SignalR clientChen Yu Pao
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Deepak Gupta
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays
 
Deep Dive into SpaceONE
Deep Dive into SpaceONEDeep Dive into SpaceONE
Deep Dive into SpaceONEChoonho Son
 
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}Md. Sadhan Sarker
 
Driving containerd operations with gRPC
Driving containerd operations with gRPCDriving containerd operations with gRPC
Driving containerd operations with gRPCDocker, Inc.
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersoazabir
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersViktor Gamov
 
SignalR: Add real-time to your applications
SignalR: Add real-time to your applicationsSignalR: Add real-time to your applications
SignalR: Add real-time to your applicationsEugene Zharkov
 
Consuming GRIN GLOBAL Webservices
Consuming GRIN GLOBAL WebservicesConsuming GRIN GLOBAL Webservices
Consuming GRIN GLOBAL WebservicesEdwin Rojas
 
Qtp not just for gui anymore
Qtp   not just for gui anymoreQtp   not just for gui anymore
Qtp not just for gui anymorePragya Rastogi
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twistedsdsern
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsTim Burks
 

Similar a ASP.NET Core 3.0 Deep Dive (20)

gRPC on .NET Core - NDC Sydney 2019
gRPC on .NET Core - NDC Sydney 2019gRPC on .NET Core - NDC Sydney 2019
gRPC on .NET Core - NDC Sydney 2019
 
gRPC on .NET Core - NDC Oslo 2020
gRPC on .NET Core - NDC Oslo 2020gRPC on .NET Core - NDC Oslo 2020
gRPC on .NET Core - NDC Oslo 2020
 
Collector Web Services
Collector Web ServicesCollector Web Services
Collector Web Services
 
Xamarin Form using ASP.NET Core SignalR client
Xamarin Form using ASP.NET Core SignalR clientXamarin Form using ASP.NET Core SignalR client
Xamarin Form using ASP.NET Core SignalR client
 
Introduction to SignalR
Introduction to SignalRIntroduction to SignalR
Introduction to SignalR
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
 
XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)XML-RPC and SOAP (April 2003)
XML-RPC and SOAP (April 2003)
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
 
Deep Dive into SpaceONE
Deep Dive into SpaceONEDeep Dive into SpaceONE
Deep Dive into SpaceONE
 
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
 
World Wide Web(WWW)
World Wide Web(WWW)World Wide Web(WWW)
World Wide Web(WWW)
 
Driving containerd operations with gRPC
Driving containerd operations with gRPCDriving containerd operations with gRPC
Driving containerd operations with gRPC
 
Scaling asp.net websites to millions of users
Scaling asp.net websites to millions of usersScaling asp.net websites to millions of users
Scaling asp.net websites to millions of users
 
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java DevelopersWebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
WebSockets: The Current State of the Most Valuable HTML5 API for Java Developers
 
SignalR: Add real-time to your applications
SignalR: Add real-time to your applicationsSignalR: Add real-time to your applications
SignalR: Add real-time to your applications
 
Consuming GRIN GLOBAL Webservices
Consuming GRIN GLOBAL WebservicesConsuming GRIN GLOBAL Webservices
Consuming GRIN GLOBAL Webservices
 
Qtp not just for gui anymore
Qtp   not just for gui anymoreQtp   not just for gui anymore
Qtp not just for gui anymore
 
Servlet
ServletServlet
Servlet
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twisted
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
 

Más de Jon Galloway

Techorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverTechorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverJon Galloway
 
Whats New in ASP.NET Core
Whats New in ASP.NET CoreWhats New in ASP.NET Core
Whats New in ASP.NET CoreJon Galloway
 
.NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a...
.NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a....NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a...
.NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a...Jon Galloway
 
Keynote: Hijacking Boring Sounding Things Like Foundations and Maturity Model...
Keynote: Hijacking Boring Sounding Things Like Foundations and Maturity Model...Keynote: Hijacking Boring Sounding Things Like Foundations and Maturity Model...
Keynote: Hijacking Boring Sounding Things Like Foundations and Maturity Model...Jon Galloway
 
What's New in ASP.NET Core 2.0
What's New in ASP.NET Core 2.0What's New in ASP.NET Core 2.0
What's New in ASP.NET Core 2.0Jon Galloway
 
[NDC Oslo 2017] Open Source Software Foundations: Not Totally Boring, Actuall...
[NDC Oslo 2017] Open Source Software Foundations: Not Totally Boring, Actuall...[NDC Oslo 2017] Open Source Software Foundations: Not Totally Boring, Actuall...
[NDC Oslo 2017] Open Source Software Foundations: Not Totally Boring, Actuall...Jon Galloway
 
learning to love html and css
learning to love html and csslearning to love html and css
learning to love html and cssJon Galloway
 
Pragmatic JavaScript (DevConnections 2011)
Pragmatic JavaScript (DevConnections 2011)Pragmatic JavaScript (DevConnections 2011)
Pragmatic JavaScript (DevConnections 2011)Jon Galloway
 
SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4Jon Galloway
 
SoCal Code Camp 2011 - ASP.NET 4.5
SoCal Code Camp 2011 - ASP.NET 4.5SoCal Code Camp 2011 - ASP.NET 4.5
SoCal Code Camp 2011 - ASP.NET 4.5Jon Galloway
 

Más de Jon Galloway (10)

Techorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour MakeoverTechorama 2019 - ASP.NET Core One Hour Makeover
Techorama 2019 - ASP.NET Core One Hour Makeover
 
Whats New in ASP.NET Core
Whats New in ASP.NET CoreWhats New in ASP.NET Core
Whats New in ASP.NET Core
 
.NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a...
.NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a....NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a...
.NET Core Previews - New Features in .NET Core and ASP.NET Core 2.1, Blazor a...
 
Keynote: Hijacking Boring Sounding Things Like Foundations and Maturity Model...
Keynote: Hijacking Boring Sounding Things Like Foundations and Maturity Model...Keynote: Hijacking Boring Sounding Things Like Foundations and Maturity Model...
Keynote: Hijacking Boring Sounding Things Like Foundations and Maturity Model...
 
What's New in ASP.NET Core 2.0
What's New in ASP.NET Core 2.0What's New in ASP.NET Core 2.0
What's New in ASP.NET Core 2.0
 
[NDC Oslo 2017] Open Source Software Foundations: Not Totally Boring, Actuall...
[NDC Oslo 2017] Open Source Software Foundations: Not Totally Boring, Actuall...[NDC Oslo 2017] Open Source Software Foundations: Not Totally Boring, Actuall...
[NDC Oslo 2017] Open Source Software Foundations: Not Totally Boring, Actuall...
 
learning to love html and css
learning to love html and csslearning to love html and css
learning to love html and css
 
Pragmatic JavaScript (DevConnections 2011)
Pragmatic JavaScript (DevConnections 2011)Pragmatic JavaScript (DevConnections 2011)
Pragmatic JavaScript (DevConnections 2011)
 
SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4SoCal Code Camp 2011 - ASP.NET MVC 4
SoCal Code Camp 2011 - ASP.NET MVC 4
 
SoCal Code Camp 2011 - ASP.NET 4.5
SoCal Code Camp 2011 - ASP.NET 4.5SoCal Code Camp 2011 - ASP.NET 4.5
SoCal Code Camp 2011 - ASP.NET 4.5
 

Último

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Último (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

ASP.NET Core 3.0 Deep Dive

  • 1.
  • 6. C#
  • 8. How Blazor WebAssembly works https://... DOM Razor Components .NET WebAssembly
  • 9. Blazor on client or server https://... DOM Razor Components .NET WebAssembly https... DOM .NET Core SignalR Blazor WebAssembly Blazor Server Razor Components .NET .NET Core 3.0May 2020
  • 10. Blazor on client or server Blazor WebAssembly Blazor Server .NET Core 3.0May 2020
  • 12. Build your own pizza store UI with Blazor https://aka.ms/blazorworkshop
  • 13.
  • 14. https://www.telerik.com/blazor-ui “Telerik UI for Blazor components have been built from the ground-up to ensure you experience shorter development cycles, quick iterations and cut time to market” “DevExpress UI for Blazor ships with 12 UI components (including a Data Grid, Pivot Grid, Charts and Scheduler) so you can design rich user experiences for both Blazor server-side and Blazor client-side platforms.” https://www.devexpress.com/blazor “The Syncfusion ASP.NET Core Blazor Components library is the only suite that you will ever need to build an application, containing over 60 high-performance, lightweight, modular, and responsive UI controls in a single package.” https://www.syncfusion.com/blazor-components
  • 15.
  • 17. • Blazor: https://blazor.net • Docs: https://blazor.net/docs • .NET Core 3.0: https://dot.net/get-core3 • Visual Studio: https://visualstudio.com/ • Workshop: https://aka.ms/blazorworkshop • Community: https://aka.ms/awesomeblazor Try Blazor today!
  • 18.
  • 19. gRPC
  • 20. gRPC is… • Popular open source RPC framework • Largest RPC mindshare • Cloud Native Computing Foundation project • gRPC stands for gRPC Remote Procedure Calls • Built with modern technologies • HTTP/2 • Protocol Buffers • Designed for modern apps • High performance • Platform independent + =
  • 21. Protobuf (aka Protocol Buffers) • IDL (interface definition language) Describe once and generate interfaces for any language • Service model Service method and structure of the request and the response • Wire format Binary format for network transmission syntax = "proto3"; message SubscribeRequest { string topic = 1; } message Event { int32 id = 1; string details = 2; } service Topics { rpc Subscribe(SubscribeRequest) returns (stream Event); } 5052 4920 2a20 4854 5450 2f32 0d0a 534d 0d0a 0d0a 0000 0004 0000 0000 0401 0000 0000 0000
  • 22. Remote Procedure Calls vs HTTP APIs • Contract first (proto file) • Content first (URLs, HTTP method, JSON) • Contract is designed for humans • Hides remoting complexity • Content is designed for humans • Emphasises HTTP HTTP APIsRemote Procedure Calls Performance Developer productivity Widest audience Ease of getting started
  • 23. Demo! • Create gRPC service using template • Create gRPC client • Call service
  • 24. Grpc.Core Going deeper: gRPC on .NET Core 3.0 Grpc.Core Grpc.Core.Api Grpc.AspNetCore Grpc.Net.Client • HTTP/2 via Kestrel • Integrates with ASP.NET • HTTP/2 via HttpClient • DelegatingHandler
  • 25. Key features - Performance • Low network usage • HTTP/2 binary framing and header compression • Protobuf message serialization 0 100 200 300 400 500 600 700 800 1 2 10 20 Size(bytes) Serialized items JSON vs Protobuf Size Comparison JSON Protobuf syntax = "proto3"; package sample; message Test { string query = 1; int32 page_number = 2; int32 result_per_page = 3; repeated Ticker tickers = 4; } message Ticker { string name = 1; float value = 2; } { "query": "myQuery", "page_number": 42, "result_per_page": 100, "tickers": [ { "name": "rPs", "value": 9.768923 }, { "name": "WEo", "value": 6.067048 } ] } https://nilsmagnus.github.io/post/proto-json-sizes/ 5052 4920 2a20 4854 5450 2f32 0d0a 534d 0d0a 0d0a 0000 0004 0000 0000 0401 0000 0000 0000
  • 26. Key features - Performance • HTTP/2 multiplexing • Multiple calls via a TCP connection • Avoid head-of-line blocking*
  • 27. <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netcoreapp3.0</TargetFramework> <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> </PropertyGroup> <ItemGroup> <Protobuf Include="Topics.proto" GrpcServices="Server" /> <PackageReference Include="Google.Protobuf" Version="1.23.0" /> <PackageReference Include="Grpc.AspNetCore.Server" Version="2.23.2" /> <PackageReference Include="Grpc.Tools" Version="1.23.0" PrivateAssets="All" /> </ItemGroup> </Project> Key features - Code generation • All gRPC libraries have first-class code generation support syntax = "proto3"; message SubscribeRequest { string topic = 1; } message Event { string details = 1; } service Topics { rpc Subscribe(SubscribeRequest) returns (stream Event); } public abstract partial class TopicsBase { public virtual Task Subscribe( SubscribeRequest request, IServerStreamWriter<Event> responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } } public partial class TopicsClient : ClientBase<TopicsClient> { public TopicsClient(ChannelBase channel) : base(channel) { } public virtual AsyncServerStreamingCall<Event> Subscribe( SubscribeRequest request, CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Subscribe, options, request); } }
  • 28. Key features - Multiple languages
  • 29. Key features - Streaming • gRPC uses HTTP/2 to enable streaming
  • 30. Going deeper: gRPC and HTTP/2 requests POST /SayHello host: localhost content-type: application/json {"name":"world"} HEADERS frame DATA frame HTTP/1.1 HEADERS frame DATA frame HTTP/2 POST /greet.Greeter/SayHello host: localhost content-type: application/grpc 1: world
  • 31. Going deeper: gRPC and HTTP/2 responses 200 OK date: Mon, 18 Jul 2020 16:06:00 GMT server: Kestrel content-type: application/json {"message":"Hello world"} HEADERS frame DATA frame HEADERS frame HTTP/1.1 HEADERS frame DATA frame HTTP/2 200 OK date: Mon, 18 Jul 2020 16:06:00 GMT server: Kestrel content-type: application/grpc 1: Hello world grpc-status: Success
  • 32. Demo! • Update proto with server streaming call • Implement on server • Call from client
  • 33. Disadvantages – Limited browser support • Browsers have great HTTP/2 support  • Browser JavaScript APIs haven’t caught up  • gRPC-web provides limited support for calling gRPC services
  • 34. Disadvantages - Not human readable • HTTP/2 and Protobuf are binary protocols • Additional tools required to debug calls BloomRPC
  • 36. Automatic Reconnections Client-to-server & server-to- client streaming Used in Blazor Server-side Components Azure SignalR Service
  • 39. Server-sent events new EventSource(…) Message Event Client Server Message Event Message Event
  • 40. WebSockets upgrade: websocket Client Server messages HTTP/1.1 101 Switching Protocols 👍 🙂🙂
  • 44.
  • 45. API / SPA Auth

Notas del editor

  1. Today we’re going to show you how .NET can be used to build any type of app. We’re going to start with cloud development and microservices. <CLICK TO NEXT SLIDE>
  2. -There are alternative RPC frameworks, e.g. Thrift -Developer community is unifying behind gRPC -gRPC is run by CNCF. Microsoft contributing to CNCF -Does not stand for Google RPC -gRPC is not new, open sourced in 2015 -Union of two technologies, HTTP2 and Protocol Buffers -Designed for modern apps, particularly microservices
  3. Protocol Buffers serves three purposes: -Language independent definition of Protobuf messages. Written in proto file that can be shared between apps -Definition of services for use on server and client -Binary format of messages. Small and fast, but not human readable
  4. gRPC is an opination contract-first RPC framework HTTP APIs focus on the shape and content of HTTP (contract optional) proto files are designed for humans to write and read. Content is binary HTTP APIs are the opposite: content is human readable. Optional schema is rather verbose gRPC methods are designed to hide complexity of remoting Call them like you would a method, no creating HTTP messages or JSON content
  5. Create gRPC project in VS Talk through proto – messages, service, this is the contract Talk through service – generated file, F12, location, ILogger (DI) Launch. Browse to server Create client project – add packages, add proto Look at service references Update Program.cs
  6. Lets go a bit deeper into what has been added in .NET Core 3.0 Grpc.Core is the existing C# gRPC stack. First released 2015 .NET wrapper of a native implementation of gRPC and http2 Slow, large native dependencies New: Grpc.AspNetCore and Grpc.Net.Client - GrpcAspNetCore: uses Kestrel’s HTTP/2 support, integrates with ASP.NET - The new client uses HttpClient internally. Can use Delegating Handler outgoing middleware One of our goals has been portablity between Grpc.Core and grpc on .net core Split common API into its own package and reuse End result: existing gRPC services can use newer server and client Grpc.Core is not going away. Has features that new bits don’t, supports .NET Framework
  7. A key benefit of gRPC vs REST is small size of requests -HTTP/2 is binary compared to text based HTTP1 -HTTP/2 supports header compression. Commonly occurring headers, e.g. content-type, are compressed to a few bits per request -Protobuf is significantly smaller than JSON JSON is a self describing format – characters are included to differentiate objects/arrays/strings/numbers Protobuf requires the proto file to make sense of content Simple comparison between JSON and Protobuf Protobuf is 30% the size of JSON Difference reduces to 50% with gzip
  8. HTTP/2 multiplexing makes more efficient use of TCP connections Multiplexing improves on HTTP1.1 pipelining -Pipelining requires the order of requests and responses match -A large image or slow API call may prevent faster requests from completing HTTP/3 should improve this situation even more.
  9. Code generation is at the core of gRPC Code generation is driving by Protocol Buffer IDL Example -Simple server streaming call -csproj references proto file in ProtoBuf item -Grpc.Tools has targets to generate .NET types at design time -Server is a base type that requires implementation -Client is strongly typed, created with channel that specifies the server location Proto files can be shared between servers, and languages.
  10. gRPC is supported in every language -Common set of interop tests -gRPC on .NET Core is continuously tested against other implementations
  11. HTTP/2 has excellent streaming support gRPC uses HTTP/2 streaming to enable message streaming Unary. Like REST. Single request, single reply Server streaming is initiated with a request, returns a stream of responses. Example, subscribing to updates. Client streaming is the opposite: stream requests, finish with response. Example: uploading data Bi directional stream is streaming in both direction. Example: chat room gRPC streaming is a really easy way to create realtime services.
  12. Before demo streaming, lets look at what gRPC sends and receives HTTP/1.1 request: headers followed by optional body. Text based In HTTP/2 the request and response are each a stream of frames This request would be a HEADERS frame followed by DATA frame A text version of a basic gRPC request. gRPC still uses HTTP. Not like SOAP, no XML envelope to a single URL As you would expect headers, in the HEADERS frame Message in DATA frame
  13. A HTTP API response in HTTP/1.1 is the same: HTTP headers followed by a response body The mapping to HTTP/2 is also the same Now lets look at a gRPC response. 1. Headers are written to a HEADERS frame 2. The response message is written to DATA 3. What is grpc-status? It is sent after the body has started but it is not in the body/DATA frame. grpc-status is sent in another HEADERS frame. These are called trailing headers, or just trailers. Why grpc-status and HTTP status? The answer is streaming. Like you can have multiple header frames, you can have multiple data frames, each with there own message. Headers are sent with the first message returned, we need a status of the overall gRPC call, hence a status in the trailers
  14. Update server proto with new method Implement method on service Copy new method to client proto Call new method Restart server, run client Talk through what is going on using frames
  15. Wow, gRPC is great, lets throw REST and JSON away There are some drawbacks to gRPC -Modern browsers have great support for browsing HTTP/2 websites -But browser JavaScript APIs for making HTTP requests haven’t caught up -JavaScript’s XMLHttpRequest and fetch do not provide low level access to HTTP/2 frames -Not possible to build a gRPC client in the browser Workaround today is gRPC-web -Built by the gRPC team -Provides limited support for calling some gRPC services over HTTP1 -A server proxy then translates between gRPC-web calls and normal HTTP/2 gRPC -Does not support bi-directional streaming
  16. HTTP/2 and Protobuf are small and fast -But they’re not human readable -Binary, and properly reading a gRPC message requires the proto file Additional tools are required to debug gRPC calls -Here I am reading a gRPC TCP packet in Wireshark. It has some support for gRPC -It can recognize a gRPC packet from content-type headers -It can see that this is a response for a the SayHello method -gRPC message is still mostly binary There are workarounds. Most gRPC services use protobuf, but JSON can be used during development
  17. Open the demo project Show the HelloHub.cs class Show the index.cshtml page where the signalr scripts should be included Run npm install @Microsoft/signalr from within the wwwroot folder Call out that in 3.0 it moved to @microsoft npm org Add the HTML code to include the file, either after copying it to wwwroot/js or leave it where it is. HTML code is below. <script src="node_modules/@@microsoft/signalr/dist/browser/signalr.js"></script> Show the services.AddSignalR() call in startup.cs Show the endpoint-routed SignalR endpoint in startup.cs