My favorites | Sign in
Project Logo
             
Search
for
Updated May 07, 2009 by griswolf
DumpingDumpTables  
Design doc for removing the dumps table

A work item that came out of the Socorro Postgres work week is to dump the dump tables and store cooked dumps as gzipped files.

Drop dumps table

convert each dumps table row to a compressed file on disk

Bugzilla

https://bugzilla.mozilla.org/show_bug.cgi?id=484032

Library support

'done' as of 2009-05-07 in socorro.lib.dmpStorage (Coding, testing is done; integration testing is done, 'go live' is today)

Socorro UI

/report/index/{uuid}

Dump file format

On Disk Location

application.conf dumpPath Example for kahn $config'dumpPath' = '/mnt/socorro_dumps/named';

In the dumps directory we will have an .htaccess file:

  AddType "application/json; charset=UTF-8" jsonz
  AddEncoding gzip jsonz

Webhead will serve these files as

  Content-Type: application/json; charset=utf-8
  Content-Encoding: gzip

'''Note:''' You'd expect the dump files to be named json.gz, but this is broken in Safari. By setting HTTP headers and naming the file jsonz, an unknown file extension, this works across browsers.

Socorro UI

Example:

mod rewrite rules will match /dump/.jsonz and change them to access a file share.

Future Enhancement

A future enhancement if we find webheads are high CPU would be to move populating the report/index page to client side.

Test Page

http://people.mozilla.org/~aking/Socorro/dumpingDump/json-test.html - Uses browser to decompress a gzip compressed JSON file during an AJAX request, pulls it apart and appends to the page.

Test file made with gzip dump.json


Sign in to add a comment
Hosted by Google Code