Flink Redistributing

tags: Flink Parallel Dataflows Redistributing streams (as between map() and keyBy/window above, as well as between keyBy/window and Sink) change the partitioning of streams. Each operator subtask sends data to different target subtasks, depending on the selected transformation. Examples are keyBy() (which re-partitions by hashing the key), broadcast(), or rebalance() (which re-partitions randomly). In a redistributing exchange the ordering among the elements is only preserved within each pair of sending and receiving subtasks (for example, subtask[1] of map() and subtask[2] of keyBy/window). So, for example, the redistribution between the keyBy/window and the Sink operators shown above introduces non-determinism regarding the order in which the aggregated results for different keys arrive at the Sink. ...

January 4, 2022 · 1 min · Gray King

One-to-one

tags: Flink Parallel Dataflows One-to-one streams (for example between the Source and the map() operators in the figure above) preserve the partitioning and ordering of the elements. That means that subtask[1] of the map() operator will see the same elements in the same order as they were produced by subtask[1] of the Source operator.

January 4, 2022 · 1 min · Gray King

Flink Parallel Dataflows

tags: Flink Streams can transport data between two operators in a one-to-one (or forwarding) pattern, or in a redistributing pattern:

January 4, 2022 · 1 min · Gray King

Stream processing

tags: Flink Stream processing, on the other hand, involves unbounded data streams. Conceptually, at least, the input may never end, and so you are forced to continuously process the data as it arrives.

January 4, 2022 · 1 min · Gray King

Batch processing

tags: Spark Batch processing is the paradigm at work when you process a bounded data stream. In this mode of operation you can choose to ingest the entire dataset before producing any results, which means that it is possible, for example, to sort the data, compute global statistics, or produce a final report that summarizes all of the input.

January 4, 2022 · 1 min · Gray King

Flink实时计算-深入理解 Checkpoint和Savepoint

January 4, 2022 · 0 min · Gray King

知乎:Flink实时计算-深入理解 Checkpoint和Savepoint

tags: Flink,Flink State Snapshots,Flink Checkpoint,Flink Savepoint source: https://zhuanlan.zhihu.com/p/79526638

January 4, 2022 · 1 min · Gray King

GitHub: 像小说一样品读 Linux 0.11 核心代码

tags: Linux source: https://github.com/sunym1993/flash-linux0.11-talk

January 4, 2022 · 1 min · Gray King

Audio: The lost talks from Linus Torvalds at DECUS'94

tags: Linux source: https://archive.org/details/199405-decusnew-orleans/1994050DECUSNewOrleansLinuxImplementationIssuesInLinux.ogg

January 4, 2022 · 1 min · Gray King

Linux

tags: Operating system

January 4, 2022 · 1 min · Gray King

Ethereum: Shard chains

tags: Ethereum,Proof-of-stake source: https://ethereum.org/en/eth2/shard-chains/ Sharding is the process of splitting a database horizontally to spread the load – it’s a common concept in computer science. In an Ethereum context, sharding will reduce network congestion and increase transactions per second by creating new chains, known as “shards”. This is important for reasons other than scalability.

January 4, 2022 · 1 min · Gray King

Ethereum: The Beacon Chain

tags: Ethereum,Proof-of-stake source: https://ethereum.org/en/eth2/beacon-chain/ Extra coordination for the Ethereum: Shard chains. The beacon chain receives state information from shards and makes it available for other shards, allowing the network to stay in sync. The beacon chain will also manage the validators from registering their stake deposits to issuing their rewards and penalties.

January 4, 2022 · 1 min · Gray King

How does Ethereum's proof-of-stake work?

tags: Ethereum,Proof-of-stake source: https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/#how-does-pos-work When you submit a transaction on a shard, a validator will be responsible for adding your transaction to a shard block. Validators are algorithmically chosen by Ethereum: The Beacon Chain to propose new blocks. Attestation If a validator isn’t chosen to propose a new shard block, they’ll have to attest to another validator’s proposal and confirm that everything looks as it should. It’s the attestation that is recorded in the beacon chain rather than the transaction itself. ...

January 4, 2022 · 2 min · Gray King

ETH

tags: Ethereum

January 4, 2022 · 1 min · Gray King

Proof-of-history

tags: Blockchain Proof,Solana,Proof-of-stake Solana is a Proof of Stake network. This short phrase - “Proof of Stake” - represents a much larger concept with considerable complexity behind it, and even more so for Solana, which adds the unique properties of Proof of History to the mix to enable fast, low-latency transactions while still maintaining censorship resistance.

January 4, 2022 · 1 min · Gray King

Proof-of-stake

tags: Blockchain,Blockchain Proof,Ethereum,Solana source: https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/ Proof workflow: Users stake money(ETH) to become a validator. Validators are chosen at random to create blocks and are responsible for checking and confirming blocks they don’t create. user’s stake is also used as a way to incentivise good validator behavior. For example, a user can lose a portion of their stake for things like going offline (failing to validate) or their entire stake for deliberate collusion. ...

January 4, 2022 · 1 min · Gray King

Proof-of-work

tags: Blockchain Proof,Blockchain,Ethereum source: https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/ Wikipedia: https://en.wikipedia.org/wiki/Proof%5Fof%5Fwork A key feature of proof-of-work schemes is their asymmetry: the work – the computation – must be moderately hard (yet feasible) on the prover or requester side but easy to check for the verifier or service provider. With a hash function, let’s say SHA-1. For example, to do PoW, we need to generate a SHA-1 hash of the given data that must begins 52 binary zeros, that is 13 hexadecimal zeros: ...

January 4, 2022 · 1 min · Gray King

Blockchain Proof

tags: Blockchain

January 4, 2022 · 1 min · Gray King

Shinobi Systems' Solana Proof of Stake + Proof of History Primer

tags: Blockchain,Solana,Proof-of-stake,Proof-of-history source: “Shinobi Systems’ Solana Proof of Stake + Proof of History Primer.” Accessed January 5, 2022. https://www.shinobi-systems.com/primer.html.

January 4, 2022 · 1 min · Gray King

Blockchain Demo

tags: Video: Blockchain 101 - A Visual Demo,区块链, Online Tools source: https://andersbrownworth.com/blockchain/hash

January 3, 2022 · 1 min · Gray King

Video: Blockchain 101 - A Visual Demo

tags: 区块链 source: https://youtu.be/%5F160oMzblY8 It’s like Git but not support merge. The progress of changing blocks like git rebase.

January 3, 2022 · 1 min · Gray King

C/C++ 多态

tags: C/C++ 只能通过抽象类的指针或引用调用动态解析子类函数,虚函数表示需要动态解析,纯虚函数必须被子类覆盖,否则无法实例化。

January 2, 2022 · 1 min · Gray King

JavaScript

tags: Programming Language

January 2, 2022 · 1 min · Gray King

Swift

tags: Programming Language

January 2, 2022 · 1 min · Gray King

《深入理解计算机系统》读书笔记

tags: Computer Systems,读书笔记

January 2, 2022 · 1 min · Gray King

SO: What is the difference between iter and into_iter?

tags: Rust source: https://stackoverflow.com/a/34745885/2873718

January 1, 2022 · 1 min · Gray King

GitHub: Rust Memory Container Cheat-sheet

tags: Rust Wrapper Types,Rust source: Rust Memory Container Cheat-sheet

January 1, 2022 · 1 min · Gray King

Wrapper Types in Rust: Choosing Your Guarantees

tags: Rust,Rust Wrapper Types source: https://manishearth.github.io/blog/2015/05/27/wrapper-types-in-rust-choosing-your-guarantees/

January 1, 2022 · 1 min · Gray King

GitHub: Internal details of Tokio from code to designs

tags: Tokio source: https://github.com/tony612/tokio-internals

January 1, 2022 · 1 min · Gray King

PAPER: Raft

tags: Raft source: https://web.stanford.edu/~ouster/cgi-bin/papers/OngaroPhD.pdf

January 1, 2022 · 1 min · Gray King

PAPER: Time, Clocks, and the Ordering of Events in a Distributed System

tags: 分布式,一致性 source: https://lamport.azurewebsites.net/pubs/time-clocks.pdf The Big Problem The event order in a distributed system. The defination of a distributed system: the order of its events occurred is unpredictable, sometimes it’s impossiable to say a event occurred before another. How this paper try to solve this problem: use a “happened before” relation to define a partial ordering and distributed algorithm. Background

January 1, 2022 · 1 min · Gray King

CSDN: 理解这两点,也就理解了paxos协议的精髓

tags: Paxos source: https://blog.csdn.net/qq%5F35440678/article/details/78080431

January 1, 2022 · 1 min · Gray King

GitHub: raft-rs

tags: Rust,Raft source: https://github.com/tikv/raft-rs

January 1, 2022 · 1 min · Gray King

Raft Understandable Distributed Consensus

tags: Raft,分布式,分布式共识,Online Tools source: http://thesecretlivesofdata.com/raft/

January 1, 2022 · 1 min · Gray King

Distributed consensus (blockchain) simulation and visualization

tags: 分布式共识,Online Tools,区块链 source: https://web3scout.github.io/forcecons-sim/

January 1, 2022 · 1 min · Gray King

Org-roam export backlinks on Hugo

tags: org-roam, Org Mode source: https://seds.nl/notes/org%5Froam%5Fexport%5Fbacklinks%5Fon%5Fhugo/ https://seds.nl/notes/export%5Forg%5Froam%5Fbacklinks%5Fwith%5Fgohugo/ 利用 hugo 的 partial template layouts/partials/backlinks.html {{ $re := $.File.BaseFileName }} {{ $backlinks := slice }} {{ range .Site.AllPages }} {{ if and (findRE $re .RawContent) (not (eq $re .File.BaseFileName)) }} {{ $backlinks = $backlinks | append . }} {{ end }} {{ end }} <hr> {{ if gt (len $backlinks) 0 }} <div class="bl-section"> <h4>Links to this note</h4> <div class="backlinks"> <ul> {{ range $backlinks }} <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> {{ end }} </ul> </div> </div> {{ else }} <div class="bl-section"> <h4>No notes link to this note</h4> </div> {{ end }} 然后插入到的 single.html 就行 ...

December 31, 2021 · 1 min · Gray King

Online Tools

tags: Tools

December 31, 2021 · 1 min · Gray King

RoamResearch

tags: Taking Notes,Online Tools

December 31, 2021 · 1 min · Gray King

Roam: Why I Love It and How I Use It

tags: Learning,Taking Notes source: https://www.nateliason.com/blog/roam

December 31, 2021 · 1 min · Gray King

How To Take Smart Notes: 10 Principles to Revolutionize Your Note-Taking and Writing

tags: Learning,Taking Notes,RoamResearch source: https://fortelabs.co/blog/how-to-take-smart-notes/ Luhmann’s slip-box: build second brain context – its network of associations, relationships, and connections to other information. But Luhmann often remarked that he never forced himself to do anything he didn’t feel like doing: “I only do what is easy. I only write when I immediately know how to do it. If I falter for a moment, I put the matter aside and do something else” (Luhmann et al., 1987, 154f). ...

December 31, 2021 · 2 min · Gray King

How To Take Smart Notes With Org-mode

tags: Learning,Taking Notes,org-roam,Org Mode source: https://blog.jethro.dev/posts/how%5Fto%5Ftake%5Fsmart%5Fnotes%5Forg/ Notes aren’t a record of my thinking process. They are my thinking process. – Richard Feynman The primary purpose of note-taking should not be for storing ideas, but for developing them. When we take notes, we should ask: “In what context do I want to see this note again?” Note-taking for writing: Find topic/research question Research/find literature Read and take notes Draw conclusions / outline text Write Two types of notes: ...

December 31, 2021 · 1 min · Gray King

Learning

December 31, 2021 · 0 min · Gray King

读书笔记

December 10, 2021 · 0 min · Gray King

加解密

证书 [译] 写给工程师:关于证书(certificate)和公钥基础设施(PKI)的一切(SmallStep, 2018)

October 9, 2021 · 1 min · Gray King

英语读音规则

tags: Learning English 一般现在时第三人称单音形规则 一般过去时音形规则

September 25, 2021 · 1 min · Gray King

英语词法

tags: Learning English 比较级 形容词/副词比较级 常规单音节词 -er fast -> faster small -> smaller nice -> nicer large -> larger(删除词尾不发音的 e) -y -> -ier busy -> busier pretty -> prettier 短元音 + 辅音:重写辅音 -er big -> bigger hot -> hotter 多音节: more + diffcult -> more difficult interesting -> more interesting careful /kɛəful/ -> more careful -y 二音节词(-ly副词除外):常不加 more busy -> busier pretty -> prettier quickly -> more quickly 特殊 much/many -> more little -> less good/well -> better bad -> worse 代词比较级 more less 比较级修饰 a little/ a bit + 比较级 更…一点 much / a lot / far + 比较级 更…得多 英语常见词用法 open/close 静态和动态 open When do you open(v.)? 强调动态,时间点 We are open at 9 every day. When are you open(adj.)? 强调静态,时间段 We are open from 9 to 6 every day. close close v. 动态 closed adj. 静态 示例 ...

September 21, 2021 · 3 min · Gray King

流利英语

tags: Learning English 连读 变音 /d/ + /j/ = /dʒj/ Would you like to try int on? /t/ + /j/ = /tʃj/ What about you? 词尾辅音 + 词首元音 It is A glass of water 还原 r RP her ideas Where is it? 语块切割 Chunking 语块(Chunk) 能表达实际含义且语义不割裂的词串。 语块切割(Chunking) 根据说话节奏将句子自然切割为若干语块。 语块语连读 同一语块内能连则连。 吞音 基本原则 同一语块内,音同则吞。 示例 Excuse me, Could you tell me how I can get to Pret A Monger? get to -> geto ...

September 21, 2021 · 1 min · Gray King

英语习语

tags: Learning English Give me a hand come in 有 come in all/different colors/size come on 「随意」鼓动、鼓励、催促 come to 总计 Excuse me 抱歉/引起注意 by the way/BTW 顺便说一下 shame on sb.! sb. 可耻 make it 成功达成 do/try one’s best (to do sth.) 尽最大努力做某事 sure thing no problem. 礼貌请求 礼貌程度 please > please 疑问句 > 肯定句 could > would > can 示例: Show me (please) Can you show me? Can you show me please? Would you show me (please)? Could you show me (please)? 适用场景 ...

September 20, 2021 · 2 min · Gray King

英语语法结构

tags: Learning English 双宾语 例句:I want to buy a birthday gift for my sister. 结构:buy sth. for sb. 双宾语:by sb. sth. buy my sister a birthday gift. Can I buy a drink for you? Can I buy you a drink? 双宾语限制 第二个宾语必须为名词,不能是人称代词(pron.)。 下面语句不能使用双宾语 I want to buy you it.(X) 双宾语动词 bring/give/tell/sell/ask/show Bring it to me Bring me a present. Give it to me Give me the pen. tell the story to me tell me the story email the photo to me email me the photo sell the handbag to her sell her the handbag ask sb. sth. show sb. sth. take the coffee to her: 不能使用 Give me the hand:习语不能使用 宾语从句 I think (that) … 在「一句简单句有且只有一个谓语动词」的基础上实现复杂句。 ...

September 20, 2021 · 3 min · Gray King

英语常用词

tags: Learning English seem 表示似乎 It seems to be very popular nowdays. 用作委婉 背景:the man in the photo。 对比以下两句 He is in good health He seems to be in good health(这句是错的 He seems in good health) 表示犹豫 That’s not right That doesn’t seem right That doesn’t seem to be right

September 20, 2021 · 1 min · Gray King