Em 11 de abril de 2011 18:32, Ronoaldo José de Lana Pereira < rpere...@beneficiofacil.com.br> escreveu:
> Hi Julio, Hello Ronoaldo! > I guess I know you from Brazil, but I'll write in English. Here is what we > do for a production Java app: > Yes! We know each other. :-D > 1) Using flex Json, I added some data fixtures in Json to an app resource > foder, and created a small servlet that I called SetupServlet. This servlet > does your trick on checking resultset sizes and populates the database if > required, and is only called by an app administrator. Very usefull! You can > combine this with Robert suggestion for an upload-based setup servlet, that > load the file from Blobstore, for example. > > I had just a file with 300k of size, so I add it to the project and read to a ArrayList called fortunes and sent MakePerssistAll(fortunes). With just that my data base is ok now. I know that tricks is not the best pratice, but is the hurry to end this, I did in this way. I think my next exercise will be to do a admin area using my Google Account. That kind of stuff it's useful to many kind of applications! :-D 2) To import a really large dataset, like migrating it from one server to > another, the python remote_api is a great (but slow) tool, because you can > do some computation to translate a legacy app database to your new > app-engine optimized version, all on the fly and without the requirement of > a new build-deploy clicle. But make sure to call db.allocate_id_rage() or > similar before putting the app alive. I forgot it, and this will cause a lot > of problems ;). As Robert suggested, bulkloader does most of the job for > you, and you just need to write some yaml files to map you models fields and > you can import form a csv file. This is a nice aproach since you can change > your data remotely, but it will consume your bandwidth quota too. > > I will stude about that! Thanks for sharing it! > Regarding your concern about a DOS atack, all requests will be served and > loged. I tryed on my live app (yes, I'm a bit crazy) and the ammount of > instances growth from 10~14 to 72 in a few seconds to serve +1000 > simultaneous requests. I also found that my logic was not optimized and that > helped me a bit! Anyway, that is just all what AppEngine is about: scale as > you need to support a big access when your app is featured on Yahoo home > page! What you can do to avoid abuse is monitor your top 10 access and > optionally blacklist what you fell like a DOS. You can do an appcfg.sh > upload_blacklist just to make your app blacklist an ip address imedieatly, > but know what is a DOS, currently, is up to you. You may whant to avoid > abuse with some tokens, anyway. > > Ok. Understood! > Hope it helps! > > Best Regards, > > -- > Ronoaldo Pereira > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appengine@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- Júlio Cesar Bueno Cotta Bacharel em Ciência da Computação pela UFV Mestrando em Ciência da Computação pela UFABC -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.