git clone https://github.com/yugabyte/yugabyte-db.git
cd yugabyte-db
This file contains hidden or 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
| # Wormhole4j v0.3.0: Adding Multi-threaded Concurrency | |
| ## 1. Introduction | |
| - Quick recap of Wormhole4j | |
| - What changed in v0.3.0 (real multi-thread support) | |
| - Why this matters | |
| --- |
This file contains hidden or 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
| ### Blog Post Structure: "Scaling Wormhole4j: Lock-Free Concurrency and Verified Correctness" | |
| #### 1. Introduction: The Evolution | |
| * **The Mission:** Briefly recap the original *Wormhole* paper (EuroSys '19) goal: a fast $O(\log L)$ ordered index. | |
| * **The Problem:** While the original was a performance breakthrough, it was strictly single-threaded. Real-world infrastructure requires concurrency. | |
| * **The Announcement:** Introduce v0.3.0, the culmination of adding multi-threaded support while preserving the core performance advantages. | |
| #### 2. The Architecture of Concurrency | |
| * **The Structural Conflict:** Explain why concurrent ordered indexes are difficult—modifications like splits/merges ripple through both the `LeafList` and the `MetaTrieHT`, creating a bottleneck. | |
| * **The Three-Layer Strategy:** Explain the concurrency model: |
This file contains hidden or 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
| # Wormhole4j 0.3: Thread-Safe Concurrent Access | |
| ## 1. Introduction | |
| - Recap of Wormhole4j: fast ordered map, O(log L) lookups, EuroSys '19 paper | |
| - The gap: single-threaded only until now | |
| - What this post covers: design, correctness verification, benchmarks | |
| ## 2. Why Concurrent Ordered Indexes Are Hard | |
| - Maintaining order + range scans rules out simple approaches | |
| - The specific problem: splits/merges modify both the LeafList |
This file contains hidden or 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
| import com.fasterxml.jackson.annotation.JsonCreator; | |
| import com.fasterxml.jackson.annotation.JsonProperty; | |
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import org.apache.fury.Fury; | |
| import org.apache.fury.config.Language; | |
| import org.msgpack.jackson.dataformat.MessagePackMapper; | |
| import java.io.IOException; | |
| import java.util.*; |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <ucontext.h> | |
| #define N 1000000 | |
| int main(){ | |
| int i = 0; | |
| ucontext_t ctxt; | |
| getcontext(&ctxt); |
This file contains hidden or 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
| package org.example; | |
| import java.sql.Connection; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.sql.Statement; | |
| import java.util.Arrays; | |
| import java.util.HashMap; | |
| import java.util.Map; |
Start minikube
$ minikube start --cpus=4Let's follow https://docs.k8ssandra.io/install/local/single-cluster-helm/ basically.
$ helm repo add k8ssandra https://helm.k8ssandra.io/stable
This file contains hidden or 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
| package org.komamitsu.unixdomainsockettest; | |
| import java.net.StandardProtocolFamily; | |
| import java.net.UnixDomainSocketAddress; | |
| import java.nio.ByteBuffer; | |
| import java.nio.channels.ServerSocketChannel; | |
| import java.nio.channels.SocketChannel; | |
| import java.nio.file.Path; | |
| import java.nio.file.Paths; | |
| import java.util.ArrayList; |
NewerOlder