Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Socket.IO 1.0 Client for Javaの紹介
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Naoyuki Kanezawa
July 03, 2014
Technology
5
1.8k
Socket.IO 1.0 Client for Javaの紹介
Socket.IO Meetup in Tokyo
Naoyuki Kanezawa
July 03, 2014
Tweet
Share
More Decks by Naoyuki Kanezawa
See All by Naoyuki Kanezawa
Introducing Now and Next.js
nkzawa
12
5.6k
WebSocketの圧縮機能とSocket.IO
nkzawa
5
9.3k
Socket.IO 1.0の変更点・内部的な話
nkzawa
20
9.3k
Other Decks in Technology
See All in Technology
Datadog で実現するセキュリティ対策 ~オブザーバビリティとセキュリティを 一緒にやると何がいいのか~
a2ush
0
180
夢の無限スパゲッティ製造機 #phperkaigi
o0h
PRO
0
410
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
来期の評価で変えようと思っていること 〜AI時代に変わること・変わらないこと〜
estie
0
120
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
210
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
150
FASTでAIエージェントを作りまくろう!
yukiogawa
4
170
CREがSLOを握ると 何が変わるのか
nekomaho
0
310
OPENLOGI Company Profile for engineer
hr01
1
61k
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
0
170
俺の/私の最強アーキテクチャ決定戦開催 ― チームで新しいアーキテクチャに適合していくために / 20260322 Naoki Takahashi
shift_evolve
PRO
1
480
AI時代のIssue駆動開発のススメ
moongift
PRO
0
300
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
310
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
160
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
AI: The stuff that nobody shows you
jnunemaker
PRO
4
500
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
300
Speed Design
sergeychernyshev
33
1.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
180
The Spectacular Lies of Maps
axbom
PRO
1
660
Utilizing Notion as your number one productivity tool
mfonobong
4
280
New Earth Scene 8
popppiees
2
1.9k
Transcript
Socket.IO 1.0 Client for Javaの紹介 Socket.IO Meetup in Tokyo
About Me @nkzawa • フロントエンド・エンジニア • Javaプログラマではありません ... • I
♥ Node.JS and Socket.IO
socket.io-client.java
socket.io-client.java • Socket.IO v1.0 対応のJava client • Node clientをJavaへ移植 •
Android support github.com/nkzawa/socket.io-client.java
Over a year ago ... Socket.IO 1.0のリリース前から存在する
Motivation • Socket.IO 1.0のアップデートで、既存clientライ ブラリが使用できなくなった。 • Node clientとのより高い互換性のため。
Full featured • Upgrade transports • Sending binary data •
Options • Auto reconnection … Node clientの全機能をサポート
Similar Interface // Node client var socket = io(“http://localhost”); //
Java client Socket socket = IO.socket(“http://localhost”);
Similar Interface // Node client socket.emit(“myevent”, “hi”); // Java client
socket.emit(“myevent”, “hi”);
Similar Interface // Node client socket.on(“myevent”, function() {}); // Java
client socket.on(“myevent”, new Emitter.Listener() { @Override public void call(Object… args) {} });
Architecture • emitter.java (EventEmitter) • engine.io-client.java • socket.io-client.java 構成や中のロジックがNode clientと同じ
Architecture • 本家Node clientの新機能やBug Fixの反映が容易。 • Java clientで行った修正をNode clientにfeedbackできる。 •
Node clientと同程度にstable。 Node ⇔ Java
Single Threaded 非同期以外の全ての処理が一つのスレッドで実行される。 All non-background processes run on a particular
thread. • No synchronized keyword • Simple and robust • マルチスレッドの厄介な問題を避けることができるので、安 定して動作する。
Released on Maven Central
thanks <3