Upload
rifqi-alfian
View
641
Download
3
Tags:
Embed Size (px)
DESCRIPTION
Socket.io dan Node. Tech Talk JDV dan Qiscus. Jogja Digital Valley, 12 Februari 2014
Citation preview
Socket.io dan NodeTech Talk JDV. 2014
Apa itu Node, enak ga?
Node : Non Blocking I/O
sumber img : https://strongloop.com
Node : Tidak hanya platform, namun juga module
sumber img : https://strongloop.com
Tentang Node
Tanya dong mas...
Web Socket
1. Cross Origin Communication2. Proxy, Firewall problem3. Open Connection, High Concurrency + Low
Cost
Web Socket
sumber img : http://www.websocket.org/
Request
Response
Socket.io : Fitur
1. Mekanisme ‘Fallback’2. Room3. Namespace4. Authentifikasi
Socket.io : KonfigurasiMekanisme Fallback :
io.set('transports', [ 'websocket' , 'flashsocket' , 'htmlfile' , 'xhr-polling' , 'jsonp-polling' ]);
Socket.io : Authentifikasi
1. Global dan Namespace2. HanshakeData{ headers: req.headers // <Object> the headers of the request , time: (new Date) +'' // <String> date time of the connection , address: socket.address() // <Object> remoteAddress and remotePort object , xdomain: !!headers.origin // <Boolean> was it a cross domain request? , secure: socket.secure // <Boolean> https connection , issued: +date // <Number> EPOCH of when the handshake was created , url: request.url // <String> the entrance path of the request , query: data.query // <Object> the result of url.parse().query or a empty object}
Demo Socket.io
Lihat dong mas...
Terima Kasih