Common Problem on Scaling Nodejs

I have built lots of NodeJS apps and scaled them to millions of requests. The most common problem you will see is Garbage collection pauses and memory leaks which sometime gives random distribution of time response of requests. The problem is not the GC but the way you have written code.

Read More

Database Indexing, performance and How It Works

Indexing in Database is a wide topic. Database indexing plays a important role in your query result performance. But like everything this too has a trade off. I know and assumed that you already worked with Indexing and you indexed your few field of your database table, But in this post I will explain a bit tho I’m not a good writer will try to finish within short. What is Indexing, How it works etc.

Read More

Use Cases for Using Let and Const in JavaScript

There are now two new ways to declare variables in JavaScript: let and const.The only way to declare a variable in JavaScript was to use the keyword var. To understand why let and const were added, it’s probably best to look at an example of when using var can get us into trouble.

Read More

One-Way vs. Two-Way Data Binding

Two-way binding is simply a way to sync data to a view and vice versa (mvvm pattern). One-way data binding refers to the design pattern found in component based frameworks, where a child component cannot modify data passed by a parent component, as that creates spaghetti code.

Read More

Working with Geospatial support in MongoDB with NodeJS

MongoDB’s geospatial indexing allows you to efficiently execute spatial queries on a collection that contains geospatial shapes and points. This tutorial will briefly introduce the concepts of geospatial indexes, and then demonstrate their use with $geoWithin, $geoIntersects, and geoNear.

Read More

Calling and Executing C++ Code from Node.js

There is three general ways of integrating C++ code with a Node.js application - although there are lots of variations within each category like: Automation, Shared Library and Addon. Each of them has advantage and disadvantage as well

Read More

When Object.assign() Is Risky

Javascript Object.assign allows you to copy one set of an object non-inherited properties to another.It has a signature of Object.assign(target, …sources). The target object is the first parameter and is also used as the return value. Object.assign() is useful for merging objects or cloning them shallowly. code sample below :

Read More

Mongo DB change stream new Feature of Mongo 3.6

Those days are gone when people didn’t expect information for momentary access to data. Nowadays expectation everywhere is real-time action and result. Something is happened? not 1 day ago, not even 1 min ago but just now. Being notified constantly on any change of data points a bit critical from many application nowadays. So the upcoming MongoDB3.6 introduces a new $changeStream aggregation pipeline operator.

Read More

Flavour of Async/await ES2017

One really exciting thing for JS Developer that last week was dropped Node 7.6 which brought support for async/await. If you haven’t heard of async/await before, it’s an amazing update to JavaScript (ES2017) that allows us to write synchronous looking asynchronous code without nested callbacks or even chained .then() promises.

Read More