Skip to content

Instantly share code, notes, and snippets.

View ReubenBond's full-sized avatar
🌞
building

Reuben Bond ReubenBond

🌞
building
View GitHub Profile
@ReubenBond
ReubenBond / Firewall.cs
Created June 22, 2015 23:40
Snippet to open firewall ports in Windows.
// NOTE: Add a COM reference to NetFwTypeLib
namespace Site.Setup
{
using System;
using System.Linq;
using NetFwTypeLib;
/// <summary>
@ReubenBond
ReubenBond / Program.cs
Created July 6, 2015 12:29
Orleans with client/server/interfaces/implementations in a single file. https://github.com/dotnet/orleans/pull/528
namespace RosleansSilo
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
using Orleans;
@ReubenBond
ReubenBond / SerializationCodeGenerator.cs
Created October 16, 2015 21:06
Orleans IL-based Serializer generator (WIP)
namespace Orleans.CodeGeneration
{
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.Serialization;
@ReubenBond
ReubenBond / Program.cs
Created October 16, 2015 22:02
TestAzureSilo
namespace TestAzureSilo
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Net;
using Orleans;
using Orleans.Runtime;
@ReubenBond
ReubenBond / ObjectTask.cs
Created November 5, 2015 00:06
ObjectTask: movified version of ValueTask for use in generated dispatchers
public struct ObjectTask : IEquatable<ObjectTask>
{
private static object GetResult<TResult>(Task typedTask)
{
return ((Task<TResult>)typedTask).GetAwaiter().GetResult();
}
private static object GetResult(Task untypedTask)
{
untypedTask?.GetAwaiter().GetResult();
@ReubenBond
ReubenBond / OrleansJsonSerialization.cs
Created November 6, 2015 06:34
Orleans JSON (JObject, etc) Serialization
/// <summary>
/// Provides support for serializing JSON values.
/// </summary>
[RegisterSerializer]
public class OrleansJsonSerialization
{
/// <summary>
/// Initializes static members of the <see cref="OrleansJsonSerialization"/> class.
/// </summary>
static OrleansJsonSerialization()
@ReubenBond
ReubenBond / Program.cs
Last active December 22, 2016 21:37
Perf test for comparing await vs. ContinueWith in Orleans GrainMethodInvokers
using System;
using System.Threading.Tasks;
namespace AwaitVersusContinueWith
{
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using BenchmarkDotNet;
@ReubenBond
ReubenBond / OrleansWishList.md
Last active January 19, 2016 09:00
Orleans Roadmap Episode 1: Wish List

Orleans Roadmap Episode 1: Wish List

Documentation Overhaul

Our documentation is relatively poor. We need to make things much more approachable for newcomers & experienced users alike. Beefing up the documentation will be a big effort which will pay dividends. It wouldn't hurt to spice things up with some illustrations/graphics, either.

Event Sourcing

There has been much discussion about this and it is clearly something which many are interested in. See #343.

Geo-distributed clusters/grains

Having a planet-scale service is very desireable, but there are many considerations and potential issues regarding performance, availability, and consistency (oh, right, CAP...).

@ReubenBond
ReubenBond / GuidJsonConverter.cs
Created January 7, 2016 10:25
Guid Json Converter for Orleans / Json.NET
using System;
using Newtonsoft.Json;
namespace ServiceCommon.Utilities.Serialization
{
/// <summary>
/// JSON converter for <see cref="Guid"/>.
/// </summary>
public class GuidJsonConverter : JsonConverter
{