Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveQuery for Android #437

Closed
Eke opened this issue Apr 9, 2016 · 49 comments
Closed

LiveQuery for Android #437

Eke opened this issue Apr 9, 2016 · 49 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@Eke
Copy link

Eke commented Apr 9, 2016

Hello,

Is there any plan to add live query support for android sdk like in ios sdk?

@nlutsenko nlutsenko added the type:feature New feature or improvement of existing feature label Apr 18, 2016
@nlutsenko
Copy link
Contributor

Hey @Eke, the plan is definitely there and we are working on it.
Unfortunately we don't have a precise date on when it's going to launch.

We'll update this issue when we have more details.

@nlutsenko nlutsenko changed the title [Question] Live Query Live Query for Android Apr 18, 2016
@TGIO
Copy link

TGIO commented Apr 18, 2016

So there is no point for implementing it and making PR ?

@nlutsenko
Copy link
Contributor

@TGIO, we can work on it together! Absolutely!
We have a work-in-progress implementation for this right now, but it's not ready, but we would love to get the contribution on it.

Going to talk to @richardjrossiii about making the current state of the live query public and we'll update this issue with the link...

@TGIO
Copy link

TGIO commented Apr 18, 2016

@nlutsenko Well, i've got it working too :)
But i'm not sure about design decisions i've made.

@nlutsenko
Copy link
Contributor

Share the link? We can combine the effort!

@TGIO
Copy link

TGIO commented Apr 18, 2016

Will share as soon as i wrap it.

@TGIO
Copy link

TGIO commented Apr 18, 2016

@nlutsenko simplest POC

@xxzulaxx
Copy link

Please do share guys, thank you for the hard work. This is last item on the list before i am done with migration.

@JeremyPlease
Copy link

@TGIO Thanks for putting together that POC! What are the current limitations with your implementation?

@nlutsenko @richardjrossiii Any update on releasing what you guys are working on?

@TGIO
Copy link

TGIO commented May 10, 2016

@JeremyPlease no limitations so far. Going to use it in production soon.

There is one problem though. I didn't understand usage of "requestId" quite well and found no definition of it.

@JeremyPlease
Copy link

@TGIO Awesome--thanks!

If you have a moment, could you please share a little code snippet here on how to use?

@TGIO
Copy link

TGIO commented May 11, 2016

this is very raw example, but it proves that this is possible

@JeremyPlease
Copy link

@TGIO Nice. That's plenty. Sorry I didn't look in the starter folder first!

@TGIO
Copy link

TGIO commented May 18, 2016

@nlutsenko any updates ?

@JeremyPlease was it useful for you ?

@JeremyPlease
Copy link

@TGIO We haven't used your code yet. I'll let you know when we do though.

@benitech
Copy link

no release date yet?

@TGIO
Copy link

TGIO commented Jun 15, 2016

update #480

@TGIO
Copy link

TGIO commented Jul 8, 2016

update Library

@khirr
Copy link

khirr commented Aug 14, 2016

Hi @TGIO, I've make some changes to can work with subscription easily, maybe you can use it and merge with you library: https://github.com/khirr/ParseLiveQuery

@TGIO
Copy link

TGIO commented Aug 14, 2016

@khirr Hi, awsome. Will check it out and try to merge. Thank you.

@lifeisfunny
Copy link

android ? anyupdate?

@zouzoux
Copy link

zouzoux commented Aug 22, 2016

Hopefully it wont take too much time!

@Onwa1kenobi
Copy link

Still waiting for the official release.

@aleshu
Copy link

aleshu commented Sep 6, 2016

@nlutsenko Are you still working on this? If not, would you please share your code so it can be continued on github? Thanks!

@khirr
Copy link

khirr commented Sep 6, 2016

@aleshu Hi, his code is already on github.

@aleshu
Copy link

aleshu commented Sep 6, 2016

Thanks mate, but I've only seen yours and TGIO's implementations (which are very good), but nothing from an official channel.

nlutsenko posted:

We have a work-in-progress implementation for this right now, but it's not ready, but we would love to get the contribution on it.
Going to talk to richardjrossiii about making the current state of the live query public and we'll update this issue with the link...

I wish they could make it public as-is; it's been a while now and I fear the project has been abandoned.

@benitech
Copy link

benitech commented Sep 6, 2016

yea, doesn't seem to be much going on in the "Android-SDK" repo at all. Doesn't make sense to use any feature which is released for iOS and almost 4 months later has no compatibility with Android.

If it continues like this, better consider other options.

@khirr
Copy link

khirr commented Sep 16, 2016

Hi, I just added new options to https://github.com/khirr/ParseLiveQuery

  • Re-connect option
  • SessionToken support, for ACL objects
  • Connect & Disconnect manually

Any feedback is appreciated.

@TGIO
Copy link

TGIO commented Sep 16, 2016

@khirr what do u think about merging ?

@khirr
Copy link

khirr commented Sep 16, 2016

Hi @TGIO, yes for sure, you can merge it, then I can send you commits, I'm just learning how does git works haha.

@TGIO
Copy link

TGIO commented Sep 16, 2016

@khirr try to make a pull request into my lib so i can merge it

@khirr
Copy link

khirr commented Sep 16, 2016

@TGIO Ok, I'm going to try it.

@khirr
Copy link

khirr commented Sep 16, 2016

@TGIO pull request sent.

@cagdasalagoz
Copy link

So? Is is live now?

@TGIO
Copy link

TGIO commented Sep 21, 2016

@cagdasalagoz our (3rd party) library is ready for use

@tofutim
Copy link

tofutim commented Oct 17, 2016

Seems that Parse (at least client side) has been abandoned by Parse.

@flovilmart
Copy link
Contributor

There is some effort that we put in our our side as well and we'll likely release something officialy on that org soon.

@ghost
Copy link

ghost commented Oct 24, 2016

Sound great @flovilmart

@jhansche
Copy link
Contributor

@nlutsenko @richardjrossiii @TGIO
What's the current plan/expectation of this? Will @TGIO's implementation be pulled into the ParsePlatform org, and be officially maintained somehow?
Any reason the official project hasn't been published yet?

@flovilmart
Copy link
Contributor

There is an implementation about to be open on the parseplatform org, in the meantime you can use TGIO's

@pdkcoder
Copy link

pdkcoder commented Dec 1, 2016

How is it going mate? Any official update?

@pirakleous
Copy link

Any news?

@queiroz
Copy link

queiroz commented Jan 22, 2017

There hasn't been much movement here for a while, I was also wondering of when Live Query will be officially supported by the Parse Android SDK!

@fadwafb
Copy link

fadwafb commented Feb 8, 2017

Hello guys ! I just wanted to share a good news with you.
capture
https://parseplatform.github.io/docs/parse-server/guide/#live-queries

@rogerhu rogerhu changed the title Live Query for Android LiveQuery for Android Mar 21, 2017
@rogerhu
Copy link
Contributor

rogerhu commented Mar 21, 2017

So there actually is a work in progress and I think we're closer than most people think.

The Live Query protocol is already built on parse-server, so it's a matter of handling the create, update, leave, and delete events (see https://github.com/ParsePlatform/parse-server/wiki/Parse-LiveQuery-Protocol-Specification) and subscribing/unsubscribing to certain Parse queries.

Nonetheless, the goal is to get stuff parity with the iOS branch. It's a not a lot of code (https://github.com/ParsePlatform/ParseLiveQuery-iOS-OSX/blob/master/Sources/ParseLiveQuery/) and should be doable. Most of the work is implemented here: https://github.com/ParsePlatform/ParseLiveQuery-iOS-OSX/blob/master/Sources/ParseLiveQuery/Subscription.swift

Test app here to help showcase the behavior: https://github.com/ParsePlatform/ParseLiveQuery-Android/pull/16/files

Here are my observations of the current work:

There are two implementations in flight, one located at https://github.com/TGIO/ParseLiveQuery and one at https://github.com/ParsePlatform/ParseLiveQuery-Android.

  1. https://github.com/ParsePlatform/ParseLiveQuery-Android needs an update to v1.14.0 (see Bump to Parse Android v1.14.0 ParseLiveQuery-Android#11). We made a breaking change to how JSON data gets parsed.

  2. TGIO uses Rx to send to bus events (https://github.com/TGIO/ParseLiveQuery/blob/master/parse-livequery/src/main/java/tgio/parselivequery/RxBus.java). Obviously the use of RxJava becomes problematic especially if your app had to choose between RxJava 1 vs RxJava 2. I'm not sure we should be using it.

  3. Similar to the iOS version, https://github.com/ParsePlatform/ParseLiveQuery-Android tries to use ParseQuery to subscribe to bus events. There are some issues if you have a ParseQuery that uses order by semantics (see orderBy queries in subscribing trigger "Additional properties not supported" by Parse Server ParseLiveQuery-Android#14).
    I think we may need our own Parse encoding/decoding as it's done in the iOS version (https://github.com/ParsePlatform/ParseLiveQuery-iOS-OSX/blob/master/Sources/ParseLiveQuery/Internal/QueryEncoder.swift)

  4. TGIO uses a BaseQuery. The type of query events you can subscribe may be very limiting?

  5. https://github.com/ParsePlatform/ParseLiveQuery-Android uses TubeSocket library for web socket. I think it should just be deprecated for OkHttp's websockets (see Change to use OkHttp instead of TubeSock ParseLiveQuery-Android#13), which the TGIO library already uses. There appears to be reconnect logic already as discussed here

Both appear to be proof of concepts though appear to work fine. I'm curious how we can reconcile the implementations to combine the best of both worlds?

@flovilmart
Copy link
Contributor

@mmimeault, what do you think?

@mmimeault
Copy link
Contributor

I think that https://github.com/ParsePlatform/ParseLiveQuery-Android is more than a WIP, as some people are already using it in production.

Of course, like @rogerhu said, it may need some updates. But its API is exactly the same as the iOS app. It will be easier to support this implementation as the code is also similar to the iOS impl.

I haven't checked the TGIO implementation, so I don't know anything about it.
My vote will, of course, go to the one I implemented, I'm not impartial at all here.

I will continue to support it as we use it in production where I work. I will try to attack soon the most important issues that @rogerhu raised.

Thanks.

@rogerhu
Copy link
Contributor

rogerhu commented Mar 21, 2017

Great! I suggest we publish the info on the http://parseplatform.org/docs/android/guide/ as soon as you think it's ready.

For instance, http://docs.back4app.com/docs/android/live-query/ is using the TGIO library. I don't think most people realize that there is an official one being maintained.

@rogerhu
Copy link
Contributor

rogerhu commented Mar 27, 2017

Docs being updated: https://github.com/ParsePlatform/docs/pull/420/files

v1.0.1 release is released and being propagated through Maven Central (may take a few hours), which includes a bunch of improvements (including addressing all issues previously listed.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests