canmove, Confirmed users
1,537
edits
(23 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|'''Feature/Product:''' || Firefox Home | |'''Feature/Product:''' || Firefox Home | ||
|- | |- | ||
|'''Projected Feature Freeze Date:''' || <section begin='eta' /> | |'''Projected Feature Freeze Date:''' || <section begin='eta' /> Cancelled <section end='eta' /> | ||
|- | |- | ||
|'''Product Champions:''' || | |'''Product Champions:''' || - | ||
|- | |- | ||
|'''Privacy Champions:''' || [[User:Sidstamm|Sid Stamm]] | |'''Privacy Champions:''' || [[User:Sidstamm|Sid Stamm]] | ||
Line 12: | Line 12: | ||
|'''Security Contact:''' || Michael Coates | |'''Security Contact:''' || Michael Coates | ||
|- | |- | ||
|'''Document State:''' || <section begin='status'/>{{ | |'''Document State:''' || <section begin='status'/>{{Resolved|Obsolete -- project with this design dropped}}<section end='status'/> | ||
|} | |} | ||
Line 21: | Line 21: | ||
|'''Architectural Overview:''' || 27-April-2011 (crypto proxy) TBD (home server) | |'''Architectural Overview:''' || 27-April-2011 (crypto proxy) TBD (home server) | ||
|- | |- | ||
|'''Recommendation Meeting:''' || | |'''Recommendation Meeting:''' || cancelled | ||
|- | |- | ||
|'''Wrap-up Meeting:''' || | |'''Wrap-up Meeting:''' || cancelled | ||
|} | |} | ||
Line 31: | Line 31: | ||
'''The main objective of this feature/product is:''' (describe the goals of the feature/product here) | '''The main objective of this feature/product is:''' (describe the goals of the feature/product here) | ||
* [[Home/Roadmap]] | |||
'''Design Documents''': | '''Design Documents''': | ||
Link to any design or architectural documents here. | Link to any design or architectural documents here. | ||
* [[Firefox_Home_Options|Pros and Cons of different architectures]] | |||
* [[Firefox_Home_Components]] | |||
* [[Firefox_Home_Server_Architecture]] | |||
'''Feature Pages''': | '''Feature Pages''': | ||
[[Home/Features/crypto/proxy]] | * [[Home/Features/crypto/proxy]] | ||
== Components == | == Components == | ||
Describe any major components in the system and how they interact. Also include any third-party APIs (those Mozilla does not control) and what type of data is sent or received via those APIs. | Describe any major components in the system and how they interact. Also include any third-party APIs (those Mozilla does not control) and what type of data is sent or received via those APIs. | ||
[[File:HomeDigraph.png]] | |||
=== Crypto Proxy === | === Crypto Proxy === | ||
Line 120: | Line 128: | ||
|} | |} | ||
=== Home Server | === Home Web Servers === | ||
'' | |||
We will have stateless web servers that run the Home web application. These are standard web servers running Apache or NGINX to serve the Home web application. | |||
These servers will likely be load balanced by Zeus. | |||
These servers are supposed to be stateless so no data will stored on these servers. However, they might have sensitive configuration settings stored on them. For example things like web service keys or tokens that we need to connect to third party services. These are not user specific but instead are for the Home application. | |||
(These external services have not been identified yet, but think about services like bit.ly.) | |||
The tables below simply summarize the data encountered by this component. | |||
'''Stored Data:''' | |||
None. Except probably configuration data. | |||
'''Communication with MemCache Server''' | |||
{| class="wikitable" | |||
|- | |||
! Direction | |||
! Message | |||
! Data | |||
! Notes | |||
|- | |||
| ''In:'' | |||
| Get Web Session | |||
| The Web Session object. | |||
| | |||
|- | |||
| ''Out:'' | |||
| Put Web Session | |||
| The Web Session object. | |||
| | |||
|} | |||
'''Communication with Home Database Servers''' | |||
{| class="wikitable" | |||
|- | |||
! Direction | |||
! Message | |||
! Data | |||
! Notes | |||
|- | |||
| ''Select'' | |||
| Get the user's (summarized) sync data | |||
| -| | |||
|- | |||
| ''Out:'' | |||
| Insert/Update User's Web App Settings/Prefs | |||
| - | |||
| | |||
|} | |||
=== Home Database Servers === | |||
User data will sharded over a number of database servers. We will use a simple hashing mechanism so that we can determine where a user's data lives based on for example their username. | |||
Each database will contain a plaintext version of the user's sync data. Initially that means bookmarks, history and tabs. The data will be normalized and properly indexed a bit more than it currently is in the Sync Servers so that it is easier to query for things. | |||
All data for all users will be stored in a single database. This means that all records have a unique username or userid field to connect them to a specific user. Queries will have to be properly constructed to follow this. | |||
(We can probably also switch to one database per user which will mean that there a more logical separation between user's data. However that does not rule out bugs in the front-end code to expose other user's data of course.) | |||
One thing we will probably do is run some queries offline. For example we can periodically 'calculate' a list of your top sites and store that in a database table too. | |||
The tables below simply summarize the data encountered by this component. | The tables below simply summarize the data encountered by this component. | ||
Line 134: | Line 204: | ||
! Where | ! Where | ||
|- | |- | ||
| data | | User's Bookmarks (Sync Data) | ||
| | | MySQL Database | ||
|- | |||
| User's History (Sync Data) | |||
| MySQL Database | |||
|- | |||
| User's Tabs (Sync Data) | |||
| MySQL Database | |||
|- | |||
| User specific settings/prefs for Firefox Home | |||
| MySQL Database | |||
|- | |||
| User access token for the Crypto Proxy | |||
| MySQL Database | |||
|} | |||
'''Communication with other components or services''' | |||
The database servers will periodically run a job to schedule a Sync operation for those users that are active users of Firefox Home. These jobs are submitted to a RabbitMQ server and picked up by the 'Syncer' component. These tasks only contain the username to be synced. | |||
(Idea: Many users try out a new service and then forget about it. We could proactively delete user's data when they do not use Firefox Home for a certain period of time. Note that in the first couple of releases of Home there will not be any user generated data, just a copy of your existing Sync Data. So this is less scary than it sounds.) | |||
=== Home Memcache Servers === | |||
The memcache servers are used to cache frequently used data to make the web app as responsive as possible. Initially just Web Application session objects are stored in memcache. These sessions are Python objects that contain user specific cached data. | |||
(Not sure what will actually be in there. Possibly fragments of JSON or HTML or lists of things that we generate from your bokomarks & history) | |||
'''Stored Data:''' | |||
{| class="wikitable" | |||
|- | |||
! What | |||
! Where | |||
|- | |||
| Web Application Session | |||
| MemCache Server | |||
|} | |} | ||
'''Communication with | === Home Syncer === | ||
The 'Syncer' is a component that implements a sync client. It listens to a RabbitMQ queue to grab sync tasks and runs sync sessions. | |||
The task that it gets from RabbitMQ contain just the username. This means that the Syncer will have to access the Home Database Servers to obtain the access token for the Crypto Proxy. | |||
It will then run a sync session for the specific user against the Sync Proxy and store the synced data (bookmarks, tabs, history) in the Home Database Servers, | |||
'''Stored Data:''' | |||
None | |||
'''Communication with Home Database Servers''' | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 147: | Line 264: | ||
! Notes | ! Notes | ||
|- | |- | ||
| '' | | ''Select'' | ||
| | | Get User's Proxy Access Token | ||
| | | (Access Token) | ||
| | | | ||
|- | |- | ||
| '' | | ''Insert/Update'' | ||
| | | Update the Sync Data | ||
| | | (Bookmarks, History, Tabs) | ||
| | | | ||
|} | |} | ||
'''Communication with | '''Communication with Crypto Proxy''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 168: | Line 284: | ||
|- | |- | ||
| ''In:'' | | ''In:'' | ||
| | | sync() return | ||
| | | unencrypted tabs/bookmarks/history | ||
| | | Called to get access to user's sync data | ||
|- | |- | ||
| ''Out:'' | | ''Out:'' | ||
| | | sync() call | ||
| | | access token + username | ||
| | | Called to obtain access to sync data | ||
|} | |} | ||
Line 233: | Line 349: | ||
[[Category:Privacy/Reviews| | [[Category:Privacy/Reviews|Home]] |