MetricsDataPing: Difference between revisions

m
→‎Document Identifier Strategy: The old UUID description was accidentally left in.
No edit summary
m (→‎Document Identifier Strategy: The old UUID description was accidentally left in.)
Line 38: Line 38:


== Document Identifier Strategy ==
== Document Identifier Strategy ==
Each profile will generate a UUID to be used as the document key.  Each day's submission will use that UUID, and this will also be the key for that profile's cumulative data on the server.  When each submission is received, the server merges it on the fly with the cumulative data, not persisting the individual documents.
When it is time to submit data, the client will collect the latest data and append it to the cumulative view of the data stored locally in the Profile directory.  The client will then generate a new document ID for this submission and post it to the data.mozilla.com service along with a header indicating the previously submitted document ID.  On the server side, the previous document ID is used to delete that document, and the new document is stored with the new ID.  If the server returns a success response to the client, the client saves the ID of the document just submitted as the previous document ID.  If the client does not receive a success response, it will attempt to submit later using the same two document IDs.  This makes sure that we don't leave old data for the installation hanging around.
When it is time to submit data, the client will collect the latest data and append it to the cumulative view of the data stored locally in the Profile directory.  The client will then generate a new document ID for this submission and post it to the data.mozilla.com service along with a header indicating the previously submitted document ID.  On the server side, the previous document ID is used to delete that document, and the new document is stored with the new ID.  If the server returns a success response to the client, the client saves the ID of the document just submitted as the previous document ID.  If the client does not receive a success response, it will attempt to submit later using the same two document IDs.  This makes sure that we don't leave old data for the installation hanging around.


131

edits