• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Redis + SignalR
 

Redis + SignalR

on

  • 4,344 views

 

Statistics

Views

Total Views
4,344
Views on SlideShare
3,445
Embed Views
899

Actions

Likes
3
Downloads
0
Comments
0

3 Embeds 899

http://shiba-yan.hatenablog.jp 884
https://twitter.com 13
http://webcache.googleusercontent.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Redis + SignalR Redis + SignalR Presentation Transcript

    • Redis + SignalR
    • About “shibayan”• しばやん (芝村 達郎)• @shibayan• ASP.NET/IIS MVP• http://shiba-yan.hatenablog.jp/
    • SignalR
    • SignalR + ASP.NET [HubName("chat")] public class ChatHub : Hub { public void SendMessage(string text) { Clients.ReceiveMessage(text); } } Endpoint: http://*****.cloudapp.net/signalr
    • SignalR + JavaScript var connection = $.hubConnection(); var chat = connection.createProxy("chat"); chat.on("ReceiveMessage", function(message) { $("#message").append("<li>" + message + "</li>"); }); connection.start(); $("#send").click(function () { var text = $("#text").text(); chat.invoke("SendMessage", text); });
    • SignalR + C#var connection = new HubConnection("http://localhost:12345/");var chat = connection.CreateProxy("chat");chat.On<string>("ReceiveMessage", message => MessageBox.Show(message));await connection.Start();// Button Clickedchat.Invoke("SendMessage", "text message");
    • SignalR + Scaling Pub/Sub MessagingInstance 0 Instance 1
    • Service Bus vs Redis• Price • Price • ¥0.88/10000 messages • ¥7.00/hour (Small, Preview)• Scalable • Scalable • Increase Topic Count • Increase VM Instance
    • Windows Azure VM
    • Azure VM + Redis> sudo yum install gcc> wget http://redis.googlecode.com/files/redis-2.4.17.tar.gz> tar xzf redis-2.4.17.tar.gz> cd redis-2.4.17> make> sudo make install> cd utils/> sudo ./install_server.sh
    • SignalR + Redisprotected void Application_Start(object sender, EventArgs e){ GlobalHost.DependencyResolver.UseRedis( "***.cloudapp.net", 6379, "", "SignalR.Redis.Sample" );}