Monthly Archive May 2018

ByMogens

Another neat little library: MongolianBarbecue

The process of building larger software projects holds many small opportunities for separating out small utilities and helper libraries, and one such opportunity has again arisen ūüôā

This time it’s a message queue implementation based on MongoDB: MongolianBarbecue (sounds a little bit like something with “mongo” and “queue”…. ūü§ď)

It’s of course not meant to be able to replace real message brokers and queueing systems, but if you’re in a tight spot, and all you have is MongoDB, then it might just save the day! ūü§†

Using it is easy ‚Äď you can configure it like this:

var config = new Config(
    connectionString: "mongodb://MONGOBONGO01/Readme", 
    collectionName: "messages"
);

and then you send a message to a queue named my-queue like this:

var producer = config.CreateProducer();

var payload = Encoding.UTF8.GetBytes("Hej med dig, min ven!");
var message = new Message(payload);

await producer.SendAsync("my-queue", message);

When it’s time to receive a message, you create a consumer for a specific queue like this:

var consumer = config.CreateConsumer("my-queue");

and then you get the next message like this:

var messageOrNull = await consumer.GetNextAsync();

// do stuff with the message if it's not null

MongolianBarbecue uses lease-based locking of messages, so it’s safe to use in any kind of distributed scenario you can come up with (e.g. like competing consumers). Moreover, it is pretty easy to use it to implement distributed locking, which can be used to implement exclusive access to a distributed resource.

Neat! ūüėé

ByMogens

Tababular update

This is just a tiny update about¬†the nifty little library that is Tababular, because I enjoy using it so much, and I think more people should be using it too ūüôā

The latest prerelease (3.0.0-b02) adds .NET Standard 2.0 as a target, and it has had a make-over making it appear more spacey, and therefore easier to decode visually:

+-------------+--------------+-------------+
| FirstColumn | SecondColumn | ThirdColumn |
+-------------+--------------+-------------+
| r1          | hej          | hej igen    |
+-------------+--------------+-------------+
| r2          | hej          | hej igen    |
+-------------+--------------+-------------+

Last but not least, it has had its reflection routines implemented using the brilliant FastMember library, thus making it easier on your CPU ūüėä

ByMogens

Fleet Manager 2 is out

So… we’ve been pretty busy here at Rebus FM, building the 2nd incarnation of our¬†Fleet Manager¬†product (which is actually the 5th or the 7th rewrite of the frontend, depending on how you count it… but who cares?!).

We celebrated Labour Day by working even harder, which means that it’s available now! We just call it Version 2, but if you have been using the old Fleet Manager, you can probably see that it looks a little different:

It has seen numerous improvements ‚Äď too many to mention, really ‚Äď so I suggest you go¬†check out some screenshots on the updated Fleet Manager page, or just go to¬†https://manager.rebus.fm¬†if you’re already a customer.