This is learning diary post from Uni Helsinki course Software Factory / Facebook academy – SocketIO team. For more info about this course read “Ready, Set, Start Coding!”.
You can find open issues and questions I collect from past week in my quick project notes.
What tools should I learn to use when I develop Socket.io?
Browserify. “This is how we write code that runs both in Node and the browser. We use it for all our clients.” – Rauch. It allows to use node.js-style module system that compile for use in the browser, it supports exporting external methods and properties using the module.exports and exports variables. With browserify we can use require(./foo); function to use core modules and many of the modules on npm. , .
Debug.This module is a tiny node.js & browser debugging utility for your libraries and applications. “A tiny yet incredibly useful dependency we use in all projects is called ‘debug’.” – Rauch
It says readme so I read it
It seems like the biggest issue to tackle before writing code is that you really need to know how everything works before starting to build something on your own.
Although the codebase of Engine.io is only around 1000 lines of code, understanding how supported transport protocols (XHR/JSONP polling, WebSockets and FlashSockets) work takes some time. In my opinion, in order to understand Engine.io, Socket.io and all the related projects, readme-files and test cases that arrive with the projects are essential. They describe well how things are expected to work and how functions should behave.
First thing to do at the beginning of next week is to write an additional blog post which explains concepts and technologies related to this project and creating a small example project that uses Socket.io.
Understanding the problems that raised when Engine.io was created and where is this project heading to
“The central problem this poses is: how do we switch transports without losing messages? Engine only switches from polling to another transport in between polling cycles. Since the server closes the connection after a certain timeout when there’s no activity, and the polling transport implementation buffers messages in between connections, this ensures no message loss and optimal performance.” – from Engine.io readme file.
Ok, that is a good start when trying to understand what problems we are facing – but the questions remain where this project is heading to, what functionality will be developed next or which issue needs to be fixed?
All tests passing – this is a good spot to dig deeper