Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
操作変換アルゴリズムとScala
Search
yuichi0301
December 11, 2018
Technology
930
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
操作変換アルゴリズムとScala
共同編集のサーバーサイドをScalaで作成した話です
yuichi0301
December 11, 2018
More Decks by yuichi0301
See All by yuichi0301
My Impressions Of Scala
yuichiuchida
0
46
Other Decks in Technology
See All in Technology
range over func 2年間の軌跡 Issue #56413 はGoのエコシステムをどう変えたか
ryujicre8ive
0
130
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
消えない 動かない 効かない
yama3133
1
120
Gitは怖い?共有ワークスペースから始めるSnowflakeチーム開発
coco_se
0
190
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.2k
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
0
430
2026/09/10 Spring Bootから Jakarta EE/MicroProfileへの移行
megascus
0
350
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
1
270
DEFCON34-Write-up_HYCu-MYCu
daikiokazaki
0
160
10分で知る最近のOmarchy
komagata
0
280
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
300
AI時代だからこそ、スケールしないことをやろう
yutashigemura
1
170
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
220
RailsConf 2023
tenderlove
30
1.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Embracing the Ebb and Flow
colly
88
5.2k
It's Worth the Effort
3n
188
29k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
Being A Developer After 40
akosma
91
590k
Docker and Python
trallard
47
4.2k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
エンジニアに許された特別な時間の終わり
watany
108
250k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Transcript
操作変換アルゴリズムとScala Nulab / 内田優一(@yuichi03011)
操作変換アルゴリズムって何? - 共同編集で使用するアルゴリズム - コンフリクトがない
操作変換アルゴリズムの技術的な要素 - 操作 - 変換関数 - 合成関数 - 制御メカニズム -
同期状態 - 確認待ち状態 - バッファリング状態
操作とは - モデル - 3つのアクションがある - insert - delete -
retain
変換って?具体的には 最初の文字「ABCDE」 Alice 「D」を削除する「ABCE」 -> Alice(DEL 4) Bob 「B」を削除する「ACDE」 ->
Bob(DEL 2) 結果 Alice 「ABCE」-> Bob(DEL 2) -> 「ACE」 Bob 「ACDE」 -> Alice(DEL 4) -> 「ACD」
空気を読んでいい感じに変換する 最初の文字「ABCDE」 Alice 「D」を削除する「ABCE」 -> Alice(DEL 4) -> 変換 ->
Alice(DEL 3) Bob 「B」を削除する「ACDE」 -> Bob(DEL 2) 結果 Alice 「ABCE」-> Bob(DEL 2) -> 「ACE」 Bob 「ACDE」 -> Alice(DEL 3) -> 「ACE」
変換関数が使われるタイミング(サーバー)
サーバーサイドには何を作ればいい? - 操作(サーバーサイド・クライアントサイド) - 変換関数(サーバーサイド・クライアントサイド) - 合成関数(クライアントサイド)
Scalaとsocket.io - PlayFramework - play-socket.io
play-socket.ioは Akka Streamsがベースになってる - Source - Sink - Flow
play-socket.io
所感 - 操作変換アルゴリズムはかなり難しい - play-socket.ioライブラリを使うのは難しい - Node.jsより速い(たぶん) - 時系列に処理されず、やってきたメッセージは即処理されるので、シーケ ンシャルな処理が必要な場合自分で実装する必要がある
変換のいくつかの例 (Ins [3、 “a”]、Ins [1、 “b”])= Ins [4、 “a”] (Ins
[3、 “a”]、Del [1])= Ins [2、 “a”] ( Del[3]、Ins [1、 “b”])=Del[4] ( Del[3]、 Del[1])= Del[2]
ご静聴ありがとうございました