CloudServices/FirefoxMobileServices/ChannelService: Difference between revisions
(→Design) |
|||
Line 49: | Line 49: | ||
==Platform Requirements== | ==Platform Requirements== | ||
===Firefox OS Modifications=== | |||
Currently there's a PushService in the parent process. This proposal changes the structure. | |||
== | * A thread will be launched from the parent process (referred to as the 'Services' Thread) | ||
* The Services thread will have two portions running in it to begin with | |||
** channel.jsm - Channel handling code, split out from the current PushService.jsm, that handles the connection and implements a basic API for other code that is in the Services Thread | |||
** push.jsm - Push daemon refactored to utilize the Channel API. PBackground will likely need to be used to have the DOM API call into this thread hanging off the main thread | |||
The Channel API will allow other code running in the Services Thread to hook in via Events and direct Calls: | |||
Events (to register for): | |||
* OnConnect (called anytime the connection is established) | |||
* OnDisconnect (called if the connection is interrupted) | |||
* OnMessage (called when a message is received over the channel for this service) | |||
API Calls: | |||
* Send(payload, service) - Send the payload over the channel. It will end up in the server-side service handling it. (ie. if push.jsm wanted to send a call to the Push service, it would call Send('whatever', 'push') ) | |||
===Cloud Services Channel Service=== | |||
The Cloud Services Channel Service (fondly pronounced '''koos'''-koos) handles the server-side termination of the channel from each device. | |||
===Push Server Modifications=== | |||
The Push server service will need to be modified to work with the Cloud Services Channel Service. | |||
==Code Repository== | ==Code Repository== | ||
Line 59: | Line 80: | ||
==Release Schedule== | ==Release Schedule== | ||
<i>Predicted code delivery dates</i> | <i>Predicted code delivery dates</i> | ||
=QA= | =QA= | ||
==Points of Contact== | ==Points of Contact== |
Revision as of 22:45, 12 March 2014
Overview
Channel Service is a service for Mozilla Cloud Services that need to communicate with a Firefox OS client-side component.
Project Contacts
Principal Point of Contact (US) - Ben Bangert bbangert@mozilla.com
Principal Point of Contact (EU) - Tarek Ziade tziade@mozilla.com
Goals
To develop a single multiplexed communication channel between FxOS devices and Mozilla Cloud Services.
This should result in:
- Cleaner client-side services code in the FxOS parent process
- Clean separation between the code handling the persistent connection between the device and Cloud Services
- Ability to easily update client-side service code without affecting complex channel code
- Ability to easily update the server-side code for higher client handling efficiency without changing Cloud Services code
Use Cases
Push
The first candidate for using the ChannelService is Push, which is already on FxOS. At the moment the code handling the socket connection is mixed in with the code handling the DOM API's for Push. By splitting the channel out, future Push updates could be easier to land in the client.
Presence
The Presence project would benefit from having an easier client-side API to use for talking over a single shared channel.
Requirements
- Client-side JSM developer familiar with Push's implementation that can split out the socket handling portion
- Client-side Push JSM developer to refactor the client-side portion to use the new FxOS Channel Service
- Server-side dev's to implement the new Mozilla server-side portion
- Server-side Push dev's to restructure Push to utilize the Mozilla Cloud Channel Service
Design
Platform Requirements
Firefox OS Modifications
Currently there's a PushService in the parent process. This proposal changes the structure.
- A thread will be launched from the parent process (referred to as the 'Services' Thread)
- The Services thread will have two portions running in it to begin with
- channel.jsm - Channel handling code, split out from the current PushService.jsm, that handles the connection and implements a basic API for other code that is in the Services Thread
- push.jsm - Push daemon refactored to utilize the Channel API. PBackground will likely need to be used to have the DOM API call into this thread hanging off the main thread
The Channel API will allow other code running in the Services Thread to hook in via Events and direct Calls:
Events (to register for):
- OnConnect (called anytime the connection is established)
- OnDisconnect (called if the connection is interrupted)
- OnMessage (called when a message is received over the channel for this service)
API Calls:
- Send(payload, service) - Send the payload over the channel. It will end up in the server-side service handling it. (ie. if push.jsm wanted to send a call to the Push service, it would call Send('whatever', 'push') )
Cloud Services Channel Service
The Cloud Services Channel Service (fondly pronounced koos-koos) handles the server-side termination of the channel from each device.
Push Server Modifications
The Push server service will need to be modified to work with the Cloud Services Channel Service.
Code Repository
Links to the published code bases
Release Schedule
Predicted code delivery dates
QA
Points of Contact
Engineer - Name contact@info
Test Framework
Security and Privacy
Fill out the security & privacy bug template: https://bugzilla.mozilla.org/form.moz-project-review (https://wiki.mozilla.org/Websites/Kick-Off_Form)
For security reviews, there's: https://wiki.mozilla.org/Security/ReviewProcess
Points of Contact
Questionnaire Answers
1.1 Goal of Feature
2. Potential Threat Vectors and Mitigation Points
Review Status
Bugzilla Tracking # - see https://wiki.mozilla.org/Security/Reviews
Issues and Resolutions
Legal
Points of Contact
Operations
Points of Contact
Deployment Architecture
Bugzilla Tracking # -