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

Demo app does not always sync todo items #124

Open
garth opened this issue Dec 17, 2015 · 8 comments
Open

Demo app does not always sync todo items #124

garth opened this issue Dec 17, 2015 · 8 comments

Comments

@garth
Copy link

garth commented Dec 17, 2015

Hoodie Version: 0.6.3 (node v5.2.0, npm 2.14.15, platform: darwin)
CouchDB Version 1.6.1

Steps to reproduce:

  1. Create a new hoodie app with the default settings and start it
  2. Open in a browser and create a new account
  3. Open a second browser (either different browser or incognito) an log in
  4. Add todo in 1st window
  5. Add todo in 2nd window

Result:

Sometimes they sync, usually they don't until the page is manually reloaded.

@Guria
Copy link

Guria commented Dec 17, 2015

@gr2m
Copy link
Member

gr2m commented Dec 17, 2015

hmmm that should be very solid. Do you see any request errors in the browser console?

@garth
Copy link
Author

garth commented Dec 17, 2015

No errors and we tried it in several different environments with the same results each time

@Guria
Copy link

Guria commented Dec 17, 2015

You can check it yourself on:

@gr2m
Copy link
Member

gr2m commented Dec 17, 2015

Thanks you two, that is super helpful. I'll have a look if I find something obvious, but note that we are currently working on a new Hoodie version, which will have a much much much more robust sync architecture, because it will use PouchDB instead of our self-cookied localStorage-based solution. The store module is pretty much finished already, you can play with it here: https://github.com/hoodiehq/hoodie-standalone-store

@garth
Copy link
Author

garth commented Dec 17, 2015

@gr2m Thanks for the info, I was under the impression that you were already using pouchdb, so was quite surprised that it wasn't working as expected (I had good experiences with pouch in the past).

Are we better off going with vanilla couch+pouch for the time being or is the hoodie-standalone-store + hoodie-client-store is a reasonable state?

Also it looks like the new setup might play nice with webpack which will be great.

@gr2m
Copy link
Member

gr2m commented Dec 19, 2015

yeah the new setup should be much easier with webpack & browserify.

I’d say hoodie-standalone-store is great if all you need is databases that you share with others by secret IDs. If you want offline-first, you get cool APIs like hasLocalChanges. But note that the Hoodie community also made two PouchDB plugins that you can also use without the Hoodie back-end part:

And you can also use https://github.com/hoodiehq/hoodie-client-store without the back-end part, directly against a PouchDB. https://github.com/hoodiehq/hoodie-server-store is simply a very tiny proxy to CouchDB anyway at this point

I'd give these a try, they are all in very good state, well tested & documented

@gr2m
Copy link
Member

gr2m commented Dec 27, 2015

Hey there, just a quick note that we are making progress on the new hoodie:
https://github.com/hoodiehq/my-first-hoodie/tree/something-tracker#local-setup-to-test-new-hoodie

probably sync won’t work at all, but if you run into bugs, they should be easy to identify & fix now. It’s a great time to get involved into Hoodie, and I’m happy to help you find your way around the new architecture. A good start is here: https://github.com/hoodiehq/hoodie#why-is-there-no-code-in-this-repository

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

No branches or pull requests

3 participants