Skip to content

Instantly share code, notes, and snippets.

🌞
building

Reuben Bond ReubenBond

🌞
building
View GitHub Profile
@ReubenBond
ReubenBond / ILFieldBuilder.cs
Created Oct 12, 2016
Generating static fields on the fly in C# (for use in other codegen)
View ILFieldBuilder.cs
using System;
using System.Collections.Concurrent;
using System.Reflection;
using System.Reflection.Emit;
internal class ILFieldBuilder
{
private static readonly AssemblyBuilder AssemblyBuilder =
AssemblyBuilder.DefineDynamicAssembly(
new AssemblyName(nameof(ILFieldBuilder)),
@ReubenBond
ReubenBond / GuidJsonConverter.cs
Created Jan 7, 2016
Guid Json Converter for Orleans / Json.NET
View GuidJsonConverter.cs
using System;
using Newtonsoft.Json;
namespace ServiceCommon.Utilities.Serialization
{
/// <summary>
/// JSON converter for <see cref="Guid"/>.
/// </summary>
public class GuidJsonConverter : JsonConverter
{
@ReubenBond
ReubenBond / OrleansWishList.md
Last active Jan 19, 2016
Orleans Roadmap Episode 1: Wish List
View OrleansWishList.md

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 / Program.cs
Last active Dec 22, 2016
Perf test for comparing await vs. ContinueWith in Orleans GrainMethodInvokers
View Program.cs
using System;
using System.Threading.Tasks;
namespace AwaitVersusContinueWith
{
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using BenchmarkDotNet;
@ReubenBond
ReubenBond / OrleansJsonSerialization.cs
Created Nov 6, 2015
Orleans JSON (JObject, etc) Serialization
View OrleansJsonSerialization.cs
/// <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 / ObjectTask.cs
Created Nov 5, 2015
ObjectTask: movified version of ValueTask for use in generated dispatchers
View ObjectTask.cs
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();
View Program.cs
namespace TestAzureSilo
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Net;
using Orleans;
using Orleans.Runtime;
@ReubenBond
ReubenBond / SerializationCodeGenerator.cs
Created Oct 16, 2015
Orleans IL-based Serializer generator (WIP)
View SerializationCodeGenerator.cs
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 Jul 6, 2015
Orleans with client/server/interfaces/implementations in a single file. https://github.com/dotnet/orleans/pull/528
View Program.cs
namespace RosleansSilo
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
using Orleans;
You can’t perform that action at this time.