Imran Hossain (@ih060899) header
Imran Hossain (@ih060899) profile picture

A self-learning programmer, hardworking, passionate, great communication, quick learner and a thirst for new knowledge

Dhaka, Bangladesh
Joined September 2020
Imran Hossain retweeted
My favorite Java Libraries: 5. Eclipse Collections @EclipseCollect 4. Record Builder 3. MapStruct @GetMapStruct 2. Hypersistence Utils by @vlad_mihalcea 1. ArchUnit @archtests What are your favorite libs? youtube.com/watch?v=sHZGv0Pk…
3
36
1
172
13,079
Imran Hossain retweeted
What distinguishes MVC, MVP, MVVM, MVVM-C, and VIPER architecture patterns from each other? These architecture patterns are among the most commonly used in app development, whether on iOS or Android platforms. Developers have introduced them to overcome the limitations of earlier patterns. So, how do they differ? - MVC, the oldest pattern, dates back almost 50 years - Every pattern has a "view" (V) responsible for displaying content and receiving user input - Most patterns include a "model" (M) to manage business data - "Controller," "presenter," and "view-model" are translators that mediate between the view and the model ("entity" in the VIPER pattern) - These translators can be quite complex to write, so various patterns have been proposed to make them more maintainable Over to you: keep in mind that this is not an exhaustive list of architectural patterns. Other notable patterns include Flux and Redux. How do they compare to the ones mentioned here? -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/42Ex9oZ
13
303
10
1,177
152,611
Imran Hossain retweeted
Why is PostgreSQL voted as the most loved database by developers? The diagram shows the many use cases by PostgreSQL - one database that includes almost all the use cases developers need. OLTP (Online Transaction Processing) We can use PostgreSQL for CRUD (Create-Read-Update-Delete) operations. OLAP (Online Analytical Processing) We can use PostgreSQL for analytical processing. PostgreSQL is based on HTAP (Hybrid transactional/analytical processing) architecture, so it can handle both OLTP and OLAP well. 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. Streaming PipelineDB is a PostgreSQL extension for high-performance time-series aggregation, designed to power real-time reporting and analytics applications. 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. 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. Distributed Tables CitusData scales Postgres by distributing data & queries. -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/42Ex9oZ
18
188
6
882
113,972
Imran Hossain retweeted
What does a typical microservice architecture look like? The diagram below shows a typical microservice architecture. Load Balancer: This distributes incoming traffic across multiple API gateway instances for high availability. CDN (Content Delivery Network): CDN is a group of geographically distributed servers that hold static content for faster delivery. The clients look for content in CDN first, then progress to backend services. API Gateway: This handles incoming requests and routes them to the relevant services. It talks to the identity provider and service discovery. Identity Provider: This handles authentication and authorization for users. Service Registry & Discovery: Microservice registration and discovery happen in this component, and the API gateway looks for relevant services in this component to talk to. Management: This component is responsible for monitoring the services. Microservices: Microservices are designed and deployed in different domains. Each domain has its own database. The API gateway talks to the microservices via REST API or other protocols, and the microservices within the same domain talk to each other using RPC (Remote Procedure Call). Benefits of microservices: - They can be quickly designed, deployed, and horizontally scaled. - Each domain can be independently maintained by a dedicated team. - Business requirements can be customized in each domain and better supported, as a result. Quick questions: 1). What are the drawbacks of the microservice architecture? 2). Have you seen a monolithic system be transformed into microservice architecture? How long does it take? -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/42Ex9oZ
14
209
4
944
130,791
Imran Hossain retweeted
Understanding Database Types To make the best decision for our projects, it is essential to understand the various types of databases available in the market. – Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/42Ex9oZ
7
186
1
722
78,721
Imran Hossain retweeted
How does HTTPS work? Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP.) HTTPS transmits encrypted data using Transport Layer Security (TLS.) If the data is hijacked online, all the hijacker gets is binary code. How is the data encrypted and decrypted? Step 1 - The client (browser) and the server establish a TCP connection. Step 2 - The client sends a “client hello” to the server. The message contains a set of necessary encryption algorithms (cipher suites) and the latest TLS version it can support. The server responds with a “server hello” so the browser knows whether it can support the algorithms and TLS version. The server then sends the SSL certificate to the client. The certificate contains the public key, hostname, expiry dates, etc. The client validates the certificate. Step 3 - After validating the SSL certificate, the client generates a session key and encrypts it using the public key. The server receives the encrypted session key and decrypts it with the private key. Step 4 - Now that both the client and the server hold the same session key (symmetric encryption), the encrypted data is transmitted in a secure bi-directional channel. Why does HTTPS switch to symmetric encryption during data transmission? There are two main reasons: 1. Security: The asymmetric encryption goes only one way. This means that if the server tries to send the encrypted data back to the client, anyone can decrypt the data using the public key. 2. Server resources: The asymmetric encryption adds quite a lot of mathematical overhead. It is not suitable for data transmissions in long sessions. Over to you: how much performance overhead does HTTPS add, compared to HTTP? –- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/42Ex9oZ
20
434
5
1,826
268,242
Imran Hossain retweeted
Popular Interview Question: What happens when you type a URL into your browser? The diagram below illustrates the steps. 1. Bob enters a URL into the browser and hits Enter. In this example, the URL is composed of 4 parts: 🔹 scheme - http://. This tells the browser to send a connection to the server using HTTP. 🔹 domain - example .com. This is the domain name of the site. 🔹 path - product/electric. It is the path on the server to the requested resource: phone. 🔹 resource - phone. It is the name of the resource Bob wants to visit. 2. The browser looks up the IP address for the domain with a domain name system (DNS) lookup. To make the lookup process fast, data is cached at different layers: browser cache, OS cache, local network cache, and ISP cache. 2.1 If the IP address cannot be found at any of the caches, the browser goes to DNS servers to do a recursive DNS lookup until the IP address is found (this will be covered in another post). 3. Now that we have the IP address of the server, the browser establishes a TCP connection with the server. 4. The browser sends an HTTP request to the server. The request looks like this: 𝘎𝘌𝘛 /𝘱𝘩𝘰𝘯𝘦 𝘏𝘛𝘛𝘗/1.1 𝘏𝘰𝘴𝘵: 𝘦𝘹𝘢𝘮𝘱𝘭𝘦.𝘤𝘰𝘮 5. The server processes the request and sends back the response. For a successful response (the status code is 200). The HTML response might look like this: 𝘏𝘛𝘛𝘗/1.1 200 𝘖𝘒 𝘋𝘢𝘵𝘦: 𝘚𝘶𝘯, 30 𝘑𝘢𝘯 2022 00:01:01 𝘎𝘔𝘛 𝘚𝘦𝘳𝘷𝘦𝘳: 𝘈𝘱𝘢𝘤𝘩𝘦 𝘊𝘰𝘯𝘵𝘦𝘯𝘵-𝘛𝘺𝘱𝘦: 𝘵𝘦𝘹𝘵/𝘩𝘵𝘮𝘭; 𝘤𝘩𝘢𝘳𝘴𝘦𝘵=𝘶𝘵𝘧-8 <!𝘋𝘖𝘊𝘛𝘠𝘗𝘌 𝘩𝘵𝘮𝘭> <𝘩𝘵𝘮𝘭 𝘭𝘢𝘯𝘨="𝘦𝘯"> 𝘏𝘦𝘭𝘭𝘰 𝘸𝘰𝘳𝘭𝘥 </𝘩𝘵𝘮𝘭> 6. The browser renders the HTML content. -- Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/42Ex9oZ
15
201
4
975
135,540
Imran Hossain retweeted
Do you know all the components of a URL? Uniform Resource Locator (URL) is a term familiar to most people, as it is used to locate resources on the internet. When you type a URL into a web browser's address bar, you are accessing a "resource", not just a webpage. URLs comprise several components: 🔹The protocol or scheme, such as http, https, and ftp. 🔹The domain name and port, separated by a period (.) 🔹The path to the resource, separated by a slash (/) 🔹The parameters, which start with a question mark (?) and consist of key-value pairs, such as a=b&c=d. 🔹The fragment or anchor, indicated by a pound sign (#), which is used to bookmark a specific section of the resource. — Get a Free System Design PDF (158 pages) by subscribing to our weekly newsletter today: bit.ly/42Ex9oZ
4
95
468
63,936
Imran Hossain retweeted
Next week, we will talk about: 1. Building Resilient Payment Systems 2. Types of Testing 3. What is a Firewall 4. Netflix API architecture 5. What is Kubernetes – Get a Free System Design PDF by subscribing to our weekly newsletter today: bit.ly/42Ex9oZ
1
130
643
84,718
Imran Hossain retweeted
Amazing illustration of how to build a resilient three-tier architecture on AWS. Image Credit: @Ankit__Jodhani – Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/42Ex9oZ
4
190
4
902
105,908
Imran Hossain retweeted
New Post: Adding a Column of Values in a Tab Delimited File in Linux buff.ly/3LTICrF
2
5
Keep your coding skills sharp by solving programming challenges hr.gs/bedcab on @HackerRank #programming
1