has anyone here used GAE together with Google Drive API ? I want to store user uploaded data to Google Drive (which I don't pay for) instead of Google Cloud (which I do pay for). I don't care that the user can upload/edit/delete the data -- it's the user's own documents anyway.
is there a nice way to structure code so it says: use gae remote when not running on gae servers, and use standard gae api when on gae servers?
I'm finding gae to be way too restrictive and need ot switch to GCE. What do I lose in terms of auto scaling / other things I now have to take care of once I switch to GCE? (it's just GCE + bare bones ubuntu + java)
========= when doing a deploy with 89 jars totalling 44M, is it normal for appcfg_update.sh . to take 9 fucking minutes ? (9 minutes 18 seconds to be precise)
@qqq I haven’t used the Drive API, but we moved to GKE. Once you wrap your head around it, it’s awesome. You can still set the autoscaling however you like. I haven’t dived into autoscaling GCE, but apparently you can. The other things you lose if you leave GAE are things like caching, A/B testing out the box, and I think some multi-zone redundancy.
@qqq sometimes it takes 9 stinkin' minutes, other times 9 damn minutes. it varies.
can you split into multiple services? you can upload services separately.
now that we have established I'm doing it wrong
can you please explain to me how boot-gae does the reload thing?
in particular, when using boot-gae, when I modify a *.clj file, what is the step by step process which leads to the local gae server running the new servlet?
what do you mean by "new servlet"? yes, if you add a new servlet you must reboot. since that is rare, i make no special accomodations for it- just start over.
but modifying the code for an existing servlet is another story.
I have a servlet hello.clj, on an incoming request, it says "Hello mobileInk" I modify hello.clj so that on incoming requests, it says "Hi mobileInk" in boot-gae, after I modify the hello.clj, what happens to cause the local gae server to now respond with "Hi mobileInk" ?
ok. you have to grok gen-class. the :impl thingie allows you to delegate java method calls to clojure fns. run boot-gae with --keep to retain the transient stuff.
I know how to use gen-class.
My problem is: after hello.clj is modified, how does jetty reload it? My understanding is: 1) modify hello.clj 2) a new hello$blah.class is generated 3) we need to tell jetty to reload it
(2) = aot (3) = touch appengine-web.xml
once you have gen-class sth, with the :impl-ns or whatever (going fron weak mem),
then the gen-classed thingie will fwd method calls to your clojure fns.
so you can change you clojure fns without recompiling your gen-classcthibgie.
NO! jetty does not reload it, clojure reloads it!
obviously i need to write a blog article explaining all this.
ah, I see;
my approach =
hello.clj -> hello.class -> jetty runs hello.class
when hello.clj changes, generate new hello.class, jetty has to reload
your approach =
create a hello_wrapper.class -> jetty runs hello_wrapper.class
when hello.clj changes, hello_wrapper.class reloads the new hello.clj
in a high level, is the above true?gen-class is clearly under-explained and under-appreciated!
well, it's not my approach, it's just the way gen-class works.
there is no wrapping. think "delegation".
how do you run the local gae server?
for me, I create a war
directory, and I run dev_appserver.sh path-to-war
how are you starting it?
see the code in boot-gae. 😉
but based on this conversation, i am convinced i need to write a detailed article on how gen-class works.
regarding your guess above (my aaproach, your approach): no.
there are no "wrappers" for servlets in boot-gae.