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.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.5k
WebSocketの圧縮機能とSocket.IO
nkzawa
5
8.8k
Socket.IO 1.0の変更点・内部的な話
nkzawa
20
9.2k
Other Decks in Technology
See All in Technology
SwiftUIのGeometryReaderとScrollViewを基礎から応用まで学び直す:設計と活用事例
fumiyasac0921
0
160
Developer Advocate / Community Managerなるには?
tsho
0
130
衛星画像超解像化によって実現する2D, 3D空間情報の即時生成と“AI as a Service”/ Real-time generation spatial data enabled_by satellite image super-resolution
lehupa
0
140
How to achieve interoperable digital identity across Asian countries
fujie
0
140
AI駆動開発を推進するためにサービス開発チームで 取り組んでいること
noayaoshiro
0
250
from Sakichi Toyoda to Agile
kawaguti
PRO
1
110
「れきちず」のこれまでとこれから - 誰にでもわかりやすい歴史地図を目指して / FOSS4G 2025 Japan
hjmkth
1
280
OpenAI gpt-oss ファインチューニング入門
kmotohas
2
1.2k
小学4年生夏休みの自由研究「ぼくと Copilot エージェント」
taichinakamura
0
630
許しとアジャイル
jnuank
1
140
Uncle Bobの「プロフェッショナリズムへの期待」から学ぶプロの覚悟
nakasho
2
110
速習AGENTS.md:5分で精度を上げる "3ブロック" テンプレ
ismk
6
740
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
54
3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
900
Designing for humans not robots
tammielis
254
26k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6.1k
Scaling GitHub
holman
463
140k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
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