Elegant Architecture

Architecture, Functional Languages, Style

Odin Prototype

In my previous post, I described a distributed monitoring system called Odin. Which I am building because it will help me learn and explore topics in distributed computing independent of work.

I’ve been slowly working on it when I get a chance and have put together a very basic prototype: https://github.com/erichgess/OdinPrototype

This prototype is some hacking I did over a few, very spread out days, to try out some concepts. It has a very simple agent, which reads %CPU used and sends a message to a receiver. That receiver this publishes that message as an IObservable. Multiple mailbox processors subscribe to the Observable and use Reactive to do some queries on the incoming messages.

This is very very little. However, it served as a way for me to try out a few different concepts: RabbitMQ, Mailbox Processors, and Reactive.

Odin - Learning Distributed Computing

Over the last two years, I’ve really become interested in distributed computing and things like big data. My interest in these topics grew in coincidence with my falling in love with F#. I do a lot of different projects at work and not all of them involve any of those three topics. So, to provide a motive for learning more about distributed computing and sharpening my F# skills I have decided to start working on a small side project (currently, by myself but several friends are interested). This is called Odin, inspired by the Riemann project, it’s a distributed monitoring system. It will consist of lightweight agents and heavyweight monitoring engines. The agents will run on servers collecting data and sending it to the monitors. The monitors will read the stream of events coming from all the servers then process, analyze, and act.

Building a RabbitMQ Library in F#

I’ve been doing a lot of experimenting with F# and distributed computing via messaging. As evidenced by my previous, I’m using RabbitMQ as my messaging platform, for a couple of reasons: it’s easy to use, it’s free and open source, and I might decide to switch to RabbitMQ at work. I’ve been having a lot of fun experimenting with RabbitMQ and F#. However, I spend a lot of my time just writing and copy/pasting the boilerplate code needed to configure the RabbitMQ client libraries, add the fact that the .Net client library is written for C#, and you get a constant block of boring work. So, purely for fun and profit, I’m going to write a quick F# wrapper. The purpose of it being to let me very quickly setup RabbitMQ and, just as importantly, work with RabbitMQ in a manner that better fits F#.

Using RabbitMQ With F#

Over the last few years, one of the topics on which I have done much of my work has been distributed computing using message queues. Recently, I’ve been playing around with RabbitMQ, not for any reason other than that I wanted a simple, easy to setup, and easy to use messaging framework, which I could use for little experiments at home.

I’m not going to talk much about using RabbitMQ. What I am going to talk about is one of the many ways in which F# makes programming just an absolute blast.

Experimenting With Quotations

One of the more interesting featuers of F# is the Code Quotation. Though I do find this interesting now, it has taken over a year before I saw any reason I might have even slight interest. Even now, as I have taken a much greater interest in the topic, it’s been difficult finding anything detailed on the topic.