cfengine, bcfg2, chef and puppet

I’ve been talking with a lot of folks lately about Configuration Management/Automation Systems. Mainly about puppet vs cfengine.

The first question i usually ask people recommending interpreter solutions (ruby, perl, python..) is “Why?”. Why would anyone want an interpreted solution?

I get the point that the scripted languages are usually easier and therefore easy to maintain. This is true if you compare cfengine to almost any other solution. Yes, cfengine is a bit quirky.

So here are the main issues i’ve encountered with interpreted solutions over the past 4 years.

#1 Libraries (Gems and Eggs)

If your config management needs libraries like Ruby’s Gems or Python’s eggs on runtime, then it is clearly a bad idea. Imagine you having to keep libraries up to date, just so your config management runs.

I want my management system to be able to run anywhere, without having to worry about Gem-versions and Egg-versions.

#2 Interpreters (Ruby, Perl, Python…)

Having said the version-part about Gems and Eggs, this applies also to the language it’s written in.

Having the requirement of an actual interpreter for your config management installed is more than unsettling to me, why? Because you will run into issues regarding different OS/Architecture stuff that the language might handle differently/ineffeciently or make it segfault or deadlocking. Also having a common interpreter for config management (like Ruby) gives a whole new front of issues when you’re for example a Rails- or in general a Ruby- coder.

Since you most certainly need a specific version of (e.g Ruby 1.8) to run certain code in your interpreter, plus you might need to keep your libraries/gems/eggs up to date.

So you think my points are all bogus?

Why don’t i just tell you my 1.5y-experience with Puppet back in ‘09 (i think)?

I had puppet running on roughly 40 VMs. The first thing that i found good at the time was, that it is Ruby! I know ruby, awesome! But the feeling that the decision was right, didn’t hold up for long. Having to update multiple libraries AND your config mangement, then you have a severe upgrade-impact.

After having those servers run for a couple of days, i noticed that some of the VM’s puppetd weren’t running anymore. That got me curious, so i started digging. Turned out that puppet somehow crashed quite frequently. One day i decided to let puppet put itself into every VM’s crontab, so it would do a /etc/init.d/puppetd restart every hour.

All was great, until one day my IRC VM was lagging like hell. I did BW checks at home and in the DC, nothing there. Then i logged into the VM Host just to find a couple of VMs running at 100% CPU. Great, now what?

Turns out that ruby/puppetd deadlocked itself while eating 100% CPU - yaaay! I restarted those puppets and all was good for another few months when it hit again. Several puppetd’s dead, another few are just doodling at 100% CPU..

During that time

i had to mingle with different Gem- and Ruby-Versions (as 1.9 was just hitting the scene) just so i could get my management and my development back on track.

Clearly, this is NOT what you want.

So what do i use?

Cfengine. Cfengine. Cfengine.

Why? Because it’s C.

When i’m done with compiling my static cfengine package for archlinux:
-rw-r–r– 1 fbettag wheel 447K Jul 22 2011 cfengine-3.2.0b1-1-x86_64.pkg.tar.xz

Yes, you’ve read right. Statically compiled it’s 447K in a .tar.xz, no library dependencies, no nothing. Also, i’ve never seen cfengine eat more than 10MB RAM during Runtime and i never had a box where cfengine crashed or segfaulted.

Admittedly, it is some kind of PITA to get to know Cfengine, i at least spent 24 Hours in migrating my puppet setup to Cfengine, but it was worth it!

#Transparenz ist kein Inhalt - die #Piraten und die Inhaltsleere

Wir hören ja immer wieder, dass die Piratenpartei kein Programm hat, dass es an Inhalten fehlt. Ganz abgesehen davon, dass dies nicht stimmt, gibt es bestimmt viele Piraten-Wähler, die sich trotzdem nicht mit dem Programm auskennen oder es nichtmal gelesen haben (wie ich).

Warum? Ganz einfach eigentlich.. Herr Lasse Becker meinte bei ZDF-Login, dass Transparenz kein Inhalt ist. Dieser Aussage stimme ich zu, jedoch kenne ich die Grundeinstellung der Partei: Basisdemokratie.

Basisdemokratie?

Wie wir in den letzten 10 Jahren gesehen haben, funktioniert es nicht, alle vier Jahre ein Kreuzchen zu machen, da die Gründe für die wir Kreuze vergeben, in der Regel sowieso nicht eingehalten werden oder am Ende einfach nur leere Versprechen waren. -heftig zu CDU/SPD schiel-

Es ist auch unmöglich, dass eine Partei Probleme vorhersagt (Finanzkrise, Eurokrise, EU-Richtlinie zur Vorratsdatenspeicherung), demnach ist es (für mich zumindest) als Bürger wichtig, dass wenn diese Probleme auftreten, ich dann aktiv mich einbringen kann, und nicht darauf hoffen muss, dass die Partei die ich gewählt habe, schon das richtige tun wird. Da wurde ich als ehemaliger CDU-Wähler (nicht Mitglied!) schon öfters enttäuscht.

Demnach ist es für mich wichtig, mich einbringen zu können, wenn ein Problem auftritt.

Antwort auf $alles

Zugegeben, mir geht der Satz “dazu haben wir noch keine…” auch auf den Senkel, aber das erfrischende daran ist, dass diese Partei eben nicht versucht, auf Teufelkommraus für Alles eine Antwort zu haben. Bei etablierten gilt da oft eher schlecht als Recht. (Recht ist bewusst groß)

Ja es wird noch entschieden, ja es gibt Leute die diese Partei wählen, aber wenn man realistisch ist, warum brauchen die Piraten Antworten auf alles?

Es gibt doch genug etablierte Parteien, die den Wirtschafts-, Finanz- oder Agrar-Sektor betreuen, denen fehlt es an Kompetenzen um auf IT-Fragen wie die VDS ordentlich zu reagieren. Oder wie man in der Debatte in Berlin um diesen Berlin-Trojaner gesehen hat, dass die Abgeordeneten die darüber bei CDU und SPD entscheiden, einfach nicht das nötige Verständnis für IT-Angelegenheiten haben..

Warum also sollte die Piratenpartei eine Partei für alle Themen sein? Mir wäre es lieber, wenn wir mehr Kompetenz-Parteien hätten, die sich zusammen in Bündnissen/Koalitionen ergänzen anstatt sich gegenseitig zu behindern.

Reicht es nicht, dass die Piraten gute Antworten auf Fragen aus der IT-Welt, der Bildungspolitik und der Sozialpolitik haben?

Wenn man realistisch ist, dann werden die Piraten irgendwann bei 20-30% sein. Wenn die Piraten irgendwann mal bei 100% angekommen sein sollten, ja gut, dann braucht man wirklich ein Vollprogramm… Aber ich glaube, da haben wir noch gute 5 Jahre, vorausgesetzt die etablierten machen so weiter ;)

Die Lüge der Inhaltsleere

Wie gesagt, diese Lüge oder auch Unwissen ist weit verbreitet. Ich kenn das Programm nicht, nur die Teile die mich interessieren, dass bedeutet aber nicht, dass die Partei deswegen kein Programm hat.

Das Problem an diesem Stigma ist, dass man zum Beispiel auf Gruppen treffen kann, die nicht dazu passen, sich dennoch irgendwie verbunden sehen.

Ein Beispiel wäre hier die Nazi-Problematik auf dem Piraten Parteitag oder das wiederholte Auftauchen der Anti-EU Partei bei den ACTA Demos (in Wien).

Vielleicht muss man hier vermehrt etwas mehr Programm-Marketing betreiben, da möchte ich aber niemandem unterstellen, dass da bis jetzt zu wenig passiert ist. Desinformation gehört wohl heutzutage immer dazu.

Hier würde es vielleicht auch helfen, anstatt “Wir haben noch nicht..” einfach “Dies wurde von unserer Basis noch nicht eingebracht. Wenn dieses Thema für Sie (Zuschauer) wichtig ist, dann können Sie sich entweder bei uns einbringen, oder eine Partei wählen, die Ihre Interessen in dieser Hinsicht bereits vertritt.”

Vielleicht erkennt dann der ein oder andere renitente Politiker anderer Fraktionen auch, dass man nicht immer eine Antwort braucht.

Politische Idee / Vision

Herr Thorsten Denkler behauptete im ZDF-Login Interview, dass man “normalerweise” eine Politische Vision oder Idee hat, bevor man eine Partei gründet, dies bei den Piraten allerdings fehlt, und genau dieses Statement entzieht sich meinem Verstand.

Diese Basisdemokratische Partei möchte mehr Transparenz, mehr Bürgerbeteiligung und ein freies Internet.

Ich zähle in diesem Satz schonmal vier Visionen und Ideen, die in unserer derzeitigen Politik nicht vorkommen, vielleicht geht ja unsere Vorstellung von Ideen und Visionen etwas auseinander, ich meine jedenfalls nicht die Visionen, die man im Drogenrausch hat.

Transparenz

Herr Denkler betonte auch, dass es keine Hinterzimmer-Diskussionen gab, die nicht am nächsten Tag in der Zeitung standen. Na super! Dann kann man es auch gleich öffentlich machen!

Andersherum, wenn man sich anschaut wie die Rede von Herrn Uhl im Nachhinein verändert wurde, dann kann man sich auf den “transparenten” Prozess Presse auch nicht 100%ig verlassen.

Ebenfalls haben Herr Denkler und Herr Becker auch wiederholt angebracht, dass Transparenz kein Inhalt ist. Allerdings ist es ein Praxis, die in unserer Repräsentativen Politik abhanden gekommen ist.

Warum also ist es nicht legitim, dass ich eine Partei deswegen wähle, weil Sie mehr Licht ins Dunkel rücken will? Frau Weisband betont es immer wieder, und ich finde es eine tolle Aussage, “Warum kann ich etwas, das ich im Namen der Bürger beschließe, nicht auch vor diesen Verhandeln/Besprechen?”

Es ist mir klar, dass wir unsere Militär-Strategien oder Whatna nicht frei offenlegen sollten, aber bei Dingen wie ACTA, SOPA, PIPA und Weissgottnoch-Alles, da wundert man sich als Politiker (vor Allem Herr Becker), dass Leute eine Partei wählen, die für Transparenz und gegen Hinterzimmer-Politik steht?

Fazit

Auch wenn man die Piraten nicht wegen Inhalte wählt, es ist in jedem Fall eine Investition in die Zukunft, denn man ganz sicher davon ausgehen, dass basisdemokratische Entscheidungen getroffen werden, egal ob die mir nun passen oder nicht.

Wer allerdings lieber seine Interessen über die Interessen der Mehrheit (Demokratie), oder auch Tyrannei der Masse bei der FDP genannt, treffen möchte, der ist in einer Diktatur besser aufgehoben.

Liftweb CSS Selectors and implicits

When using Ruby, i found myself frequently making things like formatting methods to display a variety of things.

def formatDouble(dbl)
     "%.2f" % dbl
end

Often these output formatters are render-specific, so defining them on the model seems kinda unflexible to me. Of course if you only have one Double to format, this is not the best/quickest way to go, but imagine you have a Snippet which has 3-4 BigDecimals to format.

class MySnippet {
     def formatDouble(a: Box[BigDecimal]) = a match {
           case Full(dbl) => "%.2f".format(dbl)
           case _ => ""
     }

     def render = ".field1 *" #> formatDouble(myRecord.field1.is) &
                  ".field2 *" #> formatDouble(myRecord.field2.is)
}

Putting a format around everything like this would be too much code for me, even for 2 lines this looks like crap to me.

What to do about it?

There is a very simple way of dealing with things, this is due to the fact that #> will only take String and NodeSeq (and a few other’s you usually don’t come to contact with), so we can work with Scala’s implicit.

class MySnippet {
     implicit def formatDouble(a: Box[BigDecimal]) = a match {
           case Full(dbl) => "%.2f".format(dbl)
           case _ => ""
     }

     def render = ".field1 *" #> myRecord.field1.is &
                  ".field2 *" #> myRecord.field2.is
}

In my (humble LOL) opinion, this looks a lot better. You can also apply this on different needs like with Tuples:

class MySnippet {
     implicit def formatPrice(a: (Box[BigDecimal], String)) = a._1 match {
           case Full(dbl) => "%.2f %s".format(dbl, a._2)
           case _ => ""
     }

     def render = ".field1 *" #> (myRecord.price.is, myRecord.currency.is) &
                  ".field2 *" #> (myRecord.shipping.is, myRecord.currency.is)
}

I hope this helps some of you folks to make your code more readable!

And yes, i admit that these example are prolly not the most advanced use cases, but you should get the idea :)

Cheers

London called - @dpp, @skillsmatter and #functionalpx

So i’ve spent the past 3 days in London, to be more specific, at Skills Matter together with David Pollak.

First off, i don’t like London. I don’t know if it’s the UK, but i defiantly hate the City for various reasons (tho i love Fish and Chips). I mainly hate it for it’s public transportation which is a nightmare. I mean i’ve been to Amsterdam, Paris, Palma de Mallorca, Hong Kong and Bali (where they don’t have real roads), but i’ve never had issues like i had in London. Confusing is an understatement.

Skills Matter

Anyhow, i love Skills Matter. The effort they put into Open Source Events is unmatched, i’ve never ever encountered a group that passionate about what they do, which is helping amazing people come together and share their knowledge and make them feel welcome.

This welcoming feeling comes from the location (which is a nice loft transformed into a hackers heaven), filled with loungy chairs as well as real ones for conferences and of course the caring Staff. I loved meeting the folks there again, especially Amy and David (Hall) as well as Wendy and Paul! You guys do an amazing job, seriously, you make me forget all about the things i don’t like about London :)

alt text

Lunch with the Guardian Guys

On the day of my arrival David Pollak and i had a nice lunch with the guys from The Guardian. It’s always nice talking to Graham, i hope next time we’ll get some one on one time :) Also the chicken was AWESOME!!! to say the least :)

The Course

So i was really nervous about what David Pollak expected me to do, i hope i didn’t let anyone down! I loved the way i was thrown into it by David, he is amazing in every aspect! The support and suggestions are unmatched to anyone i’ve ever met, so i hope you understand my excitement about meeting him. It’s always interesting, fun and i am always nervous like i was on a first date :) Ok, those 3 pints helped me loosen up and enjoying private meals with him is awesome!

alt text
(he is the good looking guy, i am the one with the stupid grin ;)

So the course was interesting, it was unlike any course i’ve ever attended. This is probably due to the low number of participants which makes it tailor-made for everyone attending.

It was very interesting learning about other people’s issues and experiences with Lift, since i’ve become a true believer in the framework and i want people’s input (mostly to refute their cons ;). There is nothing like Liftweb, yes, you may quote me on that.

Overall i think i’ll be able to teach David Pollak’s Lift Basics in the future, but i am not sure i can provide a knowledge that deep, because, well let’s be serious, he is the Founder ;)

But i guess it will be a couple of months before i start teaching a course, so i’ll have plenty of time to dig a lot deeper into Lift which i am happy to do!

The Functional Programming Exchange

So this was a last minute decision which i have to thank Paul and David Hall for! :) It was interesting, but sadly Miles Sabin couldn’t make it! :( I’d really wanted to see you again!

Also watching David Pollak showing us Visi.Pro was very nice. At least now i know that if Scala gets boring, i’ll look into haskell :)

Thanks to everyone

I really wanna thank every single one i’ve met, you made me feel welcome in a City which doesn’t welcome me at all! ;)

I especially want to thank our attendees of the course :) Without you that trip wouldn’t have been possible!

Cheers

Why is everyone so fucking stupid? UBERRANT!

I encounter stupidity on a daily basis, wether it is wannabe Linux-Admins like this guy “gehirn”/“gott” i chatted with on several occasions, but it’s not just him, he’s one of the 99% of Occupied by Brainfarts in my line of work.

#1 Source based distros are not for production

You really think that people using source based distros like FreeBSD (ports), NetBSD (pkgsrc), Gentoo (Portage) or Archlinux (AUR) have too much time? LOL

I am not sure what fucking old ass boxes you sell to your customers, but i can imagine that selling them Towers from late ‘05 as “Servers” will make compilation very slow. Guess what, the boxes i buy for my customers are hand picked, not some Hardware i have 20x stacked in my Warehouse because i’m convinced that every customer needs roughly the same stuff - the joke is on you, buddy.

But i don’t mean to tell you how to run your business, oh sorry, you don’t have your own business, you’re just an employee and want to tell me bullshit? LOL Take a hike, mike!

#2 Binary distros are so leet and production ready

Yeah, we’ve all seen how great binary distros are, especially when fucking package maintainer try to fix fucking compiler warnings by vuln’ing up code CVE-2008-0166.

Oh, i’m sorry, your meds prevented you from thinking that far? I figured. Yes, you may cry now “but in source based distros, there can also be bad patches”.

That may be so, but at least people have a chance of READING the fucking code, if you get it in binary, it will be very hard to see what is different from Vanilla. But i guess Enterprise Businesses care more about ease of use and stickers they can put on their hardware than all the flexibility that comes with source based distros.

Ah, and i’d love to see you waiting for a patched binary from upstream when a fresh 0day hit the scene, yes, think about it, find a stupid reason why i am wrong, but you’ll know i am right. I’ll just up a number in my compilation-recipe, and i’m good to go.

Also, it’s always nice to have the same shitty software running EVERYWHERE, that makes it so much more secure! I can see a nice auto-rooter doing its job.

Seriously

If i hear any stupid dumbfuck telling me bullshit about source based distros, consider yourself outed as being unqualified for your job.

Maybe visit a gay club or something, get your rectal exam from a professional like you consider yourself to be, but don’t try to talk with the big boys, elm0 and i will get the shits and giggles so bad..

Why did i write this?

I am so fed up by pseudo-Admins telling me “oooh, source based is only for people administrating 2 servers”, the fucking truth is, on my peak i had to manage 600 of those motherfuckers myself, so please go and fuck yourself when try judging me. You don’t have the slightest idea what i am capable of.

EOD.

David Pollak's Lift Basics

Whew, the past few weeks were like a Rollercoaster ride between my personal downs and professional highs. I got even more high on Liftweb when i was voted Liftweb Committer almost two weeks back! So what’s coming next?

I am doing something truly amazing, something i would’ve never thought almost 2.5 years back when i first looked at Scala and Liftweb, because i will - buckle up - i will be co-teaching David Pollak’s Lift Basics with David at Skills Matter in London on March 15th. Yes, you can wipe your glasses all you want, the text won’t change!

So if you’re interested, be sure to get a seat while they’re available, because we will put the Fun in Functional Web-Programming. ;)

German

Puh, die letzten paar Wochen waren eine reine Achterbahnfahrt zwischen meinen persönlichen Tiefen und meinen professionellen Höhen. Die Höhen wurden noch heftiger, als ich vor knapp zwei Wochen zum Liftweb Committer gewählt wurde. Was kommt als nächstes?

Ich werde was richtig spannendes tun, etwas wovon ich vor 2.5 Jahren, als ich mit Scala und Liftweb mal rumgespielt habe, nie gedacht habe. Ich werde - gut festhalten - Ich werde David Pollak’s Lift Basics zusammen mit David bei Skills Matter in London am 15. März 2012 unterrichten! Jaha, ihr habt richtig gelesen, da könnt ihr die Brillen putzen wie ihr wollt, der Text ändert sich nicht!

Wenn ihr also Interesse habt, dann stellt sicher dass ihr euch einen Sitz holt, solange es die noch gibt!

Liftweb Error Reports by Mail

Having some kind of safety net when something goes wrong is never bad, so today my ass got saved my just a few lines of code (which made this thing much more easier).

So imagine you have a complex actor doing important business calculations (like invoicing), and imagine this one failing at 3 o’clock in the morning. How would you know?

Do you always monitor your error logs? If you go by the let-it-fail principle for example for unauthenticated users, your logs get pretty cluttered after some time. Apply that to a few scenarios where unwanted input or stuff produces stack traces, and you are looking at an unimaginable amount of stacktraces to look through.

So i’ve written just the simples piece of code i want to share today, since it saved my ass tonight ;)

If you’ve setup the mailer correctly in your Liftweb-Project, then lines as simple as these could save you a huge amount of trial and error, since you can already define what the subject and message should be.

As i’ve already said, it’s not much, but it’s often those little pieces that will save you time and headache.

Liftweb Bootstrap - a nice Base-Project

Happy new year!

Yes, you’ve heard right. It’s been that long since i’ve blogged! Anyway, i didn’t spend my time scratching my balls, i used it wisely - yes imagine that for a change. ;)

So what’s the 411 you might ask..

Lift-Bootstrap and Lift-BHtml

What it is? BHtml is a nice wrapper for MappedField and SHtml. It also does Mapper’s validation and produces nice Popovers with Twitter’s amazing Bootstrap Kit.

So what was i unhappy about Liftweb’s Helpers and things? Short answer: Nothing! It has been perfect all the way. It’s flexible, robust and not nearly as much code as you’d expect. So why did it need wrapping?

This is still too much code, also it has 0 validation in the form of feedback. Now since i am one lazy ass guy, i’ve written myself these BHtml wrappers to make it even more comfortable.

And yes, i am not that lazy, so i wrote a few ways to use it:

This will make the onBlur set the field in the Object, it will not auto-save the record if this field changes (so you can make a separate save-button), and it will display validation-errors on Blur as well as on Submit using a Twitter BootstrapJS Popover (3rd example on the Page).

Now don’t be amazed, that wasn’t even half of it! But i won’t dig any deeper into BHtml, since it is Open Source and for everyone to explore at my Github Repo named Lift-BHtml.

I even spent my Sunday morning writing a ScalaDoc API, so at least be sure to check it out before dismissing it. ;)

Buckle Up!

So i hear you’ve got another big thing going? Yes, you’ve heard (or read) right. It is something called Lift-Bootstrap and it provides a basic project with User- and Customer-Models as well as basic Twitter Bootstrap integration for validation. Yes, it sounds heavy and much, but it really is not. Once you get the hang of it, it’s all easy peasy ;)

The basic idea behind this was, that i sometimes want to draw up a rough project over night, not having to worry about Lift’s very unique and basic default layout, and having some guideline on how to style my forms and objects. Getting this basic rough draft is often driving me nuts, since i often just want to copy most of the view-code (HTML) and change a few bits on the form and be done with it. So Twitter Bootstrap gives me a good approach on how to clearly handly those things - but that’s just me.

Yes, i know you’re eager to check it out, so i won’t be holding you back any longer. I proudly present, the Lift-Bootstrap Demo.

Simply Sign Up, there is no Listing of Users, just hypothetical Customers, and check out the Validation- and Notification-Feature.

It is not meant to be perfect! It was designed to get you up and running fast.

So where is the source-code? Right here on my Lift-Bootstrap Github Repo.

A few last thoughts:

  • the Sign Up page is being processed by ProtoUser, i didn’t debug into validation there, since i usually add my Users by hand for most things.
  • to disable User-Registration, simply uncomment the line in User.scala

That’s it for tonight

I will be improving this, since this is going to be my base for future projects.

Thanks again to David Pollak and the whole Liftweb Community!

n8!-

Apple is slipping, are you falling for it as well?

If you read my Twitter-feed, you’ll probably notice me ranting endlessly about Apple. Yes, those nice guys that sell iPods and Macs, they fuck everything up these days. But let me back up a little, since my story begins in 2004.

Linux

Back then i had my beloved Linux Workstation running Gentoo Linux. It was really sweet, everything worked the way i wanted, i’ve spent weeks configuring every little tool the way i wanted to, but then my Disk died. Well, if you buy a new HDD, you usually don’t think it will go south in the first 6 months (at least if it is in your workstation running 9hrs / day in the office).

After having restored most of the configs from my brain, i started to get the sense, that this is not right. Admittedly, my system really was cut to the hardware like a latex suite, but the days it took to get stuff almost to where they were before, it was a pain. After all, it isn’t the same anymore.. the system feels tainted and some configs still aren’t the 100% they were before.

In the end, i quit my job and didn’t care for that workstation anymore, since i was working from at home.

It all ended in my effort, to find me a OS which is easily restorable, or at least drop dead easy to get to the point you’ve had it before.

MacOS X 10.4

Worked like a charm, back then i had a hackintosh, but it worked really really nice. That’s when i decided to buy my first Mid-2007 MacPro. Nice!

Not even 10 days after i got that MacPro delivered, 10.5 was released.

MacOS X 10.5

Also, this one was quite nice! Never had any real troubles!

MacOS X 10.6

Seemed a bit slow on my (back then 2.5 year old MacPro, but it worked). But you know it, when you least expect it, something breaks… In my case the ATI broke (twice in that MacPro). After the 2nd time the Graphicsadapter got exchanged, i thought i’d get myself a GeForce for that Mac, but HA! No more where those came from. My Mac is too old and there are no other Adapters available than the ATI which keeps on breaking…

MacOS X 10.7

So 10.7 came out, and i immediately got myself a new MBP 15” since my old MacPro was really slow. Also the MacBook is nice if you have to go out to customers, since it wasn’t the slowest, even iOS Coding was possible, but still, the MacPro had to be replaced.. so i did.

The Journey ends

Ever since 10.7, Apple’s whole Quality Assurance seems to be either on Vacation or got silently fired.. NOTHING is working right anymore. Somehow that “featureset” of incompetence started swapping to iOS, especially iOS 5 is buggy like hell..

So since 10.7, i am having random kernel panics which force me to reboot on a daily basis.. Not forgetting to mention that those sudden reboots somehow seem to break Covers in my iTunes Library (AWESOME!) and invalidated one of my TrueCrypt Containers (EVEN BETTER!).

So if you are annoyed by me ranting about Apple, please consider that i’ve spend thousands of Euros on Apple Hardware, just being teased by fanboys “you must be doing something wrong”, i am sick and tired.

What i will never do again

Buy Apple Hardware. I’ll never ever ever do that again, it’s the biggest mistake a human can make. It’s crap, real crap. Not the hardware itself, but what they consider a “reliable” or “stable” OS, does not overlap with my definition.

I would understand it if my Hackintosh was rebooting all day, but my original 1.5 year old MacBook Pro acts EXACTLY the same way.

So how would you react, that whenever you are seriously working, you get a kernel panic bringing you COMPLETELY out of your flow? Would you go mad?
Would you want to kick your 30 inch Apple Cinema Display including your hardware off the table?

I know i want to.. but the question was, are you falling for their hipster crap as well? I know for certain that i won’t again.

Scala, Akka and Erlang Actor Benchmarks

Since i am currently intrigued by Erlang for a special project, i thought i look into Actor Performance. I found an interesting Post by Paul Keeble comparing Erlang with Scala Actors. I also found an Akka-Benchmark, but it was outdated and i thought i give 2.0-SNAPSHOT a go.

Here are my results:

Erlang

Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe]

Eshell V5.8.5  (abort with ^G)
1> client:runTest(12000000)
Count is {ok,1200000000}
Test took 26.506394 seconds
Throughput=452720.95480056625 per sec
ok
2> client:runTest2(12000000).
Count is 1200000000
Test took 11.322672 seconds
Throughput=1059820.5087986297 per sec
ok

Roughly about 1 million messages per second, not bad!

Scala and Akka

Starting Akka...
Running Akka 2.0-SNAPSHOT
Deploying file:/usr/local/akka/deploy/scalavserlang_2.9.1-1.0.jar
[INFO] [12/25/2011 17:49:54.560] [main] [ActorSystem] REMOTE: RemoteServerStarted@akka://AkkaTest@127.0.0.1:2552
[INFO] [12/25/2011 17:49:54.572] [main] [Remote] Starting remote server on [akka://AkkaTest@127.0.0.1:2552]
Starting up ag.bett.scala.test.akka.AkkaActorKernel
[akka] Count is 1200000000
[akka] Test took 5.596 seconds
[akka] Throughput=2144388.849177984 per sec
--
[scala] Count is 1200000000
[scala] Test took 21.696 seconds
[scala] Throughput=553097.3451327434 per sec

WOW! Look at that result! Akka made 2.1 Million per second. Looks like Akka 2.0 seems to be a keeper!

I am looking forward to using Akka 2.0 together with my favourite Web-Framework Liftweb

UPDATE LiftActor

Since this post has gotten very much attention, i thought for completeness, i’ll add LiftActor to the Benchmark. It performs still better than the Scala Actors, but not as good as Akka. They’re close to Erlang i’d say.

Starting Akka...
Running Akka 2.0-SNAPSHOT
Deploying file:/usr/local/akka-2.0-M1/deploy/scalavserlang_2.9.1-1.0.jar
Starting up ag.bett.scala.test.lift.ActorKernel
[lift] Count is 1200000000
[lift] Test took 13.009 seconds
[lift] Throughput=922438.3119378891 per sec

Do it yourself

Since i tested it on one of my VPS with 2GB RAM, i am quite sure that there is a lot more behind Akka where that result came from. So if you want, give it a try. I’ve forked the original repository of Paul Keeble into my own.

You can find everything in the designated GitHub repo, i’ve taken the liberty of packaging akka-2.0-SNAPSHOT jars together with sbt for easy compilation/running.

Since you might be using a different git revision than i do (e160179aa91c54284c301a7bea64f96c681f3610), you might want to replace those jars.

[UPDATE] I also updated the Repo so it has an AkkaKernel for each Test-Actor.

Simply copy the .jar to your akka’s deploy/ and run:

./bin/akka ag.bett.scala.test.akka.ActorKernel
./bin/akka ag.bett.scala.test.lscala.ActorKernel
./bin/akka ag.bett.scala.test.lift.ActorKernel

Thanks to everyone at Typesafe and Akka for this present!

Have fun and merry christmas!