Closed Bug 976789 Opened 10 years ago Closed 10 years ago

[meta] see what parts, if any, of unlanded SimplePush work is required for loop_mvp

Categories

(Hello (Loop) :: Client, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
mozilla33

People

(Reporter: dmosedale, Unassigned)

References

Details

Bug 857464 and its dependents may not be necessary for our MLP at all. There's a theory that it's already available to chrome, and that we could use it there.  

First step is to find out from dougt if that's true and what exactly the API is.
Blocks: loop_mlp
No longer blocks: 972886
Just had a long discussion with dougt, and it sounds like we will in fact need much of the code in the bug 857464 dependency tree, but that much of it's in progress. 

As a next step, he's going to mail me or post here more code/context about what all we would need to do.
Blocks: 972886
No longer blocks: loop_mlp
Blocks: loop_mlp
No longer blocks: 972886
Flags: needinfo?(dougt)
This is currently believed to be the thing that's most viable to scale, so the intent is to go forward with it.  However, we're still waiting on a needinfo for more details.
Status: NEW → ASSIGNED
dougt
Heh, whoops.  I was starting to say that my impression from dougt was that it might be possible for us to get a quick patch in order to things moving quickly, but he wondered what API would be most useful for that.

Given our current approach of running SocialAPI panels with chrome privs, and discussions with various folks, it's not obvious to me what we actually want here.
I think it would make sense that if we have chrome privs in SocialAPI then we use a gecko service or javascript module which would be a listener for the push notifications that we want. As it is a service, it would be available regardless of which windows/panels had already been opened.

Whilst we could use the social api background worker, this would add another layer of postMessage/onmessage event handling, that I don't think is necessary.
Would that be a potential solution to wake up the SocialAPI worker when Firefox receives a simple push notification, so we avoid running the worker when we don't need it?

(In reply to Mark Banner (:standard8) from comment #5)
> Whilst we could use the social api background worker, this would add another
> layer of postMessage/onmessage event handling, that I don't think is
> necessary.
+1 for less message proxying.
nikhil is sending what he has.
Flags: needinfo?(dougt) → needinfo?(nsm.nikhil)
Depends on: 984575
Flags: needinfo?(nsm.nikhil)
nsm was kind enough to send along the following, posted here with his permission:


https://tbpl.mozilla.org/?tree=Try&rev=8977bfe99b0a

Here is a build of Firefox that supports the following:
- ServiceWorker registration (no unregistration). If you want to
unregister, just delete the file serviceworkerstore.json from your
profile directory.
- Enables push notifications
- Sends Push notification to serviceworker registered for the domain.

Right now it's specifically push only, do let me know if you need other
events and I can show you guys how to do it. For a look at how to send
events, see dom/push/src/PushService.jsm, where you get an instance of
ServiceWorkerManager and sendEvent() to it.

While all the tests on tbpl have failed, that is because i have one bad
line in my code. My local build works, so it shouldn't be a problem. If
it does crash, In dom/workers/ServiceWorkerManager.cpp, comment out the
RemoveObserver() line from the ServiceWorkerManager::Observe().

Here is a sample application:
https://github.com/nikhilm/simplepush-test-app/tree/serviceworker

Let me know if there are any problems.
Blocks: loop_mvp
No longer blocks: loop_mlp
Summary: see what parts, if any, of unlanded SimplePush work is required for loop_mlp. → see what parts, if any, of unlanded SimplePush work is required for loop_mvp
Blocks: loo_mvp_allup
No longer blocks: loop_mvp
Summary: see what parts, if any, of unlanded SimplePush work is required for loop_mvp → [meta] see what parts, if any, of unlanded SimplePush work is required for loop_mvp
This is part of needed work for bug 1002414 / bug 1013251
Assignee: dmose → nobody
Blocks: 1013251, 1002414
Status: ASSIGNED → NEW
Priority: -- → P1
Target Milestone: --- → mozilla32
Target Milestone: mozilla32 → mozilla33
we do not want to rely on the existing Push implementation in desktop - so need to continue to use our custom implementation.  network API we are using will be available, but desktop PUSH is changing to evolving w3c spec.
(In reply to sescalante from comment #10)
> we do not want to rely on the existing Push implementation in desktop - so
> need to continue to use our custom implementation.  network API we are using
> will be available, but desktop PUSH is changing to evolving w3c spec.

As discussed with Adam, we're not using the Push implementation in desktop for now due to expected significant changes to the push api before it is made public, so for now we're going to continue using our own impl.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.