Loop/Architecture: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎Desktop Client Architecture: Add link to room context information, and also create a new one for the data channels)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


= Underlying Technologies =
= Underlying Technologies =


== Mozilla Technologies ==
== Mozilla Technologies ==
Line 10: Line 9:
* [[Identity/Firefox Accounts|Firefox Accounts]]
* [[Identity/Firefox Accounts|Firefox Accounts]]
* [[WebAPI/SimplePush|Simple Push]] ({{bug|976789}})
* [[WebAPI/SimplePush|Simple Push]] ({{bug|976789}})
* [[Labs/SocialAPI|Social API]] ({{bug|971987}})
* [https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette Marionette] for functional testing (may include selenium later), and for running unit-test framework.
** '''''Note''': Waiting for feedback from Desktop team about modifications to current Social API approach; may be re-using Social components without being a literal Social provider. Feedback due no later than 25-Apr-2014.''
* Marionette for automating client-side unit tests for build-system & tbpl ({{bug|976127}})


== Third-Party Technologies ==
== Third-Party Technologies ==
* Node.js for Loop server, at least through production
* [http://facebook.github.io/react/ React]
* webl10n for Localization ({{bug|972884}})
* [http://backbonejs.org/ Backbone] (being phased out)
* Node.js for Loop server
* webl10n for Localization, extracted from gaia ({{bug|972884}})
* [http://eslint.org/ eslint] for linting javascript
* Mocha and Chai for client-side and standalone-page unit-testing framework ({{bug|976133}})
* Mocha and Chai for client-side and standalone-page unit-testing framework ({{bug|976133}})
* Not using client CSS toolkit at the moment (this may be revisited) ({{bug|976854}}, {{bug|976857}})
* Not using client CSS toolkit at the moment (this may be revisited) ({{bug|976854}}, {{bug|976857}})
== Open Issues ==
These technology choices will be moved into one of the preceding sections as decisions are made:
* Client MVC Library + associated libs ({{bug|975548}}) -- Probably Backbone
* Client-driven end-to-end framework ({{bug|976114}})
* Standalone-page end-to-end system testing framework ({{bug|976134}})


= Network Architecture =
= Network Architecture =
Line 80: Line 74:
== Address Book ==
== Address Book ==


the main means by which users are expected to initiate Loop calls on desktop is via the "Address Book" sidebar, which will contain a list of the user's contacts. For the initial versions of Loop, contacts will can be populated from several sources, via a one-way synchronization (that is, the data will be imported from a remote authority and updated from that remote authority, but cannot be changed by the Loop client). A necessary implication of this setup is that all contacts will need to track which data source they belong to, and be updated only from those sources.
The main means by which users are expected to initiate Loop calls on desktop is via the "Address Book" sidebar, which will contain a list of the user's contacts. For the initial versions of Loop, contacts will can be populated from several sources, via a one-way synchronization (that is, the data will be imported from a remote authority and updated from that remote authority, but cannot be changed by the Loop client). A necessary implication of this setup is that all contacts will need to track which data source they belong to, and be updated only from those sources.


See [[Loop/Architecture/Address Book]] for detail.
See [[Loop/Architecture/Address Book]] for detail.
== Room Contexts ==
Rooms may have context attached by the user. The context is stored as an encrypted data block on the server.
See [[Loop/Architecture/Context]] for detail.
== WebRTC Data Channels ==
The conversations set up between users may transmit data (e.g. text chat) via WebRTC data channels. There is a specified structure for this data. See [[Loop/Architecture/Data Channels]] for detail.


= Mobile Client Architecture =
= Mobile Client Architecture =

Latest revision as of 13:50, 24 August 2015

Design Goals

Underlying Technologies

Mozilla Technologies

The Loop project relies on a number of other technologies under development within Mozilla. These include the following:

Third-Party Technologies

  • React
  • Backbone (being phased out)
  • Node.js for Loop server
  • webl10n for Localization, extracted from gaia (bug 972884)
  • eslint for linting javascript
  • Mocha and Chai for client-side and standalone-page unit-testing framework (bug 976133)
  • Not using client CSS toolkit at the moment (this may be revisited) (bug 976854, bug 976857)

Network Architecture

Network Diagram

Data Flows

The following diagrams represent the as-built behavior as of Firefox 41.

Browser Startup

Browser Startup

Room Creation

Room Creation

Session Start: Owner Joins Room

Owner Joins Room

Session Start: Guest Joins Room

Guest Joins Room

Session End

Session Ends


Desktop Client Architecture

Address Book

The main means by which users are expected to initiate Loop calls on desktop is via the "Address Book" sidebar, which will contain a list of the user's contacts. For the initial versions of Loop, contacts will can be populated from several sources, via a one-way synchronization (that is, the data will be imported from a remote authority and updated from that remote authority, but cannot be changed by the Loop client). A necessary implication of this setup is that all contacts will need to track which data source they belong to, and be updated only from those sources.

See Loop/Architecture/Address Book for detail.

Room Contexts

Rooms may have context attached by the user. The context is stored as an encrypted data block on the server.

See Loop/Architecture/Context for detail.

WebRTC Data Channels

The conversations set up between users may transmit data (e.g. text chat) via WebRTC data channels. There is a specified structure for this data. See Loop/Architecture/Data Channels for detail.

Mobile Client Architecture

MSISDN (Phone Number) Verification

An important aspect of the user stories for the mobile client is the ability to originate and receive Loop calls from and to a mobile phone number (generally called a "MSISDN") without the need to create or log in to a Firefox Account.

This verification requires two key components: a client implementation running on the mobile device to request a certificate that allows assertion of the MSISDN as an ID, and a server implementation that can verify ownership via SMS, and issue the certificates.

At a high level, the information flow looks like this:

MSISDN Verification

Server Architecture

Database Schema

ID Architecture

ID architecture proposal