Recently I came across this dilemma when I had to limit the requests which are fired from a search box on each keystroke. For some more context, both denounce and throttling are performance improvement techniques in order to limit the number of actions when there are way too many events (API calls in my case) involved.
Let’s look at some scenarios where this might be useful
Now dissect the approaches one by one.
In this approach, we are just limiting the number of actions for a specific period of time. Consider the case of click spamming for example. By click spamming, I simply mean some user is repeatedly clicking some element in our app, most probably a button to trigger some event. In order to avoid this scenario, we can give a timeout after an event, like 5 seconds. In that case, once the user triggers the action, he has to wait for 5 seconds to trigger it again. …
We are supposed to mention a bunch of keywords and explain how they work together to make the magic at this point. Unlike traditional server-side technologies which utilise multi-threaded architecture, the event-driven nature enables Node.JS to work as single threaded. An event loop is utilised to implement the model. But remember that only the main event loop is single threaded, but most of the I/O works run on separate threads, because the I/O APIs in Node.js are asynchronous/non-blocking by design. …
I’ve been utilising technology to keep my work-life balance for a while. Since android is my daily driver, I’ll share 5 android apps which helped me to save time and increase productivity.
This nifty note taking tool helps me to organise my ideas and notes. Keeping notes was a hefty task for me, because I get’s new ideas all the time and spends precious brain space to memorise it. With simple bulletin based design, workflowy does the heavy lifting for me these days. If you want a more feature rich solution(with increased complexity, of-course), you can try Notion too.
At first time when I was heard about serverless functions, I was super-excited. But then I realised the fact that setting it up for the first time in AWS takes a little bit of more time and effort than my expectations. Then I heard about Netlify supports lambda functions, and decided to give it a try. Surprisingly, the process was super simple, and my serverless function was up and running within minutes!
Let me walk you through what I did.
A few months before, I realized a need of sharing my reads(mostly medium posts) to public. I am very picky about them, so sharing will definitely help out other web developers. That’s how The Web Club telegram channel was born!
The process was like: investing some time to find a good article on medium, read through and confirm usefulness, copy-paste URL and article name to The Web Club. Along with that, added some post’s for #inspiration, mostly from CSS Design Awards site of the day. This process quickly became a routine.
But the copy-paste job was really boring. Like, if I want to create a post from medium : 1. select title, 2. ctrl + c, 3. go to channel, 4. paste it, 5. come back to medium… Whoa! The process is too long and boring, plus I’ve do it daily!! The first thing that came into my mind was Chrome Extensions. …
While doing Google Udacity Challenge Scholarship for Mobile Web Specialist track, I happened to know about Background Sync. A technology that can be used do things even after web app is closed! Voila!! The gap between native apps and web apps is getting thin day by day. And, this is a huge step forward. But how can we use it in our favour?
In the application level, the process can be concluded in this way: queue events within the browser, that will fire in your Service Worker when the browser has network connectivity. …
I’ll never forget the moment, which I found that mail saying “you have been accepted into the Google India Challenge Scholarship”. Words are not enough to express that feeling. …
It’s time to become that ultimate IndexedDB Ninja everyone dreams to be! But it is impossible without reading Taming IndexedDB [1/3] and Taming IndexedDB [2/3]. If you covered that already, it’t time to the finale!!
If you are reading this series from the beginning, you may recall the term ‘Index’.
Index is a kinda object store for organizing data for another object store. For example, if you’re storing users, you may want to fetch them later by their name or favorite movies.
Indexes kicks in if we want only a subset of the data based on a particular property. It is possible to create an index of any property, and then fetch data according to it rather than depending on primary keys. …
In last session, we setup a database and created an object store within. If you feel this strange, feel free to read Taming IndexedDB — Part 1. Else, lets get moving!
Read, write and delete operations can be performed using
delete respectively. Makes sense, right?
As I mentioned before,
get is used to read data from object stores. It should be used within a transaction. As this is for just reading data, a
readonly transactions makes sense.
var tx = db.transaction('store', 'readonly');
var store = tx.objectStore('store');
The code above returns data with primary key ‘sandwich’. What if we want to fetch everything out of an object store?
getAll is here to rescue! …
All of it changed suddenly, once I got enrolled into Google Udacity Challenge Scholarship in Mobile Web Specialist track. I was skeptical about the encounter, but trust me, taming IndexedBD is not that hard. …