Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 5,972 | Comments: 44,521

filter by tags archive

Reviewing SignalR–Part I


After reading this post from Scott Hanselman, I decided that I really want to take a look at SignalR.

There aren’t any docs beyond a few code snippets, so I created a new project and downloaded the nuget version, and started exploring the API in Object Browser. My intent was to write a small sample application to see how it works. But I run into a road block very rapidly:

image

Huh?!

Why on earth would it return dynamic for the list of clients. That seems highly suspicious design decision, and then I looked at this:

image

Hm… combine that with code snippets like this (from Scott’s post):

image

If it was someone else, I would put that receive call down to someone who doesn’t know/care about the design guidelines and just didn’t name the method right. But I assume that Scott does, so it is probably something else.

What seems to be happening here is that the Hub is indeed a very high level API, it allows you to directly invoke the JS API on the client. This is still unconfirmed as of yet, but it seems reasonable from the code I have so far, I intend to go deeper into the SignalR codebase and look for further details, look for a few posts on the topic.


Comments

Scott Hanselman

That's David Fowler and Damian Edwards' decisions, far be it from me to take credit for their good works.

But, yes, it's a high level API that lets you directly call client-side JavaScript from the server-side, based on both sides having the same method name. You could have called received "poo" and then clients.poo if you like. It's using unknown methods as a dispatching mechanism.

Adam

lol @ poo

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. Reducing parsing costs in RavenDB - 6 hours from now

There are posts all the way to Aug 04, 2015

RECENT SERIES

  1. Production postmortem (5):
    29 Jul 2015 - The evil licensing code
  2. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
  3. API Design (7):
    20 Jul 2015 - We’ll let the users sort it out
  4. What is new in RavenDB 3.5 (3):
    15 Jul 2015 - Exploring data in the dark
  5. The RavenDB Comic Strip (3):
    28 May 2015 - Part III – High availability & sleeping soundly
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats