We may want to look at gevent for this if we want it super-lightweight. I believe to get full performance we'll need to patch the pymongo connection pool http://pastebin.com/z9nFYGa9 and use something like https://gist.github.com/235168 to deploy.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
--- old +++ new @@ -1,1 +1,1 @@-Super-light webservice, essentially just a proxy. Takes JSON POST data, saves it to mongo via ming (for schema validation). Can be extremely lightweight. I'd advocate as simple as our own single wsgi function (no pylons or pyramid).+ Super-light webservice, essentially just a proxy. Takes JSON POST data, saves it to mongo via ming (for schema validation). Can be extremely lightweight. I'd advocate as simple as our own single wsgi function (no pylons or pyramid).
status: in-progress --> code-review
assigned_to: Rick Copéland --> Dave Brondsema
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
some tests that are more granular that the perftest would be very nice. I can let it slide for bootstrapping a service, but lets start building up a decent test suite as the code evolves
docstrings for main classes would be good too. just brief overviews of what a JournalWriter or AggDef is, for example. Architecture diagram, bonus points.
wouldn't logging be better than printing for traceback.print_exception(*sys.exc_info()) ?
hardcoded JournalWriter constants warrant a comment about why the values are good, esp MAX_SIZE
does event.context hold all the details (user, project, tool, request, etc) ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Added docstrings, comments, and a test. You will need latest Ming with MIM updates to run the test (it uses MIM mapreduce, which is new as of today). And context is, indeed, intended to hold project, user, tool, etc.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is needed for SOG to insert keepsake data; and should be used by sfx/sfpy/allura as well (unless direct mongo access is needed for effeciency)
We may want to look at gevent for this if we want it super-lightweight. I believe to get full performance we'll need to patch the pymongo connection pool http://pastebin.com/z9nFYGa9 and use something like https://gist.github.com/235168 to deploy.
https://sourceforge.net/projects/zarkov/
Diff:
traceback.print_exception(*sys.exc_info())
?Added docstrings, comments, and a test. You will need latest Ming with MIM updates to run the test (it uses MIM mapreduce, which is new as of today). And context is, indeed, intended to hold project, user, tool, etc.