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
Naoyuki Kanezawa
July 03, 2014
Technology
5
1.7k
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.3k
WebSocketの圧縮機能とSocket.IO
nkzawa
5
8.4k
Socket.IO 1.0の変更点・内部的な話
nkzawa
20
9.1k
Other Decks in Technology
See All in Technology
分析者起点の企画を成功させた連携面の工夫
lycorptech_jp
PRO
1
220
【swonet.conf_】NOCメンバーが語るSTMの実態!! ~ShowNetから若者への贈り物~
shownet
PRO
0
230
【shownet.conf_】コンピューティング資源を統合した分散コンテナ基盤の進化
shownet
PRO
0
300
Sansanにおける全社横断データ分析基盤の挑戦と未来 / Challenges and Future of Cross-Organizational Data Analytics Platform at Sansan
sansan_randd
2
310
FastAPIでのasync defとdefの使い分け
takashi1029
6
1.8k
トークナイザー入門
payanotty
2
380
LINEヤフー新卒採用 コーディングテスト解説 実装問題編
lycorp_recruit_jp
1
12k
VS CodeでF1〜12キーつかってますか? / Do you use the F1-12 keys in VS Code?
74th
2
270
k6を活用した再現性・拡張性の高い負荷試験基盤の構築
biwashi
11
2.9k
Oracle Cloud Infrastructure:2024年9月度サービス・アップデート
oracle4engineer
PRO
0
360
Oracle Database 23ai 新機能#4 Real Application Clusters
oracle4engineer
PRO
0
110
Valuable Software Engineering
avandeursen
0
250
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
31
2.8k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
How to train your dragon (web standard)
notwaldorf
87
5.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
279
13k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Designing Experiences People Love
moore
138
23k
Web development in the modern age
philhawksworth
205
10k
Unsuck your backbone
ammeep
667
57k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
Building Your Own Lightsaber
phodgson
102
6k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
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