4 月 242024
 

Source: Python Program to Get Hostname

Overview

Python offers a wide range of networking-related applications. It is frequently used by developers as a means of communication with other users on your network. Hence, these communications require the hostname in Python. The hostname is the name that is provided to a device to identify it in a local network. Basically, by using the hostname, the machines can communicate within a network. In this article, we will learn about the Python get hostname function and various ways for the same.

Continue reading »
4 月 232024
 

Source: 什麼是 CAP 理論

CAP 理論是指在一個分散式系統中,當涉及讀寫操作時,只能保證一制性(Consistence)、可用性(Availability)、分區容錯性(Partition Tolerance)三者中的兩個,剩下的一個必須被犧牲。

  • 一制性 Consistency:對某個 Client 來說,讀操作保證能夠返回最新寫操作的結果。
  • 可用性 Availability:非故障節點能在合理的時間內返回合理地響應(不是錯誤和超時的響應)。
  • 分區容錯性 Partition Tolerance:當出現分區時(封包遺失、連接中斷、塞車等),系統能夠繼續履行職責(返回 Reasonable Response)。
Continue reading »