23
мощные возможности реального времени в .Net SignalR Керимханов Радислав [email protected]

SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Embed Size (px)

DESCRIPTION

Поговорим об относительно новой библиотеке, разработанной Дэвидом Фаулером и Дамьеном Эдвардсом, основной задачей которой является мгновенный обмен сообщениями в Web приложениях, написанных на платформе .Net

Citation preview

Page 1: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

мощные возможности реального времени в .Net

SignalR

Керимханов Радислав [email protected]

Page 2: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Содержание

Мгновенный обмен сообщениями

Заключение

Основные компоненты SignalR

Простой пример общего чата

Немножко истории

Как SignalR работает?

Приватный чат за 10 мин

8

7

6

5

3

2

1

Основные компоненты SignalR

4 Какие еще есть варианты?

Page 3: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Мгновенный обмен сообщениями

Система мгновенного обмена сообщениями, Система обмена мгновенными сообщениями (англ. Instant messaging, IM) — службы мгновенных сообщений (Instant Messaging Service, IMS) и программы-клиенты (Instant Messenger, IM) для обмена сообщениями в реальном времени черезИнтернет.

Page 4: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Немножко истории

Demian EdwardsDavid Fowler

David Fowler joined Microsoft as a developer on the ASP.NET team in 2008. Before that he did two internships at Microsoft as a tester and a developer. He's originally from Barbados and went to college in Florida.

Originally from Australia, Damian Edwards is a senior program manager on the ASP.NET team where he looks after the ASP.NET core and web forms. Before joining Microsoft, Damian was an ASP.NET MVP. He's a huge fan of Javascript and jQuery.

Page 5: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

• JabbR - Real time chat application [SignalR + PNotify = Real Time Push Notifications] POC (Link)• Umbraco Now - realtime activity map of community activity• LoggR - Real time web app monitoring• WorkFu - Opportunities that find you (how WorkFu was built)• HushFlow - Private discussion board for teams• HurricaneJs - HTML5/SignalR/.NET game server and engine.• Lege.no - Chat with doctor online (Norwegian)• Compilify.net - Compile and execute .NET from your web browser.• ElmahR - ElmahR = ELMAH + SignalR, real time error notification dashboard.• NodeAssets - Asset management solution that uses SignalR to push css updates as you are changing it• DIWICON AURA - Indoor positioning system with panic messages.• Adopt Him - Romantic social network built around SignalR. Real time user interactions and chat. Finding love has never

been so instant.• Fixposit - Allows groups of users to share their location with eachother in real time on a google map.• Postworthy - Real time content curation tool. (source code)• LiveTiming/TimeService - Real time racetrack monitor for some BeNeLux racetracks, including TT Assen SuperBike track• bromelard - Offers a unique platform for global online sharing of geographical listings• ShootR - Multiplayer space shooter game (work in progress).• InspectB.in - Test remote http clients and webhooks. Point to your InspectBin url and start inspecting.• SRChat - A chat application using SignalR ## SignalR Clients• SignalR-ObjC - An iOS/Mac SignalR Client

Page 6: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Основные компоненты SignalR

This is an example text. Go ahead and replace it with your own text.

Templates

This is an example text. Go ahead and replace it with your own text.

Templates

3This is an example text. Go ahead and replace it with your own text.

Templates

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

2

1

Page 7: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Какие еще есть варианты?

Плюсы по сравнению с Polling:— Минимальное количество запросов— Высокая временная точность событий— Сервер хранит события только на время реконнектаМинусы по сравнению с Polling:— Более сложная схема

Long PollingPolling

Плюсы по сравнению с Long Polling:— Поднимается одно соединение— Предельно высокая временная точность событий— Управление сетевыми сбоями контролирует браузерМинусы по сравнению с Long Polling:— HTTP не совместимый протокол, нужен свой сервер, усложняется отладка

Web Sockets

Плюсы:— Просто— Данные могут быть пожатыМинусы:— Очень много лишних запросов— События всегда приходят с опозданием— Серверу приходится хранить события пока клиент не заберет их или пока они не устареют

321

Page 8: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Как SignalR работает

Page 9: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own footer Your Logo

This is an example text. Go ahead and replace it with your own text. tThis is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

This is an example text. Go ahead and replace it with your own text. tThis is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

Your own sub headlineTemplates

This is placeholder text.

This is placeholder text.

This is placeholder text.

Page 10: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own footer Your Logo

Your own sub headlineTemplates

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

• Template TextText for templates

-Example text Text

• Template TextText for templates

-Example text text

Page 11: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own sub headlineTemplates

Your own footer Your Logo

This is an example text. Go ahead and replace it with your own text. tThis is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

Templates

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

Templates

This is an example text. Go ahead and replace it with your own text. tThis is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

Templates

1

2

3

Page 12: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own footer Your Logo

Page 13: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own footer Your Logo

Your own sub headlineTemplates

This is an example text. Go ahead and replace it with your own text. tThis is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

This is placeholder text.

This is placeholder text.

This is placeholder text.

Page 14: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text

Your own footer Your Logo

Your own sub headlineTemplates

1

2

3

4

5

6

7

Page 15: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own footer Your Logo

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

Page 16: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own footer Your Logo

Your own sub headlineTemplates

This is placeholder text.

This is placeholder text.

This is placeholder text.

This is placeholder text.

This is placeholder text.

This is placeholder text.

Page 17: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own sub headlineTemplates

Your own footer Your Logo

This is an example text. Go ahead and replace it

This is an example text. Go ahead and replace it

This is an example text. Go ahead and replace it

This is an example text. Go ahead and replace it

This is an example text. Go ahead and replace it

This is an example text. Go ahead and replace it

This is an example text. Go ahead and replace it✓

1

2

3

4

5

6

7

Page 18: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

1. This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

2. This is an example text. Go ahead and replace it with your own text.

3. This is an example text. Go ahead and replace it with your own text.

Your own footer Your Logo

Editable diagram – Venn diagram

Example

ExampleExample

Page 19: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own footer Your Logo

TemplatesLine chart

2010

200920082007

20062005

3

5

1 24

6

This is an example text. Go ahead and replace it with your own text.

Th

is is

an

exa

mp

le t

ext

Text

Page 20: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

TemplatesProgress chart – Upward arrow

Your own footer Your Logo

Example

Example

Example

Page 21: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Templates

This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text. This is an example text. Go ahead and replace it with your own text.

Your own footer Your Logo

Templates Pie diagram

text

Logo

text

text

Page 22: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

Your own footer Your Logo

Arrow ProcessYour own subheadline

Text Text Text

Page 23: SIGNALR - ОБМЕН СООБЩЕНИЯМИ В РЕАЛЬНОМ ВРЕМЕНИ

THANK YOU!