timoreimann / open-klyph

Open Klyph is a free, community-driven continuation of the Klyph Facebook client for Android.
6 stars 1 forks source link

consider f-droid inclusion #6

Open rtreffer opened 10 years ago

rtreffer commented 10 years ago

f-droid has a problem with the proprietary libs, see https://f-droid.org/forums/topic/klyph-for-facebook/ for details.

Please try to make open-klyph available on f-droid :-)

rtreffer commented 10 years ago

The related klyph ticket: https://github.com/jonathangerbaud/Klyph/issues/3 (open, no comments)

timoreimann commented 10 years ago

Inclusion in f-droid would definitely be nice. At a first glimpse, most proprietary libraries seem neglectable. The one I'm uncertain about is the Google Cloud Messaging service as it may be hard to cover its functionality in a FOSS way (at least at the same level of quality and performance).

I'm only about to dive deeper into Klyph's code base; once I have a better feeling for what's still going to be required for Open Klyph I'll re-assess f-droid inclusion in more detail.

rtreffer commented 10 years ago

I just greped a bit through the code... Especially for GCM

  1. It's one of the alternatives for push notifications (see com.abewy.android.apps.klyph.KlyphService)
  2. The other alternative is ADM (amazon device messaging)
  3. It can be disabled via settings
  4. It looks like it's redundant compared to startPeriodicNotificationService

GCMIntentService:

  1. It starts NotificationService or FriendRequestService
  2. NotificationService from what I can tell (2min code read) simply goes off and fetches stuff from fb onStartCommand
  3. The same intent comes from the startPeriodicNotificationService method (EDIT)

Looks like it's 100% replaceable as it's only one possible update trigger, meaning the app should fall back to polling. There is also a comment stating "our servers might be offline"....

I couldn't find more real uses for gcm/adm.

rtreffer commented 10 years ago

It might be possible to put that code into a lib that's only pulled in some maven profiles....

timoreimann commented 10 years ago

Sounds good. One thing we may want to keep in mind though is the impact on battery lifetime when preferring polling over a messaging service. This may not be much of an issue for the existing use cases (like rarely occurring friend requests) but may become one for events that benefit from frequent updates. I'm not saying that we can't get rid of GCM, just that we need to do some careful assessment as to what seems useful to have in the future.

Even if we stick to GCM: I certainly want to keep a fallback mechanism, so local polling will still be needed and the logic could therefore be moved into a separate library that's to be employed in non-FOSS builds only.

Thanks for taking the time to do some research.

rtreffer commented 10 years ago

One more thing: I couldn't find the (python) source for the server...

timoreimann commented 10 years ago

Yeah me neither. I think the original Klyph author missed to open source it for whatever reason.

I will bug him about it once I get to it.

dalb8 commented 10 years ago

Note that Telegram have recently abandonded GCM to use their own polling method. They said that some messages were getting lost by GCM. I would say their implementation would be a good example to follow.

@rtreffer I made a post on Gravity ROM thread, please take a look!

timoreimann commented 10 years ago

@dalb8, do you have any references that would back the argument that GCM is really broken? The only things I could find with Telegram were issues #125 and #303, which basically state that some users are having issues with notifications not being delivered. The impression I get from the tickets is that the problem hasn't been fully analyzed though, and the team instead decided to work around by creating their own notification service. Frankly, I think that's a fairly big move as entire teams at Google, Amazon, and other companies are dedicating full time effort into creating such services in a scalable, high-performing way. I have a lot of respect for what it takes to achieve that, so I'd not want to go down that route too easily.

Even if GCM was broken, I'd first consider alternatives (like Amazon Device Messaging, which IIRC is built into Klyph already but not enabled in the free version for some reason).

How's a post you made on a ROM related to the issue?

dalb8 commented 10 years ago

I don't have any references but I've been using a fork of Telegram for a while and it behaves quite well: Telegram uses 2% of battery and I'd expect the new implementation to work better. I know they also factored in the fact that GCM isn't on all devices. I suppose they'd like to market to China as well as Gapps-dodgers. Amazon Mobile SDK isn't free software either and ADM don't work with non-Kindle devices, as far as I can see. OpenMobster is free though I've not seen an app that uses it; TextSecure have a websockets thing on their server but it has yet to be fully implemented client-side.

My address to .@rtreffer wasn't related to this issue.

rtreffer commented 10 years ago

Just a small heads up: regarding gfreed I'm currently finishing my contact merger and will then start the next iteration.

Regarding GCM etc: I guess it would be best to use multiple profiles e.g. google/amazon/floss to specify a set of bundled libs + switching to Class.forName. Anyway, if open-klyph or klyph would be ready in time I'd bundle them. I may also delay gfreed and fix this as openkeychain has some awesome changes in the pipeline that I would like to ship.

On 20. Juni 2014 18:11:24 MESZ, dalb8 notifications@github.com wrote:

I don't have any references but I've been using a fork of Telegram for a while and it behaves quite well: Telegram uses 2% of battery and I'd expect the new implementation to work better. I know they also factored in the fact that GCM isn't on all devices. I suppose they'd like to market to China as well as Gapps-dodgers. Amazon Mobile SDK isn't free software either and ADM don't work with non-Kindle devices, as far as I can see. OpenMobster is free though I've not seen an app that uses it; TextSecure have a websockets thing on their server but it has yet to be fully implemented client-side.

My address to .@rtreffer wasn't related to this issue.


Reply to this email directly or view it on GitHub: https://github.com/timoreimann/open-klyph/issues/6#issuecomment-46696630

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.