In developing an express based RESTful API, we have found several npm packages that handle similar tasks.
we are using
solr for our searching index, and wanted to use an npm package to handle that communication. The npm search result at the time found 43 different modules for communicating with
npm does not offer a way to sort by stared projects, or give reviews. So we are stuck having several developers running tests and reviews on several modules to put together a short list of recommended packages.
But how do you track that work?
I opted to create a Socket.IO driving activity board to handle this task: npm-reviewer. Because Socket.IO is capable of sending data back and forth to all connected clients, this seems like an ideal potential solution and a fun little project.
Where to Start?
Once we have out basic template, we need to setup sockets to
emit events, and sockets to capture and take actions on receiving these emitted events.
In out Application, we want to capture connections, and disconnects, and we want to capture the adding of an activity to our board, and transmit that data back out.
Events can be named pretty much anyway you see fit. For clarity, they should represent an action being taken such as
move action, or
remove action. They should also match on both Server and Client Side.
Where do I go from here?
Next steps would be:
- Persist Data
- Transmit Data and State at Connection
- Move Item Across the Board
- Remove Item from the Board
- Modify Items on the Board
thats the gist of it for now, start playing with it and see what you can do.