Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Realtime Web Applications wit ExpressJS
Hüseyin BABAL
Software Developer, CSM
@Sony Eurasia
A Scenario...
Plane status board…
Updating board on every flight
Check flight status for every
second?
Let’s code that board software...
Good Code, but this is
something like...
Yeah, client side
server bombing...
It would be better if
server side inform
client on any update...
What is SocketIO?
●
●
●
●

Care-Free realtime 100% Javascript
Cross-Browser and mobile device
Wrapper for the Websocket
Learnboost
Go back to origin...
Websocket?
●
●
●
●

Full-duplex comm. channels over TCP
Only its handshake interpreted by HTTP servers
Push server data to...
Handshake
Clients sends base64 encoded string
Server appends a magic string to it and encrypt
SHA-1 after then base64
Example...
Client: x3JJHMbDL1EzLkh9GBhXDw==
Server:
x3JJHMbDL1EzLkh9GBhXDw==258EAFA5E914-47DA-95CA-C5AB0DC85B11 then SHA1.
base64(abo...
In SocketIO, you don’t
need to know all this
stuffs
Send / Receive Events
Store client data
Namespace
Volatile Messaging
Acknowledgement
Broadcasting
Quickies
ExpressJS

https://github.com/visionmedia/express

SocketIO

https://github.com/LearnBoost/socket.io

Learnboost
...
Mobile?
Will Be Demonstrated
on Next BBS
Thanks
Realtime web applications with ExpressJS and SocketIO
Realtime web applications with ExpressJS and SocketIO
Realtime web applications with ExpressJS and SocketIO
Realtime web applications with ExpressJS and SocketIO
Realtime web applications with ExpressJS and SocketIO
Upcoming SlideShare
Loading in …5
×

1

Share

Download to read offline

Realtime web applications with ExpressJS and SocketIO

Download to read offline

Realtime web applications with ExpressJS and SocketIO. Also best practises

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Realtime web applications with ExpressJS and SocketIO

  1. 1. Realtime Web Applications wit ExpressJS Hüseyin BABAL Software Developer, CSM @Sony Eurasia
  2. 2. A Scenario...
  3. 3. Plane status board… Updating board on every flight Check flight status for every second? Let’s code that board software...
  4. 4. Good Code, but this is something like...
  5. 5. Yeah, client side server bombing...
  6. 6. It would be better if server side inform client on any update...
  7. 7. What is SocketIO?
  8. 8. ● ● ● ● Care-Free realtime 100% Javascript Cross-Browser and mobile device Wrapper for the Websocket Learnboost
  9. 9. Go back to origin...
  10. 10. Websocket? ● ● ● ● Full-duplex comm. channels over TCP Only its handshake interpreted by HTTP servers Push server data to client browser 80 port and no firewall prevent
  11. 11. Handshake
  12. 12. Clients sends base64 encoded string Server appends a magic string to it and encrypt SHA-1 after then base64 Example...
  13. 13. Client: x3JJHMbDL1EzLkh9GBhXDw== Server: x3JJHMbDL1EzLkh9GBhXDw==258EAFA5E914-47DA-95CA-C5AB0DC85B11 then SHA1. base64(above appended string) = HSmrc0sMlYUkAGmm5OPpG2HaGWk=
  14. 14. In SocketIO, you don’t need to know all this stuffs
  15. 15. Send / Receive Events
  16. 16. Store client data
  17. 17. Namespace
  18. 18. Volatile Messaging
  19. 19. Acknowledgement
  20. 20. Broadcasting
  21. 21. Quickies ExpressJS https://github.com/visionmedia/express SocketIO https://github.com/LearnBoost/socket.io Learnboost https://github.com/LearnBoost Websockets http://en.wikipedia.org/wiki/WebSocket Button Click Game http://btnclick.herokuapp.com/signin Heroku Websockets https://blog.heroku.com/archives/2013/10/8/websockets-public-beta
  22. 22. Mobile? Will Be Demonstrated on Next BBS
  23. 23. Thanks
  • williammdavis

    Feb. 19, 2017

Realtime web applications with ExpressJS and SocketIO. Also best practises

Views

Total views

1,338

On Slideshare

0

From embeds

0

Number of embeds

22

Actions

Downloads

42

Shares

0

Comments

0

Likes

1

×