Thanks for this info. Sorry it's so difficult, and I'll look to see what we
might have to help. One thing I worked on was NDB migration. There's a
sample at
https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard/migration/ndb/overview
.

Basically, you use from google.cloud import ndb instead of the old import,
create a global client with something like "client = ndb.Client()", and
then wrap your old NDB operations in a context:

    with client.context():
        do_old_ndb_operation

This works fine under Python 2.7 and Python 3. There seems to be a
performance hit when you use this library under Python 2.7, though it might
not matter unless you are database-bound. I've been doing benchmarks, and
the performance seems to return to normal when you use this in Python 3.

If you are already using a Redis cache, it's easy to add that to the new
NDB by adding the parameter global_cache=redis_cache_client to the
client.context calls. Using that cache may not make much difference either
way, though; it depends on the pattern of database access specific to your
usage.

Charlie



On Tue, Jun 23, 2020 at 12:14 PM alexander noteboom <[email protected]>
wrote:

> We are in the middle of the migration.  It is a horrible experience.
> We tried to break it into small steps.
> Still in python2, we first replaced memcache with redis and  replaced
> search with elasticsearch.  These steps were do-able.
>
> Next we tried to make the python2 code compatible with python3 using
> futurize.  Had a lot of problems with future_builtins and unicode, so we
> futurized except those.
>
>
> After that we tried to migrate to Cloud Tasks, but that failed horrible
> because of the lack of transactional tasks. Our application heavily relies
> on that.
> We thought up a solution, but that required the migration to Cloud ndb. So
> we have to combine these two steps.
>
> That is where we currently are. Fighting with Cloud Tasks, Cloud NDB,
> namespaces, and getting it running using python3 on a local machine.
> The most annoying thing is that there is no local Task Emulator available,
> and no Datastore Emulator viewer available.
>
>
> On Tuesday, 5 May 2020 23:06:48 UTC+2, Charlie Engelke wrote:
>>
>> This is very helpful feedback. Anybody else have comments for us?
>>
>> On Tuesday, May 5, 2020 at 1:17:52 PM UTC-7 Charlie Engelke wrote:
>>
>>> I'd still like to here anyone's stories involving migrating their App
>>> Engine apps from Python 2.7 to Python 3.7. Have you migrated yet? Planning
>>> to do so soon? Not going to move to the new platform?
>>>
>>> And any particular pain points? Things that would have helped?
>>>
>>> Thanks,
>>>
>>> Charlie
>>>
>>> On Friday, May 1, 2020 at 2:18:33 PM UTC-7 Charlie Engelke wrote:
>>>
>>>> Have you recently migrated from App Engine for Python 2.7 to App Engine
>>>> for Python 3.7? Are you working on migrating now, or planning to soon? Or
>>>> maybe you are using App Engine for Python 2.7 and aren't planning such a
>>>> migration.
>>>>
>>>> In each of those cases, I'd like to hear how things went or are going
>>>> for you, pain points you encounter, things that went easily, and anything
>>>> else you have to share. I'm working on creating some new code samples to
>>>> help with this, and your stories will be a big help.
>>>>
>>>> Thanks,
>>>>
>>>> Charlie
>>>>
>>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google App Engine" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-appengine/BXHOXut7yGA/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/2de767ae-ee69-4e3c-9db4-2c1a1897c045o%40googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/2de767ae-ee69-4e3c-9db4-2c1a1897c045o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Charles Engelke
GCP AppDev DPE

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAA3Zmgoe14ncrC7Mmt6e2i5dV7YBTq86NaHDmth7ztMY3H-yhg%40mail.gmail.com.

Reply via email to