Is it possible to access GAE datastore without an http request?
Is it possible to access GAE datastore without making an appengine context out of a http request? I want to be able to access the datastore in separate threads that do not have access to the app engine context. is this possible? or should i try to find a work around? the language im working in is Go btw...
EDIT: More info The reason i can't use pass all the appengine contexts down to the level needed is because im building a chat server with multiple threads. Once the main port listening thread is started, with the one instance of a context, it keeps that context around for the duration of the thread. However, after that thread starts, there can be many more connections to the server all of which cant pass through a context because the port listener is already started. The reason i need the context passed all the way through is because i need to be able to log messages in the client read handler. Thanks in advance
I am not really sure if this is what you are looking for, but GAE provides a remote api which gives you the ability to interact with your service. I am sure its provided for Python and Java versions.
I think you'll need an appengine.Context
(and therefore the request) for any datastore access. Fortunately the request should be easy enough to pass to whatever part of your code requires it.
I'm not sure what appengine_internal
does with the context, but the context itself can be passed back and forth as required. Maybe a code example would be a good next step if you don't think this will work for you?