-
Notifications
You must be signed in to change notification settings - Fork 27
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
Query Support #25
Comments
It would be an incredibly complex (and fun) challenge which I certainly want to do but I expect development will not occur until I have reached 100% unit test coverage and am happy the bug reports are drying up. |
Sounds great. We should be pushing nds to production within the next week or so. I'm excited to see what it does to our datastore reads. I'll stay active with any bug reports and try to help with unit testing. Any idea how many people are using nds or on what scale? |
I don't expect many people are using this package right now. I'm not sure how to get the word out without spamming people. I have been using it in production for several months, but not with I'm now looking forward to seeing the nds call times being reduced by 4x with the fix for the latest bug you uncovered! Hopefully that will decrease the number of GAE instances I use significantly. |
I tried to give you a boost since I can shamelessly promote nds without feeling spammy. :) |
That's very kind of you! 😊 |
FYI I created hrd, a library with a similar purpose. It offers a bunch more features but is still more or less alpha status. I'll investigate if I could use nds internally and build the other features on top of it. Or maybe you can steal a few ideas from it (I stole most from gaelic and goon myself :)). |
hrd looks pretty feature rich! The main reason for using nds in your package is if you want strong cache consistency. Note that it is not possible to have strong cache consistency if you use memory caching as well. Otherwise feel free to use nds. All you need to do is replace your datastore.Put_, Get_, Delete* and RunInTransaction calls with the nds.* equivalents. If you don't care about strong cache consistency then it will be more performant to roll your own cache. App Engine requires four calls to the memcache API to save to memcache and ensure cache consistency compared to the one memcache.Set if you don't care about this. |
Have been wondering about a good way for adding query support to nds. One pattern I follow when doing queries on entities:
How are others doing it? |
I do the same thing. It's simple, cheap and works well. There have been several discussions about this with regards to Python's NDB for example here: GoogleCloudPlatform/datastore-ndb-python#118. My basic premise is that if the query is likely to return more than a few entities then I do a |
what do you think about this:
|
That is certainly a valid solution although it will not work with transactions easily. I should probably close this issue as I don't think much more work will be done on this package as Google appears to be moving us all over to the https://godoc.org/cloud.google.com/go/datastore API. If/when they add memcache to that then all this code will be converted over. |
Why do you think that Google is moving us to https://godoc.org/cloud.google.com/go/datastore? https://cloud.google.com/appengine/docs/standard/go/datastore/ |
I think it's the only thing that makes sense in order to reduce the duplication of effort having multiple almost identical APIs to maintain. |
So it's only you speculating and there is no evidence at the moment, right? In this case it would take at least 2 years IMHO even if Google would decide today to switch to the new API. Also NDS could be ported to the new API. In my opinion there are no significant differences between the two APIs. Do you plan to make any changes to NDS? Bugfixes? New features? |
Yes it's complete speculation by me. I'll port NDS to the new API if/when the new API gives access to memcache. There will have to be two versions if the new API doesn't also support App Engine Standard. As for bug fixes, NDS is used in several large production systems so we are always looking for bugs and their subsequent fixes. With regards to new features, I am generally reticent about adding anything that can be recreated by the client easily. With regards to this issue of query support. It appears to be very hard/impossible to do whilst maintaining the same data consistency features that the datastore gives. |
Do you have any intention of supporting Queries via GetAll or Run? I can see how that would be much more challenging than Get/Put/Delete.
The text was updated successfully, but these errors were encountered: