Gaming/GameCenter/Architecture: Difference between revisions

Jump to navigation Jump to search
remove python
(remove python)
 
Line 2: Line 2:


= Languages =
= Languages =
Galaxy prototypes have been written in Node.js, but the language choice should still be discussed.
The backend architecture (galaxy-api) is written in Node.js.
 
Below is a list of pros/cons of Node.js and Python (a possible candidate for the Game Center).


[For real-time, socket-based parts, we should also consider Go]
[For real-time, socket-based parts, we should also consider Go]
Line 10: Line 8:
== Node.js ==
== Node.js ==
=== Pros ===
=== Pros ===
* Galaxy API prototypes have been written in Node.js
* Mozilla has deployed Node.js projects to scale (e.g., Persona, FxA)
* Mozilla has deployed Node.js projects to scale (e.g., Persona, FxA)
* Node community is vibrant
* Node community is vibrant
Line 22: Line 21:
* Event-driven, asynchronous; callbacks are a pain (but we have promises!)
* Event-driven, asynchronous; callbacks are a pain (but we have promises!)
* Few mature SQL ORMs (Knex, Bookshelf, Sequelize are decent); NoSQL is usually preferred
* Few mature SQL ORMs (Knex, Bookshelf, Sequelize are decent); NoSQL is usually preferred
== Python ==
=== Pros ===
* Mozilla has deployed Python projects to scale (e.g., AMO, Marketplace)
* SQL ORMs are mature (SQLAlchemy, Django ORM)
* Frameworks are fantastic (Flask, Django [TE - we actually have a specialty framework for services: http://cornice.readthedocs.org/en/latest/])
* Synchronous code (easy to write)
* Mature libraries (and well-documents too)
* Strong community
* Simple syntax (makes it easier to write things elegantly)
* [TE] At the moment, we probably have more resources available on the Python side
=== Cons ===
* Synchronous, blocking code
* Real-time, socket network is unnatural and difficult (forced to use such libraries as Tornado/Twisted/gevent)
* Throughput (requests per second) can be lower than Node.js's (depending on which benchmark you read)


= Data Models =
= Data Models =
155

edits

Navigation menu