Sekibanのコアを5言語で動かす ― イベントソーシング×WASMでやってみた | Run...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Sekibanのコアを5言語で動かす ― イベントソーシング×WASMでやってみた | Running Sekiban's Core in 5 Languages — Event Sourcing × WASM

https://sekiban.connpass.com/event/380134/

イベントソーシング・CQRS勉強会 #5
2026/02/13(金) 12:00 〜 13:00

タイトル: Sekibanのコアを5言語で動かす ― イベントソーシング×WASMでやってみた

概要:
イベントソーシングのコアな機能は関数とシンプルなデータ型で定義できます。であれば、ドメイン部分をWASMにすることで、利用者はC#を知らなくても自分の得意な言語で開発し、インフラはMicrosoft Orleans + C#に任せられるのでは?この発想のもと、Rust、Go、TypeScript、MoonBitで実装してみた経緯についてお話しします。

## 日本語要約

イベントソーシングフレームワークSekibanはC#製のため他言語開発者への訴求が弱いという課題がありました。そこでドメインロジックをWASM化し、インフラはOrleans+C#に任せつつ、開発者は好きな言語でコアコードを書けるアーキテクチャを構築。AIコーディング(Codex・Claude)を活用してwasmtime-dotnetをWASI 0.2対応に拡張し、C#・Rust・Go・TypeScript・MoonBitの5言語でドメインを1サーバー上で動かすことに成功しました。将来的にはマネージドなイベントソーシングサービスとしての展開も目指しています。

## English Summary

Sekiban, an event sourcing framework built in C#, faced limited appeal to developers outside the C# ecosystem. To address this, we adopted WASM to decouple domain logic from infrastructure — letting developers write core event sourcing code in their preferred language while Orleans + C# handles the infrastructure. Using AI coding tools (Codex and Claude), we extended wasmtime-dotnet to support WASI 0.2, and successfully ran domain logic written in C#, Rust, Go, TypeScript, and MoonBit on a single server. We also plan to offer a managed event sourcing service powered by this architecture in the future.

Tomohisa Takaoka

February 12, 2026

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

23 slides
  1. 自己紹介 高丘 知央 - Tomohisa Takaoka X: @tomohisa GitHub: @tomohisa

    Works at: 株式会社ジェイテックジャパン、J-Tech Creations, Inc. JTS Group - 株式会社ジャパンテクニカルソフトウェア 品川 CTO: 中小企業の受託開発をモダンな開発スタイルで。イベントソ ーシング、CQRSなどのソフトウェアアーキテクチャに関するコン サル業務 Microsoft MVP for Developer Technologies from Nov 2024- OSS: Sekiban - Event Sourcing and CQRS Framework. 2 / 23
  2. 本日のアジェンダ 1. 背景と課題 ― なぜWASMなのか 2. サービス化の発想とWASM 3. C#でのWASM実装 ―

    WASI 0.2 4. 多言語対応 ― Rust・Go・TS・MoonBit 5. デモ ― 5言語を1サーバーで 6. 今後の展望 3 / 23
  3. 1-1. Sekibanの強みと課題 Sekibanの強み DCB対応: Dynamic Consistency Boundaryに対応したイベントソーシングフレームワーク 安定したアクターモデル: Microsoft Orleans上で動作する信頼性の高いインフラ

    C#の壁 SekibanはC#で作られている C#以外の開発者への訴求力が弱い イベントソーシングを使いたいが、C#を新たに学ぶハードルが高い 5 / 23
  4. 3-2. AIを活用した突破 Codex + ClaudeでWASI 0.2対応を実現 AI(Codex + Claude)を使ってwasmtime-dotnetを修正 .NET上で動作するWASI

    0.2の実行環境を約1日で構築 気づき WASMの基本的なアセンブリコード規格は決まっている 呼び出されたメソッドの振る舞いを実行環境側で実装すればよい 必要な機能をRustやC#で補完し、データ受け渡しを正しく行う 思ったほど難しくない 12 / 23
  5. 4-1. Rust・Go Rust WASMへの対応が最も充実 WASI 0.2のCanonical ABIに簡単に 対応 最もスムーズに実装できた Go

    (TinyGo) フルのGoではなくTinyGoを使用 TinyGoはGoのサブセットでWASM 対応 問題なく実行に成功 14 / 23
  6. 4-2. TypeScript・MoonBit TypeScript ランタイムライブラリと一緒にビ ルドが必要 Canonical ABIではなく Component Modelへの変換が必 要

    wasmtime側にも修正を追加 Codex + Claudeを活用して実現 MoonBit WASM対応が進んでいる新しい言 語 問題なくドメインを書くことがで きた WASMファーストな設計が強み 15 / 23
  7. 4-3. 言語比較 ― サイズとパフォーマンス 言語 ABI モジュールサイズ Events/sec MoonBit Component

    173 KB 105,539 Rust C-ABI 261 KB 592,417 Go (TinyGo) C-ABI 1.3 MB 96,433 C# C-ABI 9.9 MB 77,750 TypeScript Component 11.7 MB 15,159 最小モジュール: MoonBit(173 KB) 、最高性能: Rust(59万 events/sec) TS・C#はランタイム込みのため10MB前後 ※ローカルマイクロベンチ(n=3000)の参考値。ABI方式・ランタイムの違いがあり、この数値だけで確実な優 劣は付けられません 16 / 23
  8. 4-4. 実行モデル全体像 各⾔語 Client API Rust Client API Go (TinyGo)

    Client API TypeScript Client API MoonBit Client API C# Client API .wasm .wasm .wasm .wasm HTTP JSON WASMアップロード C# Orleans WASM Sekiban Server WASM Runtime (wasmtime-dotnet) WASI . Canonical ABI / Component Model 各⾔語のドメインコードをサンドボックス実⾏ Microsoft Orleans Actors TagStateGrain MultiProjectionGrain EventCommitGrain / ConsistencyGrain Sekiban DCB Core Dynamic Consistency Boundary Remote Executor API /api/commands /api/events /api/queries /api/tagstates WASMをアップロードすればほぼ共通で使⽤可能 永続化 Event Store Azure Cosmos DB JSON / パーティション AWS DynamoDB NoSQL PostgreSQL RDB / EF Core 17 / 23

More Decks by Tomohisa Takaoka

Other Decks in Programming