Written by:2017/02/05 06:50 PM
Computers have come a long way since the early 1960's, 1970's and even the 1980's. Where at one time personal computers were never heard of, and any real computer that could do anything substantial took up a whole room or even a whole floor of an office building.
My first computer I had was in the early 1980's. It was a Sinclair ZX spectrum, with, wait for it, a grand total of 48k ram. I first learned to program using Sinclair Basic. Programming primarily games and some business projects posted in computer magazines which I got from the UK.
Computers were a life saver to many, doing monotonous and various other tasks very fast and very accurate. But no matter how fast computers were, they still only processed one instruction at a time. Admittedly the time to process that instruction was very, very small.
As more and more people got to use computers, they tried to squeeze as much power out of the computers as they can. But because computers only process one thing at a time, the idea of multi-tasking and multi-threading was a pipe dream. Not only had the hardware not been able to support it, but not many if any programming languages could.
For example, parallel programming was only available to C# programmers from version 5.0. Yes, there were ways to work around the problem and pseudo-multi-tasking options were available, but not true multi-threading.
So one of the ways to make computers faster, work harder and do more was to increase the power and speed of the hardware. Faster CPU's, faster memory, faster Hard Drives, multiple CPU's etc. But still computers are only able to process one thing at a time.
They were smart at it though. Various methods were employed to mimic parallel computing. Like time slicing, time sharing, scheduling, etc.
When so called multi-tasking eventually become main stream, it was very hard. It was hard to understand grasp and hard to execute. You had to worry about things like dead locks, race conditions, memory leaks, memory corruption, synchronisation issues. The list goes on.
But many will argue saying that multi-threading is easy or should be. If it were that easy, then why is it not our go to happy place in programming.
Alas, there is a simpler and better way of doing things. Especially for simple programmers like most of us. I prefer to leave the difficult stuff to guys who have already solved the problem.
Enter Akka.net. A concurrent, distributed computing framework using the Actor and messaging model.
The actor model is an old technology, originating in 1973 as an approach to parallel computing.
The Actor model is used across many different industries solving the problem of Processing Everything Right Now. Nowadays if you cannot process something in a Nano second, then you might as well give up.
Akka.Net is a port to .Net of Akka. Akka is a framework for developing scalable, fault tolerant and concurrent applications. Its aim is to abstract away the difficult part of multi-threading and parallel programming. Akka.NET is an open-source library for building concurrent, fault-tolerant and scalable systems using the actor model.
Akka.net gives you and I, the programmer some useful benefits.
Along with this, you also get fault tolerance with a "let it crash and we will recover" attitude. Akka.NET actors give you the ability to build self-healing systems that can recover from failure
Also, you get location transparency. Everything in Akka is designed to work in a distributed environment: all interactions of actors use pure message passing and everything is asynchronous. So it matters not if your computing power is on your laptop at home, or on some PC on the other side of the world. It's all the same to Akka.net.
Actors are like "micros processors". Multiple actors can all execute concurrently on multiple cores built into a laptop or server.
image from https://petabridge.com/blog/akkadotnet-business-case/
Over the next few blog posts we will get into more detail on how to use Akka.net. But here are a few things to whet your appetite and get you started.
0 comment(s) so far...
Do you want to receive blog updates via e-mail. Then just click on the link below. You will be redirected to Google's feed burner, where you can fill out a form. Supplying your e-mail address.
The subscription is managed entirely by Google's Feedburner. We cannot and do not collect your email address.
Subscribe to The Brave Programmer by Email
Sign up with Disqus to enjoy a surprise box of features