Sign in

React Native developer excited about performance and system designs.
Photo by Omar Flores on Unsplash

Immediately Invoked Function Expression (IIFE)

If you came from JavaScript background you will most likely have encountered this pattern. Remember JQuery?

I remember back then I used think of this as a “wrapper” of my JQuery code and go on with my life without trying to find out what it’s actually doing. So let’s deconstruct this code together.


One way to evaluate the code is to profile it. Luckily, Node.js already provides us with a profiler, behind the --prof flag. So let’s just run our app with the profiler.

node --prof build/server.js

You can see that a isolate-0x....-v8.log file is created in your working directory. Now let’s stress test our app with ApacheBench.

ab -k -c 1000 -n 10000 -T "application/json" -p "http://localhost:3000/slack/events"

After waiting for about a minute, the stress test is complete. We can terminate our process and start analyzing the logs. We can do that by executing something like this:

node --prof-process isolate-0x102801e00-v8.log …

As we strived to serve as a Software-as-a-service, we need to be ready for everything, that includes scaling and security aspects.

One way to test if our app can handle a big volume of request is though stress testing. For this purpose, I came across a novel tool called ab, or ApacheBench. It’s easy to use and give a fairly good metrics to evaluate.

Let’s start with testing our landing page.

ab -n 1000 -c 50 -s 3

Here we define the number of request we want to stress test, that is 1000 request (the landing page is…

Prepare your umbrella before it rains. — an Indonesian proverb (source: Unsplash)

Here’s the thing. I’ve always thought of Test Driven Development as a burden, slowing the development time of critical features that needed to be shipped as soon as possible. Well, it seems I’m not the only one thinking this way, just look at the interesting numbers in this article:

Nearly half of the respondents have not implemented a BDD/ATDD/TDD approach.

It seems there is a strong resentment among certain programmers to the idea of doing something that seems to be “useless” rather than doing what they like, writing code that works toward implementing features.

Well, after being forced to practice…

Check out the earlier story:

Agile Manifesto

Let’s start from the Agile Manifesto. As we know, there are 4 points in the manifesto:

  1. Individuals and interactions over processes and tools. In, we try as much as we can to solve every problem together, solving blockers and move as fast and agile as we can. But indeed we know that our amount of interactions can be increased instead of relying on tools like Gitlab Issues.
  2. Working software over comprehensive documentation. We have our priority right for this point. Instead of providing a comprehensive documentation, we just documented a bare minimal to suffice…

Checkout the previous story:

Projected software architecture for our project

As you can see, we follow microservices architecture to emphasise on scalability and prevent system wide failure.

Let’s walk through the architecture bit by bit.

Main Service

This is the main service that will contain most of the logic on an abstraction level. We host it in the We also plugs our database to this instance, with some redundancies/replicas as needed as we scale. The Main Service will communicate mainly with the Queue Service, although we also tightly use KataPlatform API to enable Natural Language Understanding to our bot.

Queue Service

As we grow to a Software-as-a-Service product, we expect…

Source: unsplash

Our Stack

A bit of background of our stack before we dive into the architecture.


Our back-end are powered by the latest Node.js engine. We choose this because the growth of Javascript nowadays are unbelievable, there are abundant libraries for everything you can think of (oh, and the product owner also wanted us to use Node to integrate with their existing product).


To encourage good development practices (and because we are eager to learn) we also use TypeScript as our language of choice (which then compiles to ES6 Javascript that can be run by Node). …


Who doesn’t know about agility? It has become such a common stats in games such as RPGs as the main stats for ranger, thief, and so on. Well, outside the context of games, the term agile is also used in the context of software development. Here at, we are building tools to help you with agile software development, of course in the development, we utilize this so-called agile software development too.

A bit of history

In the early days of software development, software projects is often developed using a model called the Waterfall Model. It can be described as a series of phases…

Phase 1: Choosing a DBMS

If you’re reading this article, you most likely have already known a few popular example of DBMS or Database Management System like MySQL, MS-SQL, PostgreSQL, or even the NoSQL one like MongoDB or Redis.

A database-management system (DBMS) is a computer-software application that interacts with end-users, other applications, and the database itself to capture and analyze data. A general-purpose DBMS allows the definition, creation, querying, update, and administration of databases. — Wikipedia

Choosing a DBMS is a topic of its own, but we have chosen to use PostgreSQL considering a few things:

  1. It’s always nice to have a reliable relation…

Express has long been the de facto standard and mainstream pick when you start a project in Node.js. But recently (well, not that recent), the team behind Express has started a new, shiny library called Koa.js with a different phillosophy in mind.

Why isn’t Koa just Express 4.0? Koa is a pretty large departure from what people know about Express, the design is fundamentally much different, so the migration from Express 3.0 to this Express 4.0 would effectively mean rewriting the entire application, so we thought it would be more appropriate to create a new library. — Koa vs. Express

Rakha Kanz Kautsar

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store