/1 Why is PostgreSQL voted the ๐ฆ๐จ๐ฌ๐ญ ๐ฅ๐จ๐ฏ๐๐ ๐๐๐ญ๐๐๐๐ฌ๐ by Stackoverflow 2022 Developer Survey?
The diagram shows the many use cases by PostgreSQL - one database that includes almost ๐๐ฅ๐ฅ ๐ญ๐ก๐ ๐ฎ๐ฌ๐ ๐๐๐ฌ๐๐ฌ developers need.
/2 ๐นOLTP (Online Transaction Processing)
We can use PostgreSQL for CRUD (Create-Read-Update-Delete) operations.
/3 ๐นOLAP (Online Analytical Processing)
We can use PostgreSQL for analytical processing. PostgreSQL is based on ๐๐๐๐ (Hybrid transactional/analytical processing) architecture, so it can handle both OLTP and OLAP well.
/4 ๐นFDW (Foreign Data Wrapper)
A FDW is an extension available in PostgreSQL that allows us to access a table or schema in one database from another.
/5 ๐นStreaming
PipelineDB is a PostgreSQL extension for high-performance time-series aggregation, designed to power real-time reporting and analytics applications.
/6 ๐นGeospatial
PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects, allowing location queries to be run in SQL.
/7 ๐นTime Series
Timescale extends PostgreSQL for time series and analytics. For example, developers can combine relentless streams of financial and tick data with other business data to build new apps and uncover unique insights.
/8 ๐นDistributed Tables
CitusData scales Postgres by distributing data & queries.
/9 ๐ Over to you: Which database do you like the most?
Twitter has enforced very strict rate limiting. Some people cannot even see their own tweets.
Rate limiting is a very important yet often overlooked topic. Let's use this opportunity to take a look at what it is and the most popular algorithms.
A thread.
#RateLimitExceeded
What is rate limiting? Rate limiting controls the rate at which users or services can access a resource. Here are some examples:
- A user can send a message no more than 2 per second
- One can create a maximum of 10 accounts per day from the same IP address
Fixed Window Counter
The algorithm divides the timeline into fixed-size time windows and assigns a counter for each window. Each request increments the counter by some value. Once the counter reaches the threshold, subsequent requests are blocked until the new time window begins
/1 What is the difference between โpullโ and โpushโ payments?
The diagram below shows how the pull and push payments work.
/2 ๐น When we swipe a credit/debit card at a merchant, it is a pull payment, where the money is sent from the cardholder to the merchant. The merchant pulls money from the cardholderโs account, and the cardholder approves the transaction.
/3 ๐น With Visa Direct or Mastercard Send, the push payments enable merchant, corporate, and government disbursements.
Step 1: The merchant initiates the push payment through a digital channel. It can be a mobile phone or a bank branch etc.
/2 The Netflix Engineering team selects a variety of databases to empower streaming at scale.
Relational databases: Netflix chooses MySql for billing transactions, subscriptions, taxes, etc. They use CockroachDB to support a multi-region active-active architecture.
/3 Columnar databases: Netflix primarily uses them for analytics purposes. They utilize Redshift and Druid for structured data storage, Spark and data pipeline processing, and Tableau for data visualization.
Communication between different software systems can be established using either RPC (Remote Procedure Call) or RESTful (Representational State Transfer) protocols, which allow multiple systems to work together in distributed computing.
/2 The two protocols differ mainly in their design philosophy. RPC enables calling remote procedures on a server as if they were local procedures, while RESTful applications are resource-based and interact with these resources via HTTP methods.
/3 When choosing between RPC and RESTful, consider your application's needs.