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
47
Other Decks in Technology
See All in Technology
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
390
Kernel testing frameworks
ennael
PRO
0
110
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
780
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
230
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
1
270
自律型 AI をセキュアに実装!Gemini と MIG で作る動的コード実行環境
recruitengineers
PRO
1
210
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
3
990
予測不能な実行エージェントを安全にサクッと試せるサンドボックス環境の話
sansantech
PRO
0
130
More Freedom on the Same Shared GPU Cluster: A Small Team’s Experience with vCluster
nttcom
0
140
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
560
「とりあえず動く」の先へ。 AI時代のチーム開発と内部設計/2026-slsdays
slsops
0
150
転んだ話が背中を預ける理由になる / A_story_about_falling_down_gives_you_a_reason_to_watch_each_other_s_backs.pdf
pauli
3
280
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
740
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Designing Powerful Visuals for Engaging Learning
tmiket
1
590
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Fireside Chat
paigeccino
43
4.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
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]
ご静聴ありがとうございました