Switch from Google AppEngine to another server
Asked Answered
L

3

8

Currently I'm building my Java Web Application on Google AppEngine (GAE), but due to a lot of limitations they have I'm afraid that I'm going to have to switch from GAE to my own server which is running Glassfish (or I can setup any other server if needed). Also I'm planning to run Oracle or MySql databases. What do I need to do in order to switch from GAE to my server? Do I need to rewrite my code? Should I continue using Datanucleus or switch to something else? Anything else?

Lubumbashi answered 18/7, 2009 at 4:15 Comment(2)
just out of curiosity, what was the major limiting factor of gae that didn't work for you?Audit
1) File Size Limit 2) Some JEE5 features 3) Database (would like to use Oracle or MySql) 4) Control over my server infrastructure These are four major ones. I have not decided yet if I want to switch, just gathering information and the will decide.Lubumbashi
A
4

We won't be able to give very good advice without knowing how you wrote your app. Did you create a data access layer that separates your datastore access from your business logic? Or do you pass app engine specific objects all over the place? Are you using the gae user service? or memcache?

The first thing you should do is look at all your import statements. Anytime you see a com.google.something in there, you know you need to change that. You didn't give much detail about how you wrote your app, but if you are asking about datanucleus you probably were using JDO or JPA, which means you may be able to reuse most of your data layer. You might have a bunch of Key fields which you'll have to change, and maybe a few gae specific annotations. You'll probably have to double check how you handle transactions, as that is likely to be different in a SQL database, which don't use entity groups like GAE does.

Audit answered 18/7, 2009 at 4:39 Comment(0)
V
6

Why not follow the info given in the original Google campfire ? There was a presentation by IBM on how to run an AppEngine app using DB2. They simply dropped the datanucleus-rdbms jar in the CLASSPATH, changed the connection URL etc, and ran it. Like in this PDF http://download.boulder.ibm.com/ibmdl/pub/software/dw/wes/hipods/GAE_Java_Interoperability.pdf

--Andy (DataNucleus)

Verdha answered 18/7, 2009 at 7:53 Comment(1)
Wow. That's cool. They have implemented the User and UrlFetch services. Besides config stuff the only real code changes are refactoring certain key types and changing import statements.Audit
A
4

We won't be able to give very good advice without knowing how you wrote your app. Did you create a data access layer that separates your datastore access from your business logic? Or do you pass app engine specific objects all over the place? Are you using the gae user service? or memcache?

The first thing you should do is look at all your import statements. Anytime you see a com.google.something in there, you know you need to change that. You didn't give much detail about how you wrote your app, but if you are asking about datanucleus you probably were using JDO or JPA, which means you may be able to reuse most of your data layer. You might have a bunch of Key fields which you'll have to change, and maybe a few gae specific annotations. You'll probably have to double check how you handle transactions, as that is likely to be different in a SQL database, which don't use entity groups like GAE does.

Audit answered 18/7, 2009 at 4:39 Comment(0)
M
4

I haven't tried but there is an open source implementation of GAE called appscale http://code.google.com/p/appscale/

Malcommalcontent answered 23/11, 2010 at 14:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.