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

Correctly resolve methods #110

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

PhilippSpo
Copy link

This PR fixes issue #109 .

Changes

  • handle updated events for methods
  • resolve on updated events if there was a previous result event
  • cache the method result on result events if there was no previous updated event
  • resolve on result events if there was a previous updated event
  • propagate potential logout errors

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 1e2f3a2 on PhilippSpo:master into 7192311 on mondora:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 6f5da64 on PhilippSpo:master into 7192311 on mondora:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 0d5fc88 on PhilippSpo:master into 7192311 on mondora:master.

@apendua
Copy link

apendua commented Feb 24, 2017

Does anyone know if there a chance this PR gets merged anytime soon?

@PhilippSpo
Copy link
Author

PhilippSpo commented Feb 24, 2017

@apendua did not hear any response since I created the PR, sadly. We are working of our own fork atm 😉

@aadamsx
Copy link

aadamsx commented Mar 13, 2017

@PhilippSpo you don't have issues turned on on your asteroid fork, so I'll ask here, I'm considering using asteroid in order to use a shared server between two meteor apps, and I'm moving from Blaze to React (or Vue):

  1. Do you recommend using asteroid for this?

  2. Do you recommend using your fork over this master branch (considering this master branch hasn't been updated since Oct of last year)?

@PhilippSpo
Copy link
Author

@aadamsx you can definitely use asteroid to do that if you are OK with extending it to your own needs. Maybe it might be better though to directly use the underlying ddp.js library (that has its own problems btw).

In my fork, I fixed a couple of things but it is also not perfect. I probably won't keep working on it either, since I plan to move to Apollo and drop Meteor completely.

@aadamsx
Copy link

aadamsx commented Mar 13, 2017

Thanks @PhilippSpo

Maybe it might be better though to directly use the underlying ddp.js library

You mean something like this? http://stackoverflow.com/a/26173770/2547360 (are there any tutorials on using ddp directly for things like sub/meteor calls/logins?)

It sounds like you don't recommend using Asteroid, maybe because of the lack of development and unfixed issues?

I probably won't keep working on it either, since I plan to move to Apollo and drop Meteor completely.

Won't you loose the realtime/reactive aspects? And isn't Apollo still very young to use in Production? And by adopting Apollo, couldn't we run into the same situation we now find ourselves in with Meteor?

Also, what about new features being added to Meteor, like Dynamic imports in 1.5 (https://forums.meteor.com/t/ben-newman-demos-meteor-1-5/34475)?

Or new addons that solve things like scale: Redis Oplog (https://forums.meteor.com/t/meteor-scaling-redis-oplog-status-1-1-7/30855) and Grapher (https://forums.meteor.com/t/grapher-collection-relationship-manager-graphql-like-data-fetcher/29732)?

Or even fun stuff like Visual Meteor (https://forums.meteor.com/t/visual-meteor-coming-soon/33979).

Don't these developments give even more of an incentive to say with Meteor instead of going the Apollo way? As an expert with much experience, I'm curious to hear your thoughts on this -- because I'm at a point where I could switch to Apollo too.

@PhilippSpo
Copy link
Author

PhilippSpo commented Mar 13, 2017

are there any tutorials on using ddp directly

Not that I know of. Also, the only good implementation of DDP in Javascript I know if is the Meteor itself.

It sounds like you don't recommend using Asteroid

It is probably the best bet right now if you need a DDP client for a Meteor backend. It does not seem to be actively maintained atm so you will reach the point at which you need to fork and fix it (like we did)
edit: Seems like @davidebianchi proves me wrong about the status of this library 😉

Won't you loose the realtime/reactive aspects?

Not really since Apollo supports subscriptions already. Apollo ist just a JavaScript library and not a platform like Meteor, which is a good thing in a lot of ways. You are free to combine it with whatever technology you want (also Meteor 😉).

There definitely is some exciting stuff going on in Meteor core and the Meteor community and there is absolutely nothing wrong with using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants