Motion & Socket.io

11.16.2015 |

research

Last week I had two major bugs with my websocket and motion project.  You had to refresh to see new users and users were duplicated in the application. In class when I demoed the project, it crashed. So this week, I wanted to make sure that I built a solid foundation to build this application on top of.

We say we will have time to “do that later.” To fix that bug….eventually. So instead of coding quick and dirty this week, I decided to go back and make a more stable application. I decided to learn and use Socket.io for this application.  It handles building a websocket application with many users a lot better than I can build from scratch. It is currently being used for the hypnosis-themed chat room, Sleep Chat.

Socket.io has functions for “emiting” data to all the users connected. I have been apart of the Socket.io chatroom/slack since the beginning of the term too. What I did this week was take the application I had last week, and remake it in Socket.io.

Now, you may be wondering…if I have known about Socket.io since the beginning of the term, why didn’t I use it right away. Well, I tried. I just could not get it working on my own. I especially could not get it to work on Heroku. And since I was short on time, I ditched it and did something a lot more simple. But now, I have time. I already completed all my goals for this term and I can breath a little easier. And I can take the time to refactoring my work and get something a lot less bloated (and get it to stop crashing).

Again, the websocket motion app can be found at: https://ws-motion.herokuapp.com/. Next week I will continue working on this and get the mobile view/desktop view split up and designed.

Time Breakdown: