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

Making stores async #714

Closed
wants to merge 336 commits into from
Closed

Conversation

rmachielse
Copy link
Contributor

Hi @marcoow,

Here is the pull request on #602 we discussed some time ago, to make stores async by default.
This will allow people to build stores that persist on asynchronous storage (like chrome app storage).

You mentioned that you would like to postpone this to release 1.1, but this change might be major, since everyone with a custom stores needs to adapt to the asynchronous workflow.

marcoow and others added 30 commits July 23, 2015 22:22
Transition to ember-cli-build.js
@marcoow
Copy link
Member

marcoow commented Oct 12, 2015

This is great, thanks!

I still think this can be merged without requiring a new major rebase though. Basically all that's needed is a method in the internal session that wraps all store access into a Promise if the store doesn't return a promise anyway. 1.0 has been delayed so much already it really needs to get released now. Of course making this PR work with non-async stores will require some work but I think it's worth it to not delay 1.0 any longer.

Definitely going to merge this post 1.0 though!

@marcoow marcoow added this to the 1.x milestone Oct 12, 2015
@rmachielse
Copy link
Contributor Author

Alright, I'll add backward compatibility soon. Thanks for the help!

@marcoow
Copy link
Member

marcoow commented Oct 12, 2015

thanks for the effort!

}
resolve();
});
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have to return a promise as well? It's actually synchronous and doesn't belong to the public API (which is only persist, restore, clear).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forget that - I see how it all makes sense now ;)

@rmachielse
Copy link
Contributor Author

Should I open a new pr on master?

@marcoow
Copy link
Member

marcoow commented Oct 16, 2015

yes please - thanks!

@rmachielse rmachielse mentioned this pull request Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.