When the amount of data gets too large for our databases, it’s natural that we consider scaling them to cope with the increased load. However, depending on whether it is a SQL or NoSQL database, the techniques and principles behind scaling are different. We’ll be exploring the main ideas behind scalability for both databases. Since this article assumes some fundamental knowledge about databases and their properties, it would be helpful to review SQL/NoSQL databases.
Before we jump in, let’s understand the differences between the two types of scaling.
…
SQL stands for Structured Query Language. When people refer to SQL Databases, they’re actually referring to Relational Database Management System (RDBMS).
Data is stored in the form of tables. Each row is uniquely identified by a primary key and each row can also have a foreign key, which is the primary key of another table. Through the foreign key, a relation is formed with another table — hence the notion of relational databases.
Examples of SQL databases include MySQL, PostgreSQL and Oracle…
In a monolithic architecture, clients typically make requests to one single server. As the number of requests starts to scale, the single server does not have sufficient capacity to serve all the incoming requests.
Vertical scaling could be an option, where more CPU/RAM is added to the servers. This option could work for only so long before the hardware limitations are encountered.
In most cases, horizontal scaling, in which more servers are added, is usually a more scalable alternative.
Recently, I came across a usage of authentication with JWT in the codebase at work. I was curious to figure out the mechanism difference between JWT and the standard session token/IDs, especially since JWT has been increasingly popular in recent times.
HTTP is a stateless protocol, which simply means the current client request is independent of any previous requests, and the server doesn’t have any knowledge of any prior requests.
For example, if you’re simple fetching static data, such as going to www.facebook.com
, the servers don’t really need to know who the client is since they’re returning a log-in page…
Often times, we need to render a child view dynamically. For instance, we might have a parent view that has a tab menu, and we’d like to render the views in accordance with whichever tab is being selected.
Being new to Angular, this is something I experience, and it took me a fair amount of time to get the implementation working despite following the official Angular guide. Reading Maxim Koretskyi’s article on DOM manipulation definitely helped my understanding, so I’ll recommend you give it a read, too, if you want more in-depth explanations.
In this piece, I’ll highlight and summarize…
As junior engineers, most of us have an inherent desire to build things from scratch and take more control over our code. When working with arrays and objects in JavaScript, some of us might prefer to use a for loop to iterate through the elements or keys while performing some form of logic. Well, doing so is not necessarily wrong — control loops were one of the first few things we learnt in CS classes. …
If you’re working with Javascript, chances are you might have encountered a situation where you have had to access a deeply nested object. If everything goes well, you get your data without any problems. That’s great!
However, in reality, we are not always guaranteed that the data exists, but mistakenly assume that it does. I have been in that position multiple times and I often find myself thinking: “How could that value not be populated?”
Thankfully, all we need to prevent these pesky errors is an additional check for undefined
values.
For those folks who are fortunate to not have…
This article is a product of a final project from a course NM3239 (Retrieving, Exploring, and Analysing Data) in the National University of Singapore. Since this is a Communications and New Media class, we hope our readers extend some grace when it comes to the data science process. All analyses and plots were generated in R Studio. You can check out my Github repo here.
On 12th September 2017, the Apple Event caused the share price of Energous, a wireless charging company, to drop as much as 21%. This decline in share price was induced by Apple’s latest announcement that…
Excited about living my best life and becoming a better engineer. I like taking complex ideas and breaking them down.