Node.js Socket.io MongoDB update a database on a remote pc

What I'd like to achieve:

  • have a main server running node.js and socket.io that runs a "chat-like" webpage, like this chat example. On this server I'll also have a mongo database where I store multimedia files and tags. I have no plan to use the filesystem to store data and metadata, so I choose gridFS.

  • having multiple client machines all over the world that can connect to my server, giving me back their MAC addresses as idintificator. These machines have their own local copy of the main server's database, that needs to be updated if some media or tags are missing. I need to be able to match the local db to the main one.

  • in the "chat" page I can type predefined textual commands that trigger useful actions, such as sending back to the main db a video or audio typing in the chat "[client MAC address] GET VIDEO ('video.mp4')"..

Now as a newbie my question is: can I do this with only node, socket.io, gridFS and javascript?

There are better alternatives?