Skip to content

Instantly share code, notes, and snippets.

Avatar
🌞
building

Reuben Bond ReubenBond

🌞
building
View GitHub Profile
View OrleansListDynamic.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Orleans.CodeGenerator.MSBuild" Version="2.1.0">
@ReubenBond
ReubenBond / Program.cs
Created Sep 19, 2018
CoreCLR TieredCompilation JIT bug
View Program.cs
using System;
namespace TierJit
{
class Program
{
static void Main(string[] args)
{
var array = new byte[] {0x00, 0x01};
var reader = new BinaryTokenStreamReader(array);
@ReubenBond
ReubenBond / BlockingCollection_ConcurrentBag_Issue.cs
Last active Jul 2, 2018
Demonstrates an InvalidOperationException when using BlockingCollection with ConcurrentBag as the underlying collection and calling TryTakeFromAny
View BlockingCollection_ConcurrentBag_Issue.cs
using System;
using System.Collections.Concurrent;
using System.Threading;
namespace BlockingCollectionConcurrentBagException
{
class Program
{
static void Main(string[] args)
{
@ReubenBond
ReubenBond / veh_hook.cpp
Created Dec 19, 2017
INT3 Vectored Exception Handler hooking
View veh_hook.cpp
/**
veh_hook Vectored Exception Handler hooking library
Version: 24-March-2008
**/
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
#include <windows.h>
#include "veh_hook.h"
static veh_list_t* list = NULL;
View gist:e848251feed5f6ac62a78032d287478f
### Keybase proof
I hereby claim:
* I am reubenbond on github.
* I am reubenbond (https://keybase.io/reubenbond) on keybase.
* I have a public key ASCrV546-58t4XtSgwI9FTTzWNy2FpBV7scVBX7Qsdkq_Qo
To claim this, I am signing this object:
@ReubenBond
ReubenBond / VersionTolerantSerializer.md
Last active Nov 26, 2017
Proposal for a Version-Tolerant Serializer
View VersionTolerantSerializer.md

Proposal for a Version-Tolerant Serializer

Orleans allows developers to send arbitrary, complex objects between remote processes with little or no prior knowledge of what those object might be. This flexibility & ease-of-use has been key to the success of Orleans, and it's certainly one of our strengths. Ideally, we want to stay out of the way of developers and let them be free to model their applications as they see fit.

Developers build applications with lifetimes ranging in the years and over that time these applications need to evolve. This often means evolving the kinds of objects which are sent between processes or stored and retrieved. One of Orleans' weaknesses is its currently poor support for this kind of evolution. Recently, we've implemented version tolerance for communication interfaces, but we still do not support evolution for object schemas.

Existing serialization libraries which support version tolerance tend to restrict how data is modelled, usually by providing a very restricted type sy

@ReubenBond
ReubenBond / notes.md
Created May 8, 2017
version tolerant serialization notes
View notes.md
  • Want a serialization library which:
    • Supports schema evolution (version tolerant)
    • Is suitable for persistence
    • Suports the rich type system of .NET (cyclic references, generics, polymorphism, referential equality)
    • Is fast and compact
    • Requires minimal effort to use
    • Supports safe/stable serialization of types which the user does not have control over and therefore cannot alter (eg, via surrogates)
    • Has a documented wire format
    • Supports serialization/deserialization context, so that we can deserialize GrainReferences using it and have them still have seamless access to the runtime.
  • Core concepts:
View Benchmarks.md
|       Method |                           Kind | Items |              Mean |          StdDev |            Median |     Gen 0 | Allocated |
|------------- |------------------------------- |------ |------------------ |---------------- |------------------ |---------- |---------- |
|        Write | CachedReadConcurrentDictionary |  1000 |   225,437.8898 ns |   2,301.2916 ns |   224,307.7639 ns |   19.9219 | 125.19 kB |
| RandomAccess | CachedReadConcurrentDictionary |  1000 |        38.1510 ns |       0.3593 ns |        38.1710 ns |         - |       0 B |
|      ForEach | CachedReadConcurrentDictionary |  1000 |    12,751.5773 ns |     581.2744 ns |    12,767.5491 ns |         - |      48 B |
|    WriteRead | CachedReadConcurrentDictionary |  1000 |        78.9771 ns |       0.9068 ns |        79.0207 ns |         - |       0 B |
|        Write |           ConcurrentDictionary |  1000 |   220,681.6271 ns |   3,044.1570 ns |   220,026.7558 ns |   19.9219 |  125.2 kB |
| RandomAccess |           ConcurrentDic
@ReubenBond
ReubenBond / ServiceFabricPropertyManagerMembershipProvider.cs
Created Dec 22, 2016
PropertyManager-based Cluster Membership provider for Service Fabric integration in Microsoft Orleans
View ServiceFabricPropertyManagerMembershipProvider.cs
namespace Microsoft.Orleans.ServiceFabric
{
using System;
using System.Collections.Generic;
using System.Fabric;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
View ObserverManager.cs
namespace ServiceCommon.Utilities
{
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Orleans.Runtime;