The document discusses how handshake joins could be used by soccer players to perform stream joins in a scalable and parallel manner. Handshake joins involve streams flowing past each other in opposite directions, with each core locally evaluating tuples as they pass through. This approach allows for very high degrees of parallelism across multiple cores, CPUs, and specialized hardware like FPGAs. The method uses techniques like two-phase forwarding and load balancing to process tuples in an online, symmetric, and distributed way.
1. A suffix array is an array containing all suffixes of a string sorted in lexicographic order. It allows for efficient string searches, including prefix searches, substring searches, and near neighbor searches.
2. The suffix array can be used to find the starting positions of all occurrences of a pattern or substring within the text in time linear to the pattern length. It supports finding the longest common prefix between two strings in constant time.
3. Suffix arrays are useful for text indexing and string searching, including applications like full text search, bioinformatics, data compression, string mining, and more. They allow locating patterns in strings and calculating similarities between strings.
This document discusses MongoDB's oplog and logging operations. It covers:
1. The createOplog function which creates the oplog as a capped collection in the local database.
2. The logOp function which logs operations to the oplog in BSON format with fields like timestamp, operation type, namespace, and operation object.
3. The _logOp and _logOpOld functions which handle actually writing to the oplog, with _logOpOld writing directly to the data file.
The document discusses how handshake joins could be used by soccer players to perform stream joins in a scalable and parallel manner. Handshake joins involve streams flowing past each other in opposite directions, with each core locally evaluating tuples as they pass through. This approach allows for very high degrees of parallelism across multiple cores, CPUs, and specialized hardware like FPGAs. The method uses techniques like two-phase forwarding and load balancing to process tuples in an online, symmetric, and distributed way.
1. A suffix array is an array containing all suffixes of a string sorted in lexicographic order. It allows for efficient string searches, including prefix searches, substring searches, and near neighbor searches.
2. The suffix array can be used to find the starting positions of all occurrences of a pattern or substring within the text in time linear to the pattern length. It supports finding the longest common prefix between two strings in constant time.
3. Suffix arrays are useful for text indexing and string searching, including applications like full text search, bioinformatics, data compression, string mining, and more. They allow locating patterns in strings and calculating similarities between strings.
This document discusses MongoDB's oplog and logging operations. It covers:
1. The createOplog function which creates the oplog as a capped collection in the local database.
2. The logOp function which logs operations to the oplog in BSON format with fields like timestamp, operation type, namespace, and operation object.
3. The _logOp and _logOpOld functions which handle actually writing to the oplog, with _logOpOld writing directly to the data file.
4. Raftが提供するもの
❖ 協調して合意を取る枠組み!
❖ リーダー選出!
❖ (ログ)レプリケーション!
❖ State machine replication!
❖ 異常系はある程度Raftが面倒を見る!
❖ 合意を取って何をするかは
アプリケーションにお任せ
Raft cluster
全ノードが同じ状態を維持
同じ状態を冗長化して可用性UP
R
R R
R R
4
Leader
Follower
15. 問題1: 全ノードがRaftのノードとして動く
I
I
II
II
II
R
R
R
R
R
R
R
R
❖ 頻繁な1対全の通信!
❖ Heartbeat: 数10ms単位!
❖ 合意コスト増
“CPU and networking resources can
quickly be bottlenecked under stress
in a large cluster.”
“It is unlikely that 4 nodes will
simultaneously fail so clusters larger
than 9 nodes are not common.”
15
16. 妄想: 将来の構成
I
I I
I I
R
R
R
or
I
I I
I I
部分的にRaftノードとして機能
Raftを別クラスタで運用
タイムアウトがシビアなので!
こっちの方が良さそう。
R
R R
16
17. 問題2: ReadにRaftを使ってない
❖ RaftではLeaderとFollowerでコミットのタイミングが違う!
❖ Followerが持っている情報を読んではいけない!
❖ Leaderが持っている情報も、本当は直接読んじゃダメ!
❖ 自分の書いた値を読めないことがある!
❖ 読み込みもRaftのコマンドとして実行することで解決
R
R
R
この状態でLeaderが切り替わった瞬間に!
直readが発生すると、元々コミット済みだった!
情報を読めない。レアだが、実際に起こると!
非常に原因を特定しづらい。殺人事件に発展!
することもあるため注意が必要だ。
未コミットコミット済み 17