Real time web with SignalR

863 views
660 views

Published on

How to use SignalR in an event-driven architecture to close the write/read cycle.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
863
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
19
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Slide da mostrare prima di iniziare la sessione – non rimuovere!
  • Ultima slide, obbligatoria
  • Real time web with SignalR

    1. 1. WEB06 WEB IN REAL TIME CON ASP.NET SIGNALR #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    2. 2. Grazie a Sponsor #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    3. 3. Agenda • What / Why / When • Event-driven architecture and SignlaR • Scale-out SignalR • Performance tips #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    4. 4. About me Alessandro Melchiori Software architect @ codiceplastico @amelchiori http://melkio.blog.codiceplastico.com #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    5. 5. demo SignalR.Intro #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    6. 6. #CDays14 – Milano 25, 26 e 27 Febbraio 2014 Domain Model Service Layer Presentation Layer Da qui… Storage
    7. 7. Domain Model Service Layer Presentation Layer …a qui Write storage Read storage #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    8. 8. SignalR core architecture: pub/sub publisher message bus message cache client client client client client
    9. 9. Pattern 1. Server broadcast • Low rate broadcast of the same payload to all clients • One message bus send maps to many users (fan out) • More clients don’t increase message bus traffic
    10. 10. Pattern 2. Server push • Low rate broadcast of the unique payload to each client • One message bus send maps to one user (no fan out) • More clients means more message bus traffic
    11. 11. Pattern 3. User event driven • Broadcast on client actions • One message bus send maps to many users (fan out) • More clients means more message bus traffic
    12. 12. Pattern 4. High frequency real-time • Fixed high rate broadcast from servers and clients • One message bus send maps to one user (no fan out) • More clients means more message bus traffic
    13. 13. demo Event-driven architecture & SignalR #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    14. 14. Remember… Have your app do as little as possible. If you do nothing, you can scale infinitely. Scott Hanselman #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    15. 15. Scale-out issues: message delivery
    16. 16. Scale-out issues: client transience server 1 server 2
    17. 17. Scale-out issues: client distribution server 1 server 2
    18. 18. Scale-out SignalR • SQL Server, Redis & Windows Azure Service Bus • Great for the server broadcast load pattern • Limited for other scenarios  Every message goes to every server, so as traffic increases you’re limited by how fast any one web server can pull messages off of the backplane Backplanes are *much* slower than single-server performance
    19. 19. Scale-out provider architecture backplane web nodes clients
    20. 20. demo Scale-out SignalR #CDays14 – Milano 25, 26 e 27 Febbraio 2014
    21. 21. Q&A Tutto il materiale di questa sessione su http://www.communitydays.it/ Lascia il feedback su questa sessione, potrai essere estratto per i nostri premi! Seguici su Twitter @CommunityDaysIT Facebook http://facebook.com/cdaysit #CDays14 #CDays14 – Milano 25, 26 e 27 Febbraio 2014

    ×