Host SignalR along with NancyFX inside console application

1,177 views
Skip to first unread message

Daniel Lang

unread,
Feb 1, 2012, 9:14:00 PM2/1/12
to net-http-a...@googlegroups.com
Hi,

I want to host a single web-page with async updates enabled in a console application. I'd like to use Signalr, NancyFX and an OWIN host like Gate or Kayak if necessary at all (alternative is self-hosted).
I've seen that David has done some work to decouple SignalR from AspNet, so I hope this combination is possible. However, I have practically no experience with any of these technologies, so I wonder if I'm on the correct path at all.

This is my context:
I have a long running operation (data-syncing in fact) that runs either inside a console application or as a windows service. The operation produces a lot of log messages. At the moment, I have a self-hosted WCF service with a duplex contract, so that I can push the messages to the clients (stupid simple WPF-applications just to show the messages as they arrive) in an async fashion. My goal is to simply deployment by killing the client applications and replacing them with a very simple one-page web application that is hostes by the 'server' itself on port 8080 or so. IIS is not an option, because it would complicate deployment and require our customers to have IIS installed on their machines.

Is this possible?

Cheers, Daniel

Demis Bellot

unread,
Feb 7, 2012, 7:04:34 PM2/7/12
to net-http-a...@googlegroups.com
In the SignalR release notes Damian says its now decoupled from its ASP.NET host:

  • Decoupled from ASP.NET, can now host on other servers, e.g. OWIN, HttpListener, etc.

Although the best place to ask is in jabbr.net (its very active) where @dfowler for SignalR and @TheCodeJunkie or @GrumpyDev for NancyFx

Although Andreas (TheCodeJunkie) is on this list so maybe able to help when he wakes up :)

D

Grumpydev

unread,
Feb 8, 2012, 3:27:47 AM2/8/12
to net-http-a...@googlegroups.com
This is something I'd like to spike out, but currently haven't got the time. In my head I was seeing part of the url space being reserved for signalr and nancy handling the rest.

I don't think it would be massively complicated.. in theory ;)

Louis DeJardin

unread,
Feb 8, 2012, 9:58:16 PM2/8/12
to Grumpydev, net-http-a...@googlegroups.com
That would be a great sample. The .Map(...) middleware should do exactly that, too - sending everything with a path prefix to SignalR, with the rest flowing along normally.

--
Louis - sent from mobile

From: Grumpydev
Sent: 2/8/2012 12:27 AM
To: net-http-a...@googlegroups.com
Subject: Re: Host SignalR along with NancyFX inside console application

James Sconfitto

unread,
Apr 27, 2012, 9:17:52 AM4/27/12
to net-http-a...@googlegroups.com, Grumpydev
i worked up a sample of this in order to try to learn how Owin and SignalR work. Right now it's built into my fork of the SignalR project. It seems flaky and slow to me (but i dont understand the pieces very well), but for the most part it's working. Anyone have any input or suggestions on improvements? It's up here in my NancyDemo branch: https://github.com/jugglingnutcase/SignalR/tree/NancyDemo

i've tried to pull it out into a standalone demo, but every time i tried that i would get confused between what's in NuGet and the latest development versions of SignalR and it made learning the whole thing a lot tougher.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages