Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate Google App Engine and Compute MongoDB, possible?

I've spent the last few weeks really climbing all around the Google App Engine (GAE) and Google Compute Engine (GCE), so I feel that I have a decent understanding about the two related but different platforms. But I'm stuck and want to make sure I jump in the right direction to move forward.

I'm creating a small private business website with a limited number of customers. We are talking 20 concurrent users.

So this question may be more architectural than technical.

I wanted to try and use the MongoDB because of the flexibility of the schema, so here is where I'm stuck.

My initial attempt was to connect via the following:

Option 1:

  • GAE (Java) --> MongoDB Java Driver --> GCE (MongoDB)

  • This is a complete failure because the GAE sandbox will not allow this.

Option 2:

  • GAE (Java) --> RESTFul MongoDB Call --> GCE (MongoDB / Restful front end)

  • I have not fully explored this yet, but this appears promising, but I really don't want to use RESTful to connect to my DB

Which leaves me with where I'm heading.

Option 3:

  • GCE (Java/Tomcat) --> MongoDB driver --> GCE (MongoDB)

  • Ditch GAE and go full in GCE :|

I'd love some feedback. Here are the other stackoverflow answers that I referenced heavily when researching this issue:

  • Old question, but a few of the responses are newer and useful, specifically from user @eloone, but still not clear, how the plumbing would work
    • Any one tried MongoDB on Google App Engine?
  • Both below say basically the same thing, which is "NO", so that pushed me to Option #2 or Option #3
    • google app engine and mongodb
    • Accessing MongoDB from AppEngine app

My specific questions:

  • Since I don't have to scale, do I really need GAE? (just trying to be fast... and lazy :D)
  • What am I giving up by abandoning GAE? I was using it because it seemed easy and quick, (as long as you use mysql)

Needless to say, this is my first question ever on stackoverflow, which I read about every day, so be nice if this question seems out of line. I figured if I was struggling, probably many others were as well. :D


Answer Summary: 3 perfectly good answers were put forward:

  1. User Google Datastore (I had misunderstood what this was)
  2. User the new(ish) Java Managed VMs
  3. Just use GCE VM and do what I want.

I researched all of these, and decided that for me #1 was the best option for the moment because it was the path of least resistance, but I'm leaving the door wide open to shifting to #2 or #3 in the future if the need arises.

Thanks everybody. I'll mark the response about using GCE as the accepted answer because it does answer the question even though I went in a different direction.

like image 511
Cade Thacker Avatar asked Nov 01 '22 07:11

Cade Thacker


1 Answers

IMO you don't need GAE even if you have to scale

  • you can use autoscaler in GCE so you can be lazy and fast with GCE
  • by installing MongoDB with a click
  • GCE plays nice with MongoDB especially if you want to replicate becouse of the very fast connections between datacenters.
like image 191
nickmilon Avatar answered Nov 15 '22 05:11

nickmilon