Skip to content

Instantly share code, notes, and snippets.

View davidfowl's full-sized avatar

David Fowler davidfowl

View GitHub Profile
BEGIN TRANSACTION
-- Remove existing constraints on old table
ALTER TABLE [dbo].[ChatMessages] DROP CONSTRAINT [FK_ChatMessages_ChatRooms_Room_Key]
GO
ALTER TABLE [dbo].[ChatMessages] DROP CONSTRAINT [FK_ChatMessages_ChatUsers_User_Key]
GO
-- Create new table
SignalR.SqlMessageBus Information: 0 : Start installing SignalR SQL objects
SignalR.ScaleoutMessageBus Information: 0 : Stream(0) - Changed state from Initial to Buffering
SignalR.SqlMessageBus Information: 0 : Start installing SignalR SQL objects
SignalR.SqlMessageBus Information: 0 : Start installing SignalR SQL objects
SignalR.SqlMessageBus Information: 0 : Start installing SignalR SQL objects
SignalR.SqlMessageBus Information: 0 : SignalR SQL objects installed
SignalR.ScaleoutMessageBus Information: 0 : Stream(0) - Changed state from Buffering to Open
SignalR.SqlMessageBus Verbose: 0 : Stream 0 : Starting SQL notification listener
SignalR.SqlMessageBus Verbose: 0 : Stream 0 : SQL notification listener started
SignalR.SqlMessageBus Verbose: 0 : Stream 0 : No records received

Here is the output of some debug commands to help with analysis.

0:095> !heapstat
Heap             Gen0         Gen1         Gen2          LOH
Heap0       155817712     74473736     53146904      1564128
Heap1        61062208     75459328     50622408      2064936
Heap2        58532496     76780160     52072984      4327512
Heap3        65197400     77626552     48756976       655704
@davidfowl
davidfowl / razor.nancy.html
Last active December 16, 2015 02:19
Nancy issue?
Error Details
Error compiling template: Views/Home/index.cshtml
Errors:
[CS1001] Line: 15 Column: 11 - Identifier expected (show)
Details:
@davidfowl
davidfowl / redis.cs
Last active December 16, 2015 03:19
Blog post Beta 1.1
using System.Diagnostics;
using Microsoft.AspNet.SignalR;
namespace Microsoft.AspNet.SignalR.Samples
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
var config = new RedisScaleoutConfiguration("127.0.0.1", 6379, "", "MyApplication");
function addUser(name, room, active, owner) {
var user = {
name: name,
hash: null,
owner: owner,
active: active,
noteClass: '',
note: 'This is a note',
flagClass: '',
flag: 'bb',
@davidfowl
davidfowl / client.js
Last active December 19, 2015 04:49
Stress harness
/// <reference path="Scripts/jquery-1.6.4.min.js" />
/// <reference path="Scripts/jquery.signalR-1.1.2.js" />
$(function () {
var connection = $.hubConnection(),
hub = connection.createHubProxy('harness');
hub.on('update', function (data) {
console.log(data);
});
@davidfowl
davidfowl / bug.cs
Created July 2, 2013 04:36
Compiler bug with dynamic and interface inheritance
namespace CompilerBug
{
public interface IFoo : IBar
{
}
public interface IBar
{
void Bar(string name);
@davidfowl
davidfowl / typedhubs.cs
Last active December 21, 2015 00:19
Typed hubs?
public class StockTicker : Hub<IStockClient>
{
public async Task UpdatePrice(string message)
{
// All is typed as IStockClient. So is Group(), Client(), Caller etc.
await Clients.All.UpdateStockQuoteAsync("MSFT", 50.00);
}
}
public interface IStockClient
@davidfowl
davidfowl / Streaming.cs
Last active January 5, 2021 09:55
Awaitable tokens
public class Configuration(IAppBuilder app)
{
// TaskCompletionSource
app.Map("/streaming-api1", map =>
{
// Streaming API using SignalR
var connectionContext = GlobalHost.ConnectionManager.GetConnectionContext<RawConnection>();
map.Run(async context =>
{