How would I merge two MS apps into one HR app?

17 views
Skip to first unread message

pdknsk

unread,
Aug 28, 2011, 9:11:46 AM8/28/11
to Google App Engine
I've got two MS apps which are exactly the same, except for maybe ten
lines in the code (locale differences). This isn't to stay within
quota limits, but rather because it was much easier to write like
that. I've been just using a sort of template approach for deployment
which worked very well.

However, I want to merge both apps to HR and use subdomains for
different locales. Both apps have the exact same db structure (with
one top ancestor model), but different data.

db A
|
+ main
|
- model
|
- model

db B
|
+ main
|
- model
|
- model

What I'd like is to keep the same structure, and just change the key
names for the top ancestors (to match the locale), before I copy the
data to the new app. To get this structure.

db
|
+ main A
|
- model
|
- model
|
+ main B
|
- model
|
- model

I'm already using the subdomain approach for locales for another app,
so that works well and is the easy part in this merge.

voscausa

unread,
Aug 28, 2011, 10:19:40 AM8/28/11
to google-a...@googlegroups.com
Because Google Apps lets you deploy your app to any domain that you own, you can easily set unique namespaces for all domains linked to your Google Apps account. 

Kaan Soral

unread,
Aug 28, 2011, 3:21:44 PM8/28/11
to Google App Engine
If I were you I would write a simple mapreduce job that will transfer
data to HR app, and execute this on both MS apps

One easy way to transfer data is to cPickle it and just send it over,
but it doesn't work for non-ascii data, since webapp messes things up
for request items

So do this:
Write an intelligent uploader code, that will post parts of the data
with different fields, with HTTP POST
Write a receiver, that will receive this data and create an entity of
kind A or B

Use the mapreduce library to traverse over all entities on both MS
apps, and initiate uploader for every element

Should take 5 mins to code

Don't forget to increase your quotas on both apps, and dont hit
minutely CPU or URLFETCH limits, those limits fuup
Reply all
Reply to author
Forward
0 new messages