Поговорим об относительно новой библиотеке, разработанной Дэвидом Фаулером и Дамьеном Эдвардсом, основной задачей которой является мгновенный обмен сообщениями в Web приложениях, написанных на платформе .Net
2. Содержание
1 Мгновенный обмен сообщениями
2 Немножко истории
3 Основные компоненты SignalR
Основные компоненты SignalR
4 Какие еще есть варианты?
5 Как SignalR работает?
6 Простой пример общего чата
7 Приватный чат за 10 мин
8 Заключение
3. Мгновенный обмен сообщениями
Система мгновенного обмена
сообщениями, Система обмена мгновенными
сообщениями (англ. Instant messaging, IM) —
службы мгновенных сообщений (Instant Messaging
Service, IMS) и программы-клиенты (Instant
Messenger, IM) для обмена сообщениями в
реальном времени черезИнтернет.
4. Немножко истории
David Fowler Demian Edwards
Originally from
David Fowler joined Australia, Damian
Microsoft as a Edwards is a senior
developer on the program manager on
ASP.NET team in
the ASP.NET team
2008. Before that he
where he looks after
did two internships at
the ASP.NET core and
Microsoft as a tester web forms. Before
and a developer. He's joining
originally from Microsoft, Damian
Barbados and went to was an ASP.NET
college in Florida.
MVP. He's a huge fan
of Javascript and
jQuery.
5. • 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
6. Основные компоненты SignalR
Templates
This is an example text. Go ahead
1 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
Templates your own text.
This is an example text. Go ahead and
This is an example text. Go ahead replace it with your own text.
2 and replace it with your own text.
Templates
This is an example text. Go ahead
3 and replace it with your own text.
7. Какие еще есть варианты?
Polling Long Polling Web Sockets
1 2 3
Плюсы: Плюсы по сравнению с Плюсы по сравнению с Long
— Просто Polling: Polling:
— Данные могут быть пожаты — Минимальное количество — Поднимается одно
Минусы: запросов соединение
— Очень много лишних — Высокая временная — Предельно высокая
запросов точность событий временная точность событий
— События всегда приходят с — Сервер хранит события — Управление сетевыми
опозданием только на время реконнекта сбоями контролирует браузер
— Серверу приходится Минусы по сравнению с Минусы по сравнению с
хранить события пока клиент Polling: Long Polling:
не заберет их или пока они не — Более сложная схема — HTTP не совместимый
устареют протокол, нужен свой
сервер, усложняется отладка
9. Templates
Your own sub headline
This is an example text. Go ahead and replace it
This is with your own text. tThis is an example text. Go
placeholder text. 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
This is with your own text. This is an example text. Go
placeholder text. 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
This is
ahead and replace it with your own text. This is
placeholder text. an example text. Go ahead and replace it with
your own text.
Your own footer Your Logo
10. Templates
Your own sub headline
•Template Text
Text for templates
-Example text
Text
•Template Text
Text for templates
-Example text
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
11. Templates
Your own sub headline
Templates
This is an example text. Go ahead and replace it with your own text. tThis is an example text. Go ahead
1
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
2 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
3 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
13. Templates
Your own sub headline
This is
placeholder text.
This is
placeholder text.
This is an example text. Go ahead and replace it with
This is your own text. tThis is an example text. Go ahead
placeholder text. 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
14. Templates
Your own sub headline
This is an example text. Go ahead and replace it with your own text. This is an example text.
1 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.
2 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.
3
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.
4
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.
5
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.
6
Go ahead and replace it with your own text
7 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
15. 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
16. Templates
Your own sub headline
This is This is
placeholder text. placeholder text.
This is This is
placeholder text. placeholder text.
This is This is
placeholder text. placeholder text.
Your own footer Your Logo
17. Templates
Your own sub headline
✓ 1 This is an example text. Go ahead and replace it
✓ 2 This is an example text. Go ahead and replace it
✓ 3 This is an example text. Go ahead and replace it
✓ 4 This is an example text. Go ahead and replace it
✓ 5 This is an example text. Go ahead and replace it
✓ 6 This is an example text. Go ahead and replace it
✓ 7 This is an example text. Go ahead and replace it
Your own footer Your Logo
18. Editable diagram – Venn diagram
1. This is an example text. Go ahead
and replace it with your own text.
Example 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.
Example Example
Your own footer Your Logo
19. Templates
Line chart
This is an
This is an example text
example
text. Go 6
ahead and
replace it
with your
own text.
5
4
1 2 3
200 200 200 200 200 201
5 6 7 8 9 0
Your own footer Your Logo
21. Templates
Pie diagram
Templates
text
This is an example text. Go
ahead and replace it with
text 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
Logo your own text.
text
Your own footer Your Logo