graph TD
a[("snaphsot3(active)")] --> b[("snaphsot2(committed)")]
b --> c[("snaphsot1(committed)")]
c --> d[("snaphsot0(committed)")]
graph LR
subgraph a[Clients]
a1[kubectl]
a2[docker]
a3[ctr]
end
subgraph b[Container engine]
b1[kubernetes]
b2[dockerd]
指令 | 儲存 | 能否並行 |
---|---|---|
docker build |
基於 containerd 的原始 content,透過 Dockerfile 定義去操作 content | layer by layer,無法並行建構 |
docker buildx build |
基於 containerd 的 content 抽象層 snapshot,透過一個後端服務 (LLB) 來操作 snapshot,得益於 snapshot 的特性,可以拿來建構更複雜更有彈性的依賴結構 | 資料結構是 DAG,相同 parent 的 node 可以並行建構 |
Shakespeare Sonnet++ Overload: 2015-10-21
Incident management info: https://incident-management-cheat-sheet
(Communications lead to keep summary updated.)
Summary: Shakespeare search service in cascading failure due to newly discovered sonnet not in search index.
Status: active, incident #465
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EntityMeta(type): | |
"""Metaclass for business entities with validated fields""" | |
def __init__(cls, name, bases, attr_dict): | |
# handover to type.__init__ | |
super().__init__(name, bases, attr_dict) | |
for key, attr in attr_dict.items(): | |
if isinstance(attr, Validated): | |
type_name = type(attr).__name__ | |
attr.storage_name = f'_{type_name}#{key}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def record_factory(cls_name, field_names): | |
try: | |
field_names = field_names.replace(',', ' ').split() | |
except AttributeError: | |
pass | |
filed_names = tuple(field_names) | |
def __init__(self, *args, **kwargs): | |
attrs = dict(zip(self.__slots__, args)) | |
attrs.update(kwargs) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Quantity: | |
__counter = 0 | |
def __init__(self): | |
cls = self.__class__ | |
self.storage_name = f'_{cls.__name__}#{cls.__counter}' | |
cls.__counter += 1 | |
def __get__(self, instance, owner): # `owner` is the ref of the managed class | |
if instance is None: |
NewerOlder