< description

Notes, thoughts, failures. A blog.

< tags | sort -R | ಠ_ಠ
soyuka@soyuka.me ~/soyuka.me/

Optimize Web assets with Gulp

Images, css, javascript, fonts, we’re using a lot of things in today’s websites. Every time you add an asset <link>, <script>, @import, the browser will issue a request to fetch it. The number of requests that you’ll send might not matter compared to how heavy your ressources are.

~700 Words

Indexing hashes with a set in redis

Recently I was confronting a redis performance issue involving the following commands: keys scan multiple hgetall calls storing a json string in the hash (wtf) Clearly, I was doing everything wrong when I now take a look at my new solution. What’s weird is that it felt right when I first wrote the code. Maybe that this is because I was mind-stuck in a relational pattern instead of putting those aside and starting to think redis-only.…
~500 Words

Angular2 providers, view providers and "singletons"

The following is an illustration of how providers act through the angular application, or the components tree. You can control their action scope by using providers or viewProviders so that multiple sibling components share the same instance of that provider.

~400 Words

Benchmarking nodejs streams

I was trying to compare my new streamable haml parser against other implementations and my results kept getting inconsistent. What I didn’t realised at first was that I was trying to compare things that can’t be compared. The first point is obvious: the golden rule of a useful benchmark is to only compare apples and apples. From redis documentation What is benchmarking? First, I should’ve asked myself “What is benchmarking?…
~2100 Words

Having fun with nodejs child processes

When using nodejs child processes you can enable an IPC channel (Inter-process communication). This is great because it gives you the ability to exchange informations between sub processes. With nodejs we often talk about micro-services, and I think that most of the time those micro-services can be represented in micro-processes, especially those with an asynchronous behaviour. A few weeks ago I’ve studied node internals and IPC and I’ve tried to ease this process implementation with relieve.…