1. SourceForge is using MongoDB as the database for their website to improve performance and scalability over their previous CouchDB implementation.
2. They developed an object-document mapper called Ming to define schemas and perform migrations for the documents in MongoDB from their Python web application.
3. SourceForge's deployment uses load balancing with a master MongoDB database server and multiple web application servers to easily handle most of their traffic needs from a single database server.
6. Deployment Architecture (revised) Load Balancer / Proxy Gobble Server Develop Scalability is good Single-node performance is good, too Master DB Server MongoDB Master Apache mod_wsgi / TG 2.0 Apache mod_wsgi / TG 2.0 Apache mod_wsgi / TG 2.0 Apache mod_wsgi / TG 2.0
7.
8.
9.
10.
11.
12.
13. Ming Example from ming import schema from ming.orm import MappedClass from ming.orm import (FieldProperty, ForeignIdProperty, RelationProperty) class WikiPage (MappedClass): class __mongometa__ : session = session name = 'wiki_page' _id = FieldProperty(schema . ObjectId) title = FieldProperty( str ) text = FieldProperty( str ) comments = RelationProperty( 'WikiComment' ) MappedClass . compile_all() # Lets ming know about the mapping