2/29/2016

Give a try and bench ScyllaDB (Cassandra-compatible C++ db, 10x faster) with two lines of docker

I'm currently very interested by the ScyllaDB project as it announce a database that is "fully compatible with Apache Cassandra at 10x the throughput and jaw dropping low latency". Scylla is coded in C++ (so no garbage collection) and the team behind it seems quite awesome, so why not after all.
If like me you would like to give a quick try to ScyllaDB, here is two docker lines that will start ScyllaDB and run a benchmark over it:


Please note that running ScyllaDB inside a virtual box VM on MacOSX is not the best idea to grasp what it's capable of, however here is the result I got:

[Update] A little precision by Pekka Enberg: "Please remember that the Docker image is not optimized so performance isn't all that great. That's because Scylla needs a filesystem that supports AIO/DIO properly and the only one to do that is XFS at the moment."

12/29/2015

match-when - Pattern Matching for Modern JavaScript

I was working on an internal tool at iAdvize during our hack days (fr). This tool is representing our micro-service architecture and every of its components in a near real-time graph (I may open-source it in the future).

Somewhere in the graph relationship code I thought wait a minute, would it be awesome to use some pattern-matching there? So I tried to write some syntax that could exist for it...


... and of course it failed.

It was 6PM so the good news was I would have all the time I wanted to see if it could be possible to implement a pattern-matching solution that was both syntaxically short, would work well with functional-style code while using JavaScript ES6 features for conciseness.


I ended up with this syntax:


Which works also that way:


Underneath it uses enhanced object literals, symbols and, sadly, JSON serialization/deserialization to pass object properties.


Later that night match-when was available on Github.

11/04/2015

Managing various NodeJS version per projects

How to manage multiple projects with their own NodeJS version? 

Simple, use nvm.

But how do I automatically change NodeJS version?

Simple use a .nvmrc inside each project and a .env loaded by autoenv when cding inside the project to automatically change NodeJS version between project just by using cd.

It's not DRY, I want to stay DRY and don't duplicate NodeJS version inside both package.json and .nvmrc, what do I do?

Well, remove your .nvmrc and replace .env content by:

And now you're DRY :)

« »
 
 
Made with on a hot august night from an airplane the 19th of March 2017.