Re: [google-appengine] Re: project with python and node services: inconsistent data

2016-06-14 Thread Faried Nawaz
I decided not to go down that route -- it's all too likely that the key prefix will change sometime in the future, when I've passed the project on to other devs. I ended up writing a small API endpoint in the Python code to accept an HTTP post from the Node code with the updated fields. It's

[google-appengine] Re: project with python and node services: inconsistent data

2016-06-10 Thread 'Nick (Cloud Platform Support)' via Google App Engine
Hey Faried, To access Datastore on Flexible Environment apps, you should use the gcloud library for python. In both NDB and gcloud, you can use a Datastore entity key to get an entity. As described in the documentation linked in my prior

Re: [google-appengine] Re: project with python and node services: inconsistent data

2016-06-10 Thread Nickolas Daskalou
Hi Faried, Did you give this a go? I'm curious to find out if it worked for you. Nick On 9 June 2016 at 19:37, Nickolas Daskalou wrote: > Hi Faried, > > Try deleting the Memcache key which is used by NDB after you update the > Datastore entity on the Node server (FYI, NDB

Re: [google-appengine] Re: project with python and node services: inconsistent data

2016-06-09 Thread Nickolas Daskalou
Hi Faried, Try deleting the Memcache key which is used by NDB after you update the Datastore entity on the Node server (FYI, NDB Memcache implementation found here ). Something like this (NOTE:

[google-appengine] Re: project with python and node services: inconsistent data

2016-06-09 Thread Faried Nawaz
On Thursday, June 9, 2016 at 12:36:09 AM UTC+5, Christian F. Howes wrote: > > Does your node service use NDB or DB? if it is using NDB then NDB takes > care of flushing the cache for you when you update an object, but you have > to `get_by_key` in order to get the latest copy. > NDB is a

Re: [google-appengine] Re: project with python and node services: inconsistent data

2016-06-09 Thread Faried Nawaz
On Wednesday, June 8, 2016 at 11:53:00 PM UTC+5, Nick (Cloud Platform Support) wrote: > I suggest replacing your "get" query with a "get-by-key" query to force > strong consistency. > Where is this "get-by-key" or "get_by_key" query documented? I can't find any references to it in the

[google-appengine] Re: project with python and node services: inconsistent data

2016-06-08 Thread Christian F. Howes
Does your node service use NDB or DB? if it is using NDB then NDB takes care of flushing the cache for you when you update an object, but you have to `get_by_key` in order to get the latest copy. On Wednesday, June 8, 2016 at 1:33:15 AM UTC-7, Faried Nawaz wrote: > > Hello, > > I have a Python

Re: [google-appengine] Re: project with python and node services: inconsistent data

2016-06-08 Thread 'Nick (Cloud Platform Support)' via Google App Engine
Hey Faried, As Tim H suggested, this is likely due to eventual consistency. Datastore has an eventual-consistency model of replication which allows it to be highly-available and scalable while making a slight trade-off on the ability to get the latest copy of entities at every given moment.

Re: [google-appengine] Re: project with python and node services: inconsistent data

2016-06-08 Thread Faried Nawaz
On Wed, Jun 8, 2016 at 2:46 PM, timh wrote: > Are you getting that data via a query or via key using get, > If you are using a query then you will need to start reading up on Eventual > consistancy It's a "get". I just need some way to flush the cached data without putting

[google-appengine] Re: project with python and node services: inconsistent data

2016-06-08 Thread timh
Are you getting that data via a query or via key using get, If you are using a query then you will need to start reading up on Eventual consistancy T On Wednesday, June 8, 2016 at 4:33:15 PM UTC+8, Faried Nawaz wrote: > > Hello, > > I have a Python application deployed as my App Engine