I’ve been using Rhino Service Bus in some projects and needed a way to bridge it with synchronous WCF calls. Here’s the code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rhino.ServiceBus.Sagas;
using Rhino.ServiceBus;
using System.Threading;
using Rhino.ServiceBus.Internal;
namespace Rhino.ServiceBus
{
public static class ReplyExtension
{
class ESBResult<R> : OccasionalConsumerOf<R>, IDisposable
{
ManualResetEvent waithandle;
IServiceBus bus;
IDisposable subscription;
TimeSpan patience;
public ESBResult(IServiceBus bus, ISagaMessage message, TimeSpan patience)
{
this.bus = bus;
this.patience = patience;
waithandle = new ManualResetEvent(false);
subscription = bus.AddInstanceSubscription(this);
bus.Send(message);
}
public ESBResult(IServiceBus bus, ISagaMessage message)
: this(bus, message, TimeSpan.FromSeconds(5))
{
}
public R Reply
{
get
{
waithandle.WaitOne(patience);
return m_Reply;
}
}
#region ConsumerOf<R> Members
R m_Reply = default(R);
public void Consume(R message)
{
m_Reply = message;
waithandle.Set();
}
#endregion
#region IDisposable Members
public void Dispose()
{
var b = bus;
subscription.Dispose();
}
#endregion
}
public static R SendAndWaitForReply<R>(this IServiceBus bus, ISagaMessage message)
{
using (var result = new ESBResult<R>(bus, message))
return result.Reply;
}
}
}
44efc8d9-038d-4b1c-afa2-6b25f47dc5ac|0|.0
The performance index isn’t bad at all.

78d047bf-02d6-421e-b5ad-3c29b4fee5ff|0|.0
I think a screenshot is in place.

b08885aa-5bba-4b83-8859-c9211f3817bb|0|.0

Han kan vær travel, men vett i alle fall koss en skikkelige middagskvil ska vær.
9bb6110d-9207-41ff-8935-0c781df2841a|0|.0
91 Ord Speedtest
7cc1eca8-caaa-4fd5-b2fa-e12c3a99251e|0|.0
87 Ord Speed test
cb4c76ef-fcf2-4e8a-89b8-d42274408c72|0|.0
I felt the need to contribute somewhere in the open source department. My first move was to start a provider for Euss enabling support for using SimpleDB as storage. Store your objects in the cloud! It’s buggy and the query language is only partially implemented. But anyway. It does work.
It has the immensely creative name “SimpleDB for Euss”. You can find the source and upcoming releases on codeplex.
0603f323-bd7e-4977-aaf7-68804ae9f6b7|0|.0
Det uunngåelige skjedde igjen. Et nytt år har kommet. Bilder fra forberedelsene kan du se hos Frøken Aadalen
fd59fe8c-ed82-4d4a-9c30-1314971c76a9|1|5.0
Long time no blog. Amazon recently announced Windows support in EC2. I had to check it out. The pricing isn't bad and the largest instance types really does the job.
4 cores 3 GHz each and 15 GB of RAM isn't the everyday workstation:

e7c68fe1-109b-41e0-8908-6f0b3e7fd31a|0|.0
My HP 8510w has got it self a new disk. Not any disk!
The new WD Scorpio Black Edition 320GB, 7200RPM, 16MB Cache.
It's blazingly fast and my Vista experience index now looks like this:
The labels are in Norwegian. My hdd has an experience index of 5.8, on a laptop. I'm happy for now.
f7bde2a6-926c-4d5d-bb1f-d3515d975dce|1|5.0