I hereby claim:
- I am rofr on github.
- I am rofr (https://keybase.io/rofr) on keybase.
- I have a public key ASAWCZS4EE6xRnrKxwT2RO80c-wpEuIGVQBLJ07eL-NapAo
To claim this, I am signing this object:
//define actor node type | |
class Actor { | |
String Name; | |
Set<Role> Movies; | |
} | |
//define movie node type | |
class Movie { | |
String Name; | |
Set<Role> Roles; |
//user defined model with collections of user defined entities | |
class MyGraph { | |
Dictionary<Guid,Customer> Customers; | |
Dictionary<Guid,Order> Orders; | |
Dictionary<Guid,Product> Products; | |
} | |
class Order { | |
Customer Customer; | |
List<OrderLine> Lines; |
function funkyProduct(list, leftProduct = 1) { | |
if (list.length === 0) return [1]; | |
else { | |
var result = funkyProduct(list.slice(1), leftProduct * list[0]); | |
var rightProduct = result[0] * list[0]; | |
result[0] *= leftProduct; | |
if (leftProduct > 1) result.unshift(rightProduct); | |
return result; | |
} | |
} |
namespace Memstate.Benchmarks | |
{ | |
using System; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Columns; | |
using BenchmarkDotNet.Configs; |
I hereby claim:
To claim this, I am signing this object:
OrigoDB Server is an in-memory database for dotnet written in c#. It's implemented as a replicated state machine using write ahead logging of the mutating operations. The in-memory state model is derived from the sequence of operations persisted to the log. Writes are only accepted by the primary node and syncronously replicated to each of the replica nodes. OrigoDB has no leader election (because the effort would be massive), promotion to primary is a manual process. https://github.com/devrexlabs/origodb
Memstate is a reimplementation/port of OrigoDB based on the same principles but with a fundamentally different approach to logging. By routing the mutating operations (commands) through an underlying stream database (eventstore, kafka, kinesis, etc) message ordering, distribution and durability are guaranteed at the logging level. The key is to apply the commands when they return from the stream database. Using this model it's possible to accept writes at any node. This is the curren
namespace Memstate.JsonNet | |
{ | |
public class JsonObjectToIntegerConverter : JsonConverter | |
{ | |
public override bool CanWrite => false; | |
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | |
{ | |
//never called because CanWrite is false | |
throw new NotImplementedException(); |
public object Execute(Client<T> client, MethodCall methodCall, string signature) | |
{ | |
if (IsMapped && TryGetMappedOperation(methodCall, out var mappedOperation)) | |
{ | |
return ExecuteMapped(client, methodCall, mappedOperation); | |
} | |
return ExecuteImpl(client, methodCall, signature); | |
} |
###Devrex Labs Individual Contributor License Agreement | |
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Devrex Labs. This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Devrex Labs in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected]. | |
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions. | |
**Copyright License.** You hereby grant, and agree to grant, to Devrex Labs a non-exclusive, perpetual, irrevocable |
[Fact] | |
public void TryTake_returns_false_when_marked_for_completion() | |
{ | |
var blockingCollection = new BlockingCollection<int>(); | |
blockingCollection.CompleteAdding(); | |
var result = blockingCollection.TryTake(out var item); | |
Assert.False(result); | |
} |