#2147 Webservice to collect activity data

v1.0.0
closed
sf-4 (350)
Other
nobody
2015-08-20
2011-05-19
No
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).

Discussion

  • Dave Brondsema

    Dave Brondsema - 2011-05-19

    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)

     
  • Dave Brondsema

    Dave Brondsema - 2011-05-27
    • milestone: backlog --> jun-03
     
  • Dave Brondsema

    Dave Brondsema - 2011-05-27
    • size: --> 4
     
  • Rick Copeland - 2011-05-27

    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.

     
  • Rick Copeland - 2011-06-07
    • status: open --> in-progress
    • assigned_to: Rick Copéland
     
  • Rick Copeland - 2011-06-08
     
  • Rick Copeland - 2011-06-08
    • Description has changed:

    Diff:

    --- 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
     
  • Dave Brondsema

    Dave Brondsema - 2011-06-14
    • 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) ?
     
  • Dave Brondsema

    Dave Brondsema - 2011-06-14
    • status: code-review --> in-progress
    • assigned_to: Dave Brondsema --> Rick Copeland ☕
     
  • Rick Copeland - 2011-06-15
    • assigned_to: Rick Copeland ☕ --> Dave Brondsema
     
  • Rick Copeland - 2011-06-15

    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.

     
  • Dave Brondsema

    Dave Brondsema - 2011-06-17
    • status: code-review --> closed
     

Log in to post a comment.