Wednesday, January 19, 2011

Our second meeting

We have decided that SpiderMonkey is a good way for us to run javascript. erlang_js seems to be a good way to interact with javascript. We also found out that SpiderMonkey will not supply us with the browser features it usually has, and this is good, because we do not want them. In addition to SpiderMonkey, we should consider NodeJS, it may have other features, such as communication via sockets which we can use. Socket communication may be better suited than pipes. The communication between client and server (and the other way around) needs to be fast. We have decided to use UDP as our underlying protocol, but the protocol on top of UDP should be swappable via a protocol module. We have a few candidates for these "application level protocols"
  • JSON
  • Binary PLIST
  • BSON
JSON is good because
  • It is easy to construct
  • easy to read
  • readily parsable in javascript
It is bad because
  • There will be a lot of overhead
Now, on the other hand, the two other protocols are quite small, but they are difficult to construct, and there's no built in support for them in javascript. We decided to make the server protocol independent, and to create at first a module for JSON allowing us to send messages back and forth in an easily debuggable manner. The lower levels of networking will be handled outside the JSON/other-protocols module. We need to find a way to replicate SpiderMonkey runtimes. We plan to keep at least two runtimes alive, and if one crashes, we should replicate it and produce an exact copy. We have not yet decided how to do this.

No comments:

Post a Comment