Why errors are not bubbling up from ES6 promises? (+fix)

I’ve just spent way to much time debugging a node program that was crashing because of a database call wrapped in ES6 promise. After looking all around in my code for an abusive try/catch silencing the error, I stumbled upon an article explaining error Promises swallow errors!handling behavior with ES6 promises, that are just basically “swallowing” all errors thrown during their resolution. While arguable, this behavior is expected as per the specifications.

The following article describes this behavior quite well and provide a workaround: http://jamesknelson.com/are-es6-promises-swallowing-your-errors/

Continue reading

Storm & Kafka : serializing complex data types using Kryo

I recently had to work with Storm and Kafka, which are respectively : a framework for near real-time data processing ; a real-time pub/sub system. Both can be heavily distributed across multiple machines on a cluster.

Even if the promise of Storm combined with Kafka sounds great, things began to get more complex when I wanted to transfer non-primitive data inside and between the two systems. Continue reading