-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make impl/memory compatible with appengine.APICallFunc hooks to allow existing codebases to use it. #37
Comments
impl/memory
compatible with appengine.APICallFunc
hooks.
Hi! If I understand this correctly, this would allow impl/memory to intercept and process the SDK's protobuf commands that would normally have been sent to dev_appserver.py / real GAE? If that's the case (and I didn't know they opened this API up, thanks for letting me know!), I think this is probably blocked on / related to #23 (essentially, get a handle on all of the protobufs and rewrite luci/gae's internals in terms of them). But this would definitely be a worthwhile thing to do:exclamation: I understand the luci/gae api change vs. the GAE SDK is a pretty huge gap, and this would decouple the One thing I'm a bit worried about is that currently the SDK keeps all of its protobuf implementations in internal areas (e.g. https://github.com/golang/appengine/tree/master/internal/datastore) which will be inaccessible once things move to go 1.5 (I'm assuming that'll happen sometimeish). I think that would essentially mean that the api hook would need to encode + decode the protos on every call to get inputs, but I'm not sure how it would be able to generate outputs from that hook method, since the SDK code expects equivalent Go types. Maybe we could convince them to let their protos run free? 😄 |
Glad you support the proposal! That's a good point related to issue #23. How are we supposed to typecast the I've asked on the google-appengine-go group to see if they have any suggestions. |
FYI @dsymonds at some point stated that the protos will not be exposed. Not sure if he changed his mind since then. |
Hm... that would mean hiding the protos from all client implementations (java, python, go, php) though... that seems very unlikely to happen? I kind-of assumed that with gRPC things would be moving in the more-protos direction, e.g. https://cloud.google.com/datastore/reference/rpc/google.datastore.v1beta3 . That said, the initial implementation here would probably be 'fork them' (and then keep an eye on them to pick up any changes), as he suggests in that ML thread. AFAIK, they haven't changed substantially for a very long time (e.g. https://github.com/golang/appengine/commits/master/internal/datastore/datastore_v3.proto ). If this issue is resolved correctly, then all |
Oh, I thought I was commenting on #23. If we do #23, then the resolution to THIS issue would probably be in the form of some in-process or out-of-process service that behaves like dev_appserver: existing codebases that do We already have a fair amount of |
FYI, I doubt the protos in the form of the However, since those protos are used for communication between the app and the API server, they generally keep to the standard compatibility patterns that protos are known for (e.g. not changing tag numbers, etc.), so it would be pretty safe to have your own copy of the protos (and periodically sync) and use the APICall mechanism to do whatever you want. You'll need to do an extra proto.Marshal/proto.Unmarshal to bounce them between the real protos and your copy of the protos, but that should be fairly minimal overhead in the scheme of things. |
A few months ago a
google.golang.org/appengine
commit exposed functionality for intercepting API calls. It would be great ifluci/gae
s memory backend could plug into this for others to use who are just using thegoogle.golang.org/appengine
APIs.The functionality would go something like this:
I thought I would just put it out there – even though I understand it will probably never be on the roadmap. Too many open files errors are driving me crazy so I thought I would do something vaguely positive to try and get off
dev_appserver.py
for unit testing.The text was updated successfully, but these errors were encountered: