socket.io tech talk 06022014

13
Socket.io dan Node Tech Talk JDV. 2014

Upload: rifqi-alfian

Post on 06-Jul-2015

641 views

Category:

Technology


3 download

DESCRIPTION

Socket.io dan Node. Tech Talk JDV dan Qiscus. Jogja Digital Valley, 12 Februari 2014

TRANSCRIPT

Page 1: Socket.io   tech talk 06022014

Socket.io dan NodeTech Talk JDV. 2014

Page 2: Socket.io   tech talk 06022014

Selamat Sore~

Rifqi [email protected]

[email protected]

Page 3: Socket.io   tech talk 06022014

Apa itu Node, enak ga?

Page 4: Socket.io   tech talk 06022014

Node : Non Blocking I/O

sumber img : https://strongloop.com

Page 5: Socket.io   tech talk 06022014

Node : Tidak hanya platform, namun juga module

sumber img : https://strongloop.com

Page 6: Socket.io   tech talk 06022014

Tentang Node

Tanya dong mas...

Page 7: Socket.io   tech talk 06022014

Web Socket

1. Cross Origin Communication2. Proxy, Firewall problem3. Open Connection, High Concurrency + Low

Cost

Page 8: Socket.io   tech talk 06022014

Web Socket

sumber img : http://www.websocket.org/

Request

Response

Page 9: Socket.io   tech talk 06022014

Socket.io : Fitur

1. Mekanisme ‘Fallback’2. Room3. Namespace4. Authentifikasi

Page 10: Socket.io   tech talk 06022014

Socket.io : KonfigurasiMekanisme Fallback :

io.set('transports', [ 'websocket' , 'flashsocket' , 'htmlfile' , 'xhr-polling' , 'jsonp-polling' ]);

Page 11: Socket.io   tech talk 06022014

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}

Page 12: Socket.io   tech talk 06022014

Demo Socket.io

Lihat dong mas...

Page 13: Socket.io   tech talk 06022014

Terima Kasih

[email protected]