christova

Tech Articles โ€“ (please note these posts are collated from AmigosCode, Alex Xu and many others. Full copyright to the owners of their material)

Things Every Developer Should Know:

Concurrency is ๐๐Ž๐“ parallelism.

In system design, it is important to understand the difference between concurrency and parallelism.

As Rob Pyke(one of the creators of GoLang) stated:โ€œ Concurrency is about ๐๐ž๐š๐ฅ๐ข๐ง๐  ๐ฐ๐ข๐ญ๐ก lots of things at once. Parallelism is about ๐๐จ๐ข๐ง๐  lots of things at once.โ€ This distinction emphasizes that concurrency is more about the ๐๐ž๐ฌ๐ข๐ ๐ง of a program, while parallelism is about the ๐ž๐ฑ๐ž๐œ๐ฎ๐ญ๐ข๐จ๐ง.

Concurrency is about dealing with multiple things at once. It involves structuring a program to handle multiple tasks simultaneously, where the tasks can start, run, and complete in overlapping time periods, but not necessarily at the same instant.

Concurrency is about the composition of independently executing processes and describes a program's ability to manage multiple tasks by making progress on them without necessarily completing one before it starts another.

Parallelism, on the other hand, refers to the simultaneous execution of multiple computations. It is the technique of running two or more tasks or computations at the same time, utilizing multiple processors or cores within a computer to perform several operations concurrently. Parallelism requires hardware with multiple processing units, and its primary goal is to increase the throughput and computational speed of a system.

In practical terms, concurrency enables a program to remain responsive to input, perform background tasks, and handle multiple operations in a seemingly simultaneous manner, even on a single-core processor. It's particularly useful in I/O-bound and high-latency operations where programs need to wait for external events, such as file, network, or user interactions.

Parallelism, with its ability to perform multiple operations at the same time, is crucial in CPU-bound tasks where computational speed and throughput are the bottlenecks. Applications that require heavy mathematical computations, data analysis, image processing, and real-time processing can significantly benefit from parallel execution.

#concurrency #parallelism

What is DevSecOps?

DevSecOps emerged as a natural evolution of DevOps practices with a focus on integrating security into the software development and deployment process. The term โ€œDevSecOpsโ€ represents the convergence of Development (Dev), Security (Sec), and Operations (Ops) practices, emphasizing the importance of security throughout the software development lifecycle. The diagram below shows the important concepts in DevSecOps.

1 . Automated Security Checks

2 . Continuous Monitoring

3 . CI/CD Automation

4 . Infrastructure as Code (IaC)

5 . Container Security

6 . Secret Management

7 . Threat Modeling

8. Quality Assurance (QA) Integration

9 . Collaboration and Communication

10 . Vulnerability Management

#DevSecOps #CICD

Popular interview question: how to diagnose a mysterious process thatโ€™s taking too much CPU, memory, IO, etc?

The diagram above illustrates helpful tools in a Linux system.

โ€˜vmstatโ€™ โ€“ reports information about processes, memory, paging, block IO, traps, and CPU activity.

โ€˜iostatโ€™ โ€“ reports CPU and input/output statistics of the system.

โ€˜netstatโ€™ โ€“ displays statistical data related to IP, TCP, UDP, and ICMP protocols.

โ€˜lsofโ€™ โ€“ lists open files of the current system.

โ€˜pidstatโ€™ โ€“ monitors the utilization of system resources by all or specified processes, including CPU, memory, device IO, task switching, threads, etc.

#linux #LinuxPerformanceTools

Netflix's Tech Stack.

This post is based on research from many Netflix engineering blogs and open-source projects. If you come across any inaccuracies, please feel free to inform us.

Mobile and web: Netflix has adopted Swift and Kotlin to build native mobile apps. For its web application, it uses React.

Frontend/server communication: GraphQL.

Backend services: Netflix relies on ZUUL, Eureka, the Spring Boot framework, and other technologies.

Databases: Netflix utilizes EV cache, Cassandra, CockroachDB, and other databases.

Messaging/streaming: Netflix employs Apache Kafka and Fink for messaging and streaming purposes.

Video storage: Netflix uses S3 and Open Connect for video storage.

Data processing: Netflix utilizes Flink and Spark for data processing, which is then visualized using Tableau. Redshift is used for processing structured data warehouse information.

CI/CD: Netflix employs various tools such as JIRA, Confluence, PagerDuty, Jenkins, Gradle, Chaos Monkey, Spinnaker, Altas, and more for CI/CD processes.

#netflix #TechStack #FullStack

Enter your email to subscribe to updates.