ByteByteGo 2024年07月13日
EP120: What do version numbers mean?
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本篇文章深入探讨了软件开发中两个重要概念:并发(Concurrency)和并行(Parallelism)。文章从语义版本控制(SemVer)的介绍开始,解释了版本号的含义,并以实际案例展示了版本号的更新流程。随后,文章重点介绍了并发和并行的区别,并解释了它们在软件开发中的应用场景。最后,文章还推荐了 Jobright.ai 这个免费的 AI 工具,可以帮助求职者获得更多面试机会。

🤔 **语义版本控制(SemVer)**: 语义版本控制是一种用于软件版本控制的方案,它通过一个三部分的版本号来表达软件的更新内容:MAJOR.MINOR.PATCH。 * MAJOR 版本:当软件出现了不兼容的 API 变化时,MAJOR 版本号会增加。 * MINOR 版本:当软件添加了向后兼容的功能时,MINOR 版本号会增加。 * PATCH 版本:当软件修复了向后兼容的 bug 时,PATCH 版本号会增加。 例如,一个初始版本为 0.1.0 的软件,在发布第一个稳定版本时,版本号会更新为 1.0.0。随后,如果需要修复 bug,版本号会更新为 1.0.1。如果添加了新功能,版本号会更新为 1.1.0。如果出现了不兼容的 API 变化,版本号会更新为 2.0.0。 SemVer 还支持预发布版本和构建元数据。预发布版本用于标记尚未发布的版本,例如 1.0.0-alpha,1.0.0-beta,1.0.0-rc.1。构建元数据用于标记构建版本,例如 1.0.0+20130313144700。

💻 **并发与并行**: 并发和并行是软件开发中经常被混淆的两个概念。简单来说,并发是指多个任务在同一时间段内被处理,但它们并非同时执行。而并行是指多个任务在同一时间点上被执行。 举个例子,在一个单核处理器上,多个任务可以通过时间片轮转的方式来实现并发。而在一个多核处理器上,多个任务可以同时执行,实现并行。 在实际应用中,并发和并行通常结合使用。例如,在一个 Web 服务器上,多个用户可以同时访问网站,但服务器可以通过线程池来实现并发处理,并通过多核处理器来实现并行处理。

🚀 **Jobright.ai:免费 AI 工具助你求职**: Jobright.ai 是一款由 Eric Cheng 团队开发的免费 AI 工具,旨在帮助求职者获得更多面试机会。该工具具有以下特点: * 聚合所有工作机会:Jobright.ai 收集了超过 800 万个工作机会,每天新增 40 万个。 * 匹配合适机会:该工具可以根据你的技能和经验,匹配最适合你的工作机会。 * 生成定制简历:Jobright.ai 可以根据每个工作机会,自动生成定制化的简历。 * 建议推荐人:该工具可以自动推荐你过去的同事或校友,帮助你获得推荐机会。

🔐 **网络安全基础**: 文章中还介绍了网络安全基础知识,包括 CIA 三元组(机密性、完整性、可用性)、常见的网络安全威胁和基本的防御机制。 * CIA 三元组:机密性是指保护信息不被未经授权的人访问。完整性是指确保信息不被篡改。可用性是指确保信息随时可用。 * 常见的网络安全威胁:常见的网络安全威胁包括恶意软件、网络钓鱼、拒绝服务攻击等。 * 基本防御机制:基本的防御机制包括防火墙、反病毒软件、加密等。

🏗️ **Kubernetes(k8s)**: 文章还介绍了 Kubernetes(k8s)的概念。Kubernetes 是一种容器编排系统,用于容器的部署和管理。它是由 Google 内部系统 Borg 演变而来。 * Kubernetes 集群:一个 Kubernetes 集群由多个工作节点(Node)组成,每个工作节点运行容器化应用程序。 * Pod:Pod 是 Kubernetes 中管理的最小单元,它包含一组容器。 * 控制平面:控制平面管理 Kubernetes 集群中的工作节点和 Pod。控制平面通常运行在多个计算机上,以提供容错性和高可用性。 * 控制平面组件: * API Server:API Server 与 Kubernetes 集群中的所有组件通信。 * Scheduler:Scheduler 监视 Pod 的工作负载,并将负载分配给新创建的 Pod。 * Controller Manager:Controller Manager 运行控制器,包括 Node Controller、Job Controller、EndpointSlice Controller 和 ServiceAccount Controller。 * etcd:etcd 是一个键值存储,用作 Kubernetes 的所有集群数据的备份存储。 * 工作节点组件: * Kubelet:Kubelet 是一个运行在每个工作节点上的代理,它确保 Pod 中的容器正在运行。 * Kube Proxy:Kube Proxy 是一个运行在每个工作节点上的网络代理,它路由从服务进入工作节点的流量,并将请求转发到正确的容器。

This week’s system design refresher:


✂️Cut your QA cycles down to minutes with automated testing (Sponsored)

Are slow test cycles bottlenecking your dev teams’ release velocity? With QA Wolf, your organization can run entire test suites in minutes for faster feedback and developer confidence to ship.

QA Wolf takes testing off your plate. They can get you:

The benefit? No more manual E2E testing. No more slow QA cycles. No more bugs reaching production.

With QA Wolf, Drata’s team of 80+ engineers achieved 4x more test cases and 86% faster QA cycles.

?Rated 4.8/5 on G2

Schedule a demo to learn more


Concurrency Vs Parallelism!


What do version numbers mean?

Semantic Versioning (SemVer) is a versioning scheme for software that aims to convey meaning about the underlying changes in a release.


Latest articles

If you’re not a paid subscriber, here’s what you missed.

    A Crash Course on Distributed Systems

    A Crash Course in Database Scaling Strategies

    A Crash Course in Database Sharding

    A Crash Course on Microservice Communication Patterns

    A Crash Course on Cell-based Architecture

To receive all the full articles and support ByteByteGo, consider subscribing:

Subscribe now


Looking for a Job? This Free AI Tool Can Get You More Interviews!

If you're looking for a job, you should check this out.

My good friend Eric Cheng and his team have built a fantastic AI tool called Jobright.ai that makes your job search much easier.

Here are some great features I wish I had when I was job hunting

Try Jobright for Free


Cybersecurity 101 in one picture

    Introduction to Cybersecurity

    The CIA Triad

    Common Cybersecurity Threats

    Basic Defense Mechanisms
    To combat these threats, several basic defense mechanisms are employed:

      Firewalls: Network security devices that monitor and control incoming and outgoing network traffic.

      Antivirus Software: Programs designed to detect and remove malware.

      Encryption: The process of converting information into a code to prevent unauthorized access.

    Cybersecurity Frameworks


What is k8s (Kubernetes)?

k8s is a container orchestration system. It is used for container deployment and management. Its design is greatly impacted by Google’s internal system Borg.

A k8s cluster consists of a set of worker machines, called nodes, that run containerized applications. Every cluster has at least one worker node.

The worker node(s) host the Pods that are the components of the application workload. The control plane manages the worker nodes and the Pods in the cluster. In production environments, the control plane usually runs across multiple computers and a cluster usually runs multiple nodes, providing fault-tolerance and high availability.


SPONSOR US

Get your product in front of more than 500,000 tech professionals.

Our newsletter puts your products and services directly in front of an audience that matters - hundreds of thousands of engineering leaders and senior engineers - who have influence over significant tech decisions and big purchases.

Space Fills Up Fast - Reserve Today

Ad spots typically sell out about 4 weeks in advance. To ensure your ad reaches this influential audience, reserve your space now by emailing hi@bytebytego.com

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

并发 并行 软件开发 语义版本控制 SemVer Jobright.ai 网络安全 Kubernetes k8s
相关文章