System Design Concepts - 2

Here we will have a look into remaining important System Design Concepts.


Queues


Redundancy and Replication


SQL vs. NoSQL

SQL Databases
NoSQL Databases


High level differences between SQL and NoSQL


SQL VS. NoSQL - Which one to use ?
Reasons to use SQL Database
  1. We need to ensure ACID compliance as it reduces anomalies and protects the integrity of your database by prescribing exactly how transactions interact with the database. Generally, NoSQL databases sacrifice ACID compliance for scalability and processing speed, but for many e-commerce and financial applications, an ACID-compliant database remains the preferred option.

  2. The data is structured and unchanging and if our business is not experiencing massive growth that would require more servers and if we are only working with data that’s consistent, then there may be no reason to use a system designed to support a variety of data types and high traffic volume.

Reasons to use NoSQL database

When all the other components of our application are fast and seamless, NoSQL databases prevent data from being the bottleneck.

Big data is contributing to a large success for NoSQL databases, mainly because it handles data differently than the traditional relational databases. A few popular examples of NoSQL databases are MongoDB, CouchDB, Cassandra, and HBase.

  1. Storing large volumes of data that often have little to no structure. It sets no limits on the types of data we can store together and allows us to add different new types as the need changes. With document-based databases, you can store data in one place without having to define what “types” of data those are in advance.
  2. Making the most of cloud computing and storage. Cloud-based storage is an excellent cost-saving solution but requires data to be easily spread across multiple servers to scale up. Using commodity (affordable, smaller) hardware on-site or in the cloud saves you the hassle of additional software, and NoSQL databases like Cassandra are designed to be scaled across multiple data centers out of the box without a lot of headaches.
  3. Rapid development. NoSQL is extremely useful for rapid development as it doesn’t need to be prepped ahead of time. If you’re working on quick iterations of your system which require making frequent updates to the data structure without a lot of downtime between versions, a relational database will slow you down.


ACID vs. BASE


HTTP vs Long-Polling vs WebSockets vs Server-Sent Events

All theese are popular communication protocols between a client like a web browser & a web server.

1. HTTP (Hyper Text Transfer Protocol)

2. Ajax Poling

3. HTTP Long-Polling

4. WebSockets

5. Sever-Sent Events (SSEs)



Other Concepts

Optimistic vs. Pessimistic Locking
Strong vs. Eventual Consistency
Data-centres / Racks / Hosts
CPU / Memory / Hard-Drive / Network Bandwidth
Random vs. Sequential Read/Write on Disk
HTTP vs. HTTP2 vs. Web-Sockets
TCP/IP Model

IPv4 vs. IPv6
TCP vs. UDP
DNS Lookup
HTTPs & TLS
Public Key Infrastructure & Certificate Authority
Symmetric vs. Asymmetric Encryption
Load Balancers L4 vs. L7
CDNs & EDGE
Bloom Filters & Count-Min Sketch
Paxos: Consensus over Distributed Hosts
Design Patterns & Object-Oriented Design
Virtual Machines & Containers
Publisher-Subscriber OR Queue Bases
Map-Reduce
Multi-threading, Concurrency, Locks, Synchronization, CAS (Compare and Swap)




← Previous: System Design Concepts - 1

Next: Step by Step Guide →