Skip to content

Instantly share code, notes, and snippets.

View etishor's full-sized avatar

Iulian Margarintescu etishor

View GitHub Profile
@etishor
etishor / UowDispatchMessageInspector.cs
Created March 22, 2011 15:02
Sample WCF message inspector to hook up nhibernate session binding/unbinding from the WcfOperationSessionContext
// this code was simplified for the purpose of beeing a sample
public class UowDispatchMessageInspector : IDispatchMessageInspector
{
private readonly ISessionFactory factory;
public UowDispatchMessageInspector(ISessionFactory factory)
{
this.factory = factory;
}
@etishor
etishor / UserWorkItemIndex.cs
Created November 6, 2012 10:50
Definition of a user work item index using multi map reduce
public class UserWorkItemIndex : AbstractMultiMapIndexCreationTask<UserWorkItemIndex.Result>
{
public class Result
{
public string UserId { get; set; }
public string DocumentId { get; set; }
public int Validated { get; set; }
public int Total { get; set; }
public string FieldId { get; set; }
@etishor
etishor / gist:4031390
Created November 7, 2012 12:40
Multi map reduce index
using System;
using System.Linq;
using Raven.Client;
using Raven.Client.Document;
using Raven.Client.Indexes;
namespace RavenTest
{
public class ExtractionUser
{
public string Id { get; set; }
@etishor
etishor / gist:4051366
Created November 10, 2012 15:12
Map reduce index
public class User
{
public string Id { get; set; }
public string[] AssignedFields { get; set; }
}
public class WorkItem
{
public string DocumentId { get; set; }
public string FieldId { get; set; }
/***************************************************************************
* Copyright (C) 2005 by Iulian M *
* eti@erata.net *
***************************************************************************/
#ifndef ETKSYNCHTTP_H
#define ETKSYNCHTTP_H
#include <QHttp>
#include <QEventLoop>
#include <QBuffer>
--- libexec/rtld-elf/rtld.c.orig Fri Sep 24 08:04:52 2004
+++ libexec/rtld-elf/rtld.c Sun Oct 17 03:37:44 2004
@@ -129,6 +129,7 @@
static void unref_dag(Obj_Entry *);
static void ref_dag(Obj_Entry *);
+void *_dlsym(void *, const char *);
void r_debug_state(struct r_debug*, struct link_map*);
/*
using System;
using Nancy;
using Nancy.Hosting.Self;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{

Keybase proof

I hereby claim:

  • I am etishor on github.
  • I am eti (https://keybase.io/eti) on keybase.
  • I have a public key whose fingerprint is 2223 A517 7F02 2E18 7878 C84A 7E3C FE47 A1A0 BBE8

To claim this, I am signing this object:

@etishor
etishor / gist:51a863cf588ceb483039
Created February 5, 2015 20:12
Comments to sam's talk
[describe better] What were you building?
Delivery guarantees for messages?
Messaging infrastructure?
Perf cost of adding messaging or http or whatever
Gains? Why move to micro services?
Where is the differences from classic SOA?
How do you gather business metrics?
metrics apply to other archs not just micro services
SOA service vs MicroService [single responsibility vs bounded context]
You might want to make it clearer why micro services are better or what are they better for
@etishor
etishor / gist:cd4f8019432bca2757b9
Created April 27, 2015 21:14
Concurrency Utilities 0.1.4 bench results
NoOp 1 threads 398,837,600 ops/sec | avg duration 3 ns | 398,837,600 avg ops/sec per thread
NoOp 2 threads 757,889,000 ops/sec | avg duration 3 ns | 378,944,500 avg ops/sec per thread
NoOp 4 threads 1,495,783,200 ops/sec | avg duration 3 ns | 373,945,800 avg ops/sec per thread
NoOp 6 threads 1,984,404,200 ops/sec | avg duration 3 ns | 330,734,033 avg ops/sec per thread
NoOp 8 threads 2,286,649,800 ops/sec | avg duration 4 ns | 285,831,225 avg ops/sec per thread
NoOp 16 threads 2,476,672,200 ops/sec | avg duration 9 ns | 154,792,012 avg ops/sec per thread
NoOp 32 threads 2,541,943,000 ops/sec | avg duration 20 ns | 79,435,719 avg ops/sec per thread
AtomicLong.Increment 1 threads 119,079,800 ops/sec | avg duration 8 ns | 119,079,800 avg ops/sec per thread
AtomicLong.Increment 2 threads 45,976,800 ops/sec | avg duration 44 ns | 22,988,400 avg ops/sec per thread
AtomicLong.Increment 4 threads 49,518,800 ops/sec |