[google-appengine] Access to child object key without fetching object (JDO)

2014-01-07 Thread Paul Mazzuca


Is it possible to fetch the key of a child object without going to the 
datastore to fetch that child object? I know I could store the key as a 
string in addition to the object, however that seems unnecessary given that 
the key must already be stored in the parent object for it to be able to 
fetch the child.  I am using DataNucleus JDO. 


For example, 



Server Side Service Code


MyClass myclass = pm.getObjectById(MyClass.class, someKey)


//is the following possible without fetching the childObject from the 
datastore

//All I want is the key

myclass.getChildObject().getId()





@PersistenceCapable

class MyClass{


@Persistent

private ChildObject obj;


public ChildObject getChildObject(){

return obj;

}



….


}

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] How to upload an image from an Android Client to the datastore and get it back (or send it to another client)?

2014-01-07 Thread Aaron Villalpando

I've been doing GAE tutorials the entire week and haven't been able to send 
an image to the datastore using google cloud endpoints and retrieve it 
(maybe with modifications done serverside).


Basically I would like to create an asynchronous multiplayer game using GAE 
and Android where Person A creates an image, then sends it to the server, 
server sends it to Person B, who edits the image, and then Person B sends 
it back to A (and so on).


Do you guys have any recommendations on how to go about implementing this?

I tried looking at the tictactoe 
samplehttps://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-java
 to 
learn more about the relationship between the backend and the android 
client but I haven't been able to figure out how to do something like I 
described. Not only that, but the tutorial
seems to be all over the place for beginners like me. If they explained 
that tictactoe sample like they did with the Mobile Assistant 
Tutorialhttps://cloud.google.com/developers/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial
 it 
would be amazing.


If any of you have any helpful, very simple functional samples using GAE 
for android in java relating to this type of problem (image sharing through 
GAE using Android) it would be extremely helpful.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] ODBC for the Datastore?

2014-01-07 Thread William Astarita
Does anything like this exist?  I want to connect to the data store from an 
MS Access application while I'm transitioning over from a desktop app to a 
web app I'm building.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: App engine examples and documentation suck -Don't waste your time

2014-01-07 Thread Aaron Villalpando
I feel your pain. It took me forever to get the tic tac toe sample working, 
and even then I can't get the scores to show up on my android device.


Does anyone have any recommendations of what other backend tools to use to 
create an asynchronous multiplayer game using android?

On Tuesday, December 3, 2013 12:59:31 PM UTC-6, kingofrockinsf wrote:


 Despite what Google claims ,you are not going to get an app up and running 
 quickly on App Engine.

 Other than the crappy guestbook example ,the Java examples for app engine 
 are missing a lot of explanation.

 I have been trying for two days to get the Tic Tac Toe (Java) example 
 working .

 It took a long time to figure out how to see the API working as a test.
 The only part of it that works is  when you manually put in  a display 
 board call in appspot API explorer.

 It still doesn't work when you try to access it as a normal web page 
 directly from eclipse .

 The OAuth part of it is a joke .
 Even if you are already logged in to gmail and have the email address 
 listed under permis(sions ,the authentication fails and it doesn't let you 
 retry authentication. The Auth page only appears the first time you try it. 

 For an example app ,the explanation and functionality is awful.
 This seem typical of the documentation for this service ,in general.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: ODBC for the Datastore?

2014-01-07 Thread Jim
I don't think you're going to find anything like that for GAE Data Store; 
the Data Store is a NoSQL database technology, and ODBC, while technically 
a very flexible specification that can be adapted to address a wide range 
of database technologies, really evolved hand-in-hand with SQL databases. 
 The data store and other NoSQL databases don't support a wide range of 
standard SQL constructs such as JOIN's or SUM/COUNT or any other scan type 
of operation.  It is highly unlikely that an app originally written for a 
SQL-based database will work with a NoSQL database without major rework.

If you're transitioning an existing desktop app over to the cloud, I 
suggest you look at cloud-based RDBMS offerings such as Google's Cloud SQL 
offering which is based on MySQL and will offer odbc/jdbc drivers allowing 
you to point existing code at the cloud-based database.  Amazon Web 
Services also has a nice offering called Relational Data Service (RDS) 
which supports MySQL, Oracle and MS SQL databases in the cloud, again with 
traditional driver support.



On Monday, January 6, 2014 8:47:43 AM UTC-6, William Astarita wrote:

 Does anything like this exist?  I want to connect to the data store from 
 an MS Access application while I'm transitioning over from a desktop app to 
 a web app I'm building.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: How to upload an image from an Android Client to the datastore and get it back (or send it to another client)?

2014-01-07 Thread Kristopher Giesing
Yes, it's possible to do this with Google App Engine.  There are a lot of 
options; you'll need to make some design decisions to start, and then the 
documentation can help you with the implementation.

First, you need to decide whether the game state should be stored on the 
server or transient.  That determines whether you need to use the data 
store.  Most likely you'll want the game state to be stored, but I don't 
know your specific requirements so I could be mistaken.  Assuming you want 
to use the data store I *highly* recommend you use Objectify rather than 
the built-in JPA or JDO support in App Engine.  Objectify has a lower start 
up cost so is better for overall performance, and its APIs are tailored to 
GAE so you avoid some of the weirdness in JDO/JPA.

In addition to the game state it sounds like you want to store images. 
 Storing image data in the data store might not work for you depending on 
the image size; if that's the case you may want to look into the Blobstore 
APIs.  I have not personally used them so I don't have much to say there.

Next, you need to decide how players submit moves, and how they will be 
informed of moves by other players.  Google's documentation suggests using 
the Channel APIs, which are essentially a wrapper around WebSocket.  There 
are some significant limitations to Channel, though, not least of which is 
that the client has to be JavaScript (for Android, this means using an 
embedded WebView).  Channel is also designed to be one-way (server to 
client); for client to server messages Google suggests using HTTP POST 
requests.

An alternative to Channel is to use HTTP requests in both directions: POST 
for submitting moves, and GET (in a polling sense) to retrieve moves.  GET 
polling can be less friendly to network bandwidth and battery though.

In my own (iOS) game I decided to use raw WebSockets instead and create my 
own wrapper, foregoing the Channel APIs.  There are WebSocket libraries for 
both iOS and Android (though I don't have any experience with the Android 
ones) - this means your client doesn't have to be a WebView.  In addition, 
WebSocket can be used for bidirectional messaging, meaning you can use one 
transport for both move submission and notification.  However, if you're 
using the Blobstore to store data, you may want to use HTTP requests to 
post moves anyway, since (as I understand it) the Blobstore already has an 
HTTP request interface.  Again though, I haven't used Blobstore myself, so 
YMMV.

Finally, a comment on Google cloud endpoints.  The cloud endpoints system 
is not something I've used, but from what I can tell, it is a code 
generation system designed to make it easier to develop both the client and 
server together using a single API definition (somewhat like IDL).  If 
that's the case, then there's nothing you can do with cloud endpoints that 
you couldn't do by hand.  I would recommend designing the system by looking 
at the underlying capabilities of App Engine and seeing which ones meet 
your needs, and then consider cloud endpoints as a kind of syntactic 
sugar that can help with the implementation.

Good luck,

- Kris

On Sunday, January 5, 2014 2:49:42 PM UTC-8, Aaron Villalpando wrote:


 I've been doing GAE tutorials the entire week and haven't been able to 
 send an image to the datastore using google cloud endpoints and retrieve it 
 (maybe with modifications done serverside).


 Basically I would like to create an asynchronous multiplayer game using 
 GAE and Android where Person A creates an image, then sends it to the 
 server, server sends it to Person B, who edits the image, and then Person B 
 sends it back to A (and so on).


 Do you guys have any recommendations on how to go about implementing this?

 I tried looking at the tictactoe 
 samplehttps://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-java
  to 
 learn more about the relationship between the backend and the android 
 client but I haven't been able to figure out how to do something like I 
 described. Not only that, but the tutorial
 seems to be all over the place for beginners like me. If they explained 
 that tictactoe sample like they did with the Mobile Assistant 
 Tutorialhttps://cloud.google.com/developers/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial
  it 
 would be amazing.


 If any of you have any helpful, very simple functional samples using GAE 
 for android in java relating to this type of problem (image sharing through 
 GAE using Android) it would be extremely helpful.

 Thank you.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit 

Re: [google-appengine] Re: How to upload an image from an Android Client to the datastore and get it back (or send it to another client)?

2014-01-07 Thread Jeff Schnitzer
Keep in mind that GAE datastore entities are limited to 1MB in size,
which might be a significant problem for your images. If so, you'll
want to use the blobstore/google cloud storage instead and track the
metadata in the datastore.

Jeff

On Tue, Jan 7, 2014 at 11:55 AM, Kristopher Giesing
kris.gies...@gmail.com wrote:
 Yes, it's possible to do this with Google App Engine.  There are a lot of
 options; you'll need to make some design decisions to start, and then the
 documentation can help you with the implementation.

 First, you need to decide whether the game state should be stored on the
 server or transient.  That determines whether you need to use the data
 store.  Most likely you'll want the game state to be stored, but I don't
 know your specific requirements so I could be mistaken.  Assuming you want
 to use the data store I *highly* recommend you use Objectify rather than the
 built-in JPA or JDO support in App Engine.  Objectify has a lower start up
 cost so is better for overall performance, and its APIs are tailored to GAE
 so you avoid some of the weirdness in JDO/JPA.

 In addition to the game state it sounds like you want to store images.
 Storing image data in the data store might not work for you depending on the
 image size; if that's the case you may want to look into the Blobstore APIs.
 I have not personally used them so I don't have much to say there.

 Next, you need to decide how players submit moves, and how they will be
 informed of moves by other players.  Google's documentation suggests using
 the Channel APIs, which are essentially a wrapper around WebSocket.  There
 are some significant limitations to Channel, though, not least of which is
 that the client has to be JavaScript (for Android, this means using an
 embedded WebView).  Channel is also designed to be one-way (server to
 client); for client to server messages Google suggests using HTTP POST
 requests.

 An alternative to Channel is to use HTTP requests in both directions: POST
 for submitting moves, and GET (in a polling sense) to retrieve moves.  GET
 polling can be less friendly to network bandwidth and battery though.

 In my own (iOS) game I decided to use raw WebSockets instead and create my
 own wrapper, foregoing the Channel APIs.  There are WebSocket libraries for
 both iOS and Android (though I don't have any experience with the Android
 ones) - this means your client doesn't have to be a WebView.  In addition,
 WebSocket can be used for bidirectional messaging, meaning you can use one
 transport for both move submission and notification.  However, if you're
 using the Blobstore to store data, you may want to use HTTP requests to post
 moves anyway, since (as I understand it) the Blobstore already has an HTTP
 request interface.  Again though, I haven't used Blobstore myself, so YMMV.

 Finally, a comment on Google cloud endpoints.  The cloud endpoints system is
 not something I've used, but from what I can tell, it is a code generation
 system designed to make it easier to develop both the client and server
 together using a single API definition (somewhat like IDL).  If that's the
 case, then there's nothing you can do with cloud endpoints that you couldn't
 do by hand.  I would recommend designing the system by looking at the
 underlying capabilities of App Engine and seeing which ones meet your needs,
 and then consider cloud endpoints as a kind of syntactic sugar that can
 help with the implementation.

 Good luck,

 - Kris


 On Sunday, January 5, 2014 2:49:42 PM UTC-8, Aaron Villalpando wrote:


 I've been doing GAE tutorials the entire week and haven't been able to
 send an image to the datastore using google cloud endpoints and retrieve it
 (maybe with modifications done serverside).


 Basically I would like to create an asynchronous multiplayer game using
 GAE and Android where Person A creates an image, then sends it to the
 server, server sends it to Person B, who edits the image, and then Person B
 sends it back to A (and so on).


 Do you guys have any recommendations on how to go about implementing this?

 I tried looking at the tictactoe sample to learn more about the
 relationship between the backend and the android client but I haven't been
 able to figure out how to do something like I described. Not only that, but
 the tutorial
 seems to be all over the place for beginners like me. If they explained
 that tictactoe sample like they did with the Mobile Assistant Tutorial it
 would be amazing.


 If any of you have any helpful, very simple functional samples using GAE
 for android in java relating to this type of problem (image sharing through
 GAE using Android) it would be extremely helpful.

 Thank you.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-appengine+unsubscr...@googlegroups.com.
 To post to this group, send email to 

Re: [google-appengine] Can't get a module to start via a cron job

2014-01-07 Thread Adrian
Thank you for the suggestions... this is odd... my directory has a 
loadandprocess.yaml module, with the following text:

application: [my app name]
module: loadandprocess
version: one
runtime: python27
api_version: 1
threadsafe: true
instance_class: B4_1G
basic_scaling:
  max_instances: 1
  
handlers:
- url: /.*
  script: loadAndProcess.application
  login: admin

But whenever I call 
logging.info(modules.get_modules())

It only recognizes my default application:

INFO 2014-01-07 20:15:50,482 callLoadAndProcess.py:10] ['default']

Aside from just having the [module name].yaml file in the directory with my 
default app.yaml file, do I need to do anything else to get the dev_server 
to recognize the additional module?

Thanks!




On Tuesday, January 7, 2014 2:47:39 AM UTC-5, Vinny P wrote:

 On Mon, Jan 6, 2014 at 7:03 PM, Adrian adrianj...@gmail.com javascript:
  wrote:

   File /home/adrian/arapphost/callLoadAndProcess.py, line 10, in get
 modules.start_module(loadandprocess,1)
   File 
 /home/adrian/google_appengine/google/appengine/api/modules/modules.py, 
 line 385, in start_module
 rpc.get_result()



 The traceback claims that the module and version you're referring to 
 doesn't exist. Try to debug the problem by:

 1. Sometimes modules throw up unusual errors when versions are expressed 
 as pure numbers instead of a mix of letters and numbers. In 
 loadandprocess.yaml, change *version: 1* to *version: one*. Remember to 
 update *callLoadAndProcess.py* with the correct version (the 
 *start_module* call).

 2. You can use *get_modules()* and *get_versions(module=___)* in the 
 *modules* package to enumerate all the modules and all the versions of a 
 given module that App Engine recognizes within your application. App Engine 
 may be recording the module under a different name or version. 
   
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 App Engine Code Samples: http://www.learntogoogleit.com
   


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Processing payments using Paypal, python SDK

2014-01-07 Thread Robert Avram
beautiful! Thanks! You're awesome. Do you know if the SDK is threadsafe 
though?

On Friday, January 3, 2014 5:47:52 PM UTC-8, Vinny P wrote:

 On Thu, Jan 2, 2014 at 3:52 PM, Robert Avram robert...@gmail.comjavascript:
  wrote:

 I'm trying to figure out how to process payments using paypal python sdk 
 and google app engine.
 the following code seems to work, but I can't figure out, based on the 
 SDK, how to handle the exceptions (wrong credit card number etc).
 I would like the customer to be able to see the error. I would appreciate 
 any input! thanks!

  

 You can do this (at the bottom of your code):

 *if payment.create():*
 *  # Preapproval successful, redirect the customer to the approval URL.*
 *else:*
 *  # Payment failed*
 *  self.response.write(payment.error)*

 *Payment.error* holds the reason why the preapproval failed, but you may 
 want to do some post-processing to clean up the error text and present a 
 more user-friendly response.
   
  
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 App Engine Code Samples: http://www.learntogoogleit.com
  


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: Processing payments using Paypal, python SDK

2014-01-07 Thread Robert Avram
I checked out Stripe.com.. It seems pretty good. Paypal would still be my 
personal choice so far. It has a UI for the business to track their sales, 
etc also the customer that I'm developing for is a big fan of established 
names. Thanks for the input though , I'll definitely keep it in mind for 
future projects.

On Saturday, January 4, 2014 11:51:13 AM UTC-8, Doug Anderson wrote:

 My advice would be to use Stripe.com for processing payments.  You'll be 
 amazed at how easy it is to get started AND customers don't have to leave 
 your site!
 (I'm not associated with Stripe in any way... just using it with App 
 Engine and can attest to its ease of use)

 I may re-add PayPal at some point (in addition to Stripe) but it's a pita 
 to deal with the user leaving your site, processing the ipn notifications, 
 and then HOPING the user hits the button to return to your site when he's 
 finished on PayPal.  With PayPal there's no guarantee the user will return 
 to your site (although it's fairly likely).  I've also noticed that the 
 initial redirect to PayPal can take a while (for the page to load).  Just 
 my experience... I'm sure there are others that really like it.


 On Thursday, January 2, 2014 4:52:23 PM UTC-5, Robert Avram wrote:

 I'm trying to figure out how to process payments using paypal python sdk 
 and google app engine.
 the following code seems to work, but I can't figure out, based on the 
 SDK, how to handle the exceptions (wrong credit card number etc).
 I would like the customer to be able to see the error. I would appreciate 
 any input! thanks!!!


 class Buy(generichandler.MainHandler):

 def get(self):

api = paypalrestsdk.set_config(

  mode=sandbox,

  client_id=myclientid,

  client_secret=secret)

api.get_token()

paymentDic = {intent: sale,

  payer: {

payment_method: credit_card,

funding_instruments: [{

 credit_card: {


 type: visa,


 number: 4417119669820331,


 expire_month: 11,


 expire_year: 2018,


 cvv2: 874,


 first_name: Joe,


 last_name: Shopper,


 billing_address: {

   
line1: 52 N Main ST,

   
city: Johnstown,

   
state: OH,

   
postal_code: 43210,

   
country_code: US }}}]},

  transactions: [{

amount: {

  total: 1.47,

  currency: USD,

  details:{

subtotal: 
 1.41,

tax: 0.03,

shipping: 
 0.03}},

description: This is the 
 payment transaction description. }]}

payment = paypalrestsdk.Payment(paymentDic)

payment.create()
 Enter code here...




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Joomla CMS and GAE

2014-01-07 Thread Gary Mort



 Yes, I want to store the rule data in configuration.php and then on 
 initialization instead of the hardcoded rules I'm testing with, the rules 
 can be dynamically generated and registered with the wrapper.


 The only problem I have with that is Joomla won't save arrays of data by 
 default in configuration.php - so it means either a plugin to save the data 
 as an array, or limiting it to X number of rules



Indeed configuration.php might be the right place for it. A custom field 
 type could be useful, something that serializes a set rules to json.
 I think I even have something in place. Let me know and I'll send it over 
 to your repo. 

 

I've got some time to work on this again, thanks for your pull requests and 
fixes.  After a lot of thinking, I decided on a somewhat different path. 
 Since GAE allows me to execute PHP code BEFORE the Joomla application, I'm 
going to replace JConfig with a new class.  Instead of saving 
configuration.php as a PHP file with JConfig class, when executing under 
Google App Engine JConfig can be a virtual empty class with a large number 
of static variables[though I have some plans on adding extra functionality].

The configuration data can be saved to Google Datastore and serialized and 
saved to the memcache server.  This will allow us to actually make changes 
to the Joomla website configuration and have those changes saved out to 
datastore.  With that, I don't need to json encode arrays since they can be 
stored by serialization.

That said, I'd love to add the json form field as well since I should 
probably create a standard configuration.php file in case someone wants to 
move a GAE Joomla CMS website to Google Computer Engine.

 

 I'm mainly trying to balance my tendency to add in lots and lots of 
 options with keeping things simple so I can get to a release/usable 
 point  I mean, why spend weeks adding a bunch of options I don't need 
 if only 2 people are using it?  There doesn't seem to be a lot of interest 
 in deploying Joomla to GAE - it's fun for me and it's a good brain teaser 
 to force my mind into a coding gear.

  

 I completely agree here. I think more people will get involved once it's 
 fully functional, officially mentioned on the Joomla site and maybe posted 
 on some good blog like http://sitepoint.com

 Many developers probably don't consider GAE yet as PHP support in GAE is 
 still experimental and there still seem to be many bugs around.
 My gut feeling is that devs will be using it for really heavy workloads 
 since It really has a big potential as PaaS.


Will see, I'm working on getting it to an install point. :-)


I've been testing Joomla on Azure recently and would be extremely convinced 
 to stick on it if not the fact MySQL is provided by a 3rd party company 
 with scaling limitations and very harsh limits on free tier for testing (20 
 MB database !?), bigger options get very expensive. I'm also not really 
 convinced by Windows environment though it's PaaS and I shouldn't care what 
 it is running on.



I've run the Joomla! CMS under both IIS and recently on a Windows server 
running Apache and PHP...  I've always run into some odd problems here and 
there and I just avoid windows in general - having gone so far as to 
completely switching to Linux[Linux Mint Mate in fact] on all my systems to 
force myself to stop fiddling around with windows.
 

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Google App Engine Module Instances - separate or not?

2014-01-07 Thread Gary Mort

If an application is configured with multiple modules, for example I want 
to have the option to seperate out the admin part of the website from the 
front end and configure them as seperate modules - if both modules are 
used at the same time will they use two seperate instances even at low 
load, or is the decision to start multiple instances based on load?

For example, there are a couple of front end ajax functions that, when a 
super admin is logged on, will poll the admin part of the website for 
some statistical data.  When testing, the load will be low so without 
modules it would be a single instance.  With modules is it forced to run as 
two instances?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Processing payments using Paypal, python SDK

2014-01-07 Thread Doug Anderson
The paypal rest api involves receiving credit cards on the server which 
means they are potentially in logs etc (that with App Engine you don't 
control).  This complicates PCI compliance:

*Q: To whom does PCI apply?*
*A: *PCI applies to ALL organizations or merchants, regardless of size or 
number of transactions, that accepts,* transmits* or stores *any cardholder 
data*. Said another way, if any customer of that organization ever pays the 
merchant directly using a credit card or debit card, then the PCI DSS 
requirements apply.

*Q: What is defined as ‘cardholder data’?*
*A: *Cardholder data is any personally identifiable data associated with a 
cardholder. This could be an account number, expiration date, name, 
address, social security number, etc. All personally identifiable 
information associated with the cardholder that is stored, processed, or 
transmitted is also considered cardholder data.

http://www.pcicomplianceguide.org/pcifaqs.php#2

If someone does achieve PCI compliance with the PayPal rest api and App 
Engine please document the process so others can benefit from your 
experience.  I personally believe you're better off redirecting to PayPal 
and back than using PayPal rest.  Enough said on my part... good luck


On Monday, January 6, 2014 3:47:02 PM UTC-5, aschmid wrote:

 paypal has a rest api and you don’t need to redirect the customers to 
 paypal. but paypal is a pain to deal with in any case… and customer service 
 is very bad.
 i believe you need to be PCI compliant only if you store the credit card 
 data, not if you just process the api call on server side.

 another great service is www.braintreepayments.com which works all over 
 the world.

 On Jan 6, 2014, at 3:26 PM, Kaan Soral kaan...@gmail.com javascript: 
 wrote:

 I was set on Braintree last time I assessed the market, currently deciding 
 on how to incorporate locally, Braintree seems to have the widest coverage 
 for a simplistic/elegant solution similar to Stripe

 I think Paypal is a major turn off from many aspects, I would use a layer 
 similar to Paymentwall to handle all-else payments other than credit cards

 Spreedly is also extremely promising, it's not a payment gateway but 
 rather a PCI workaround that enables one to switch from one provider to 
 another or use multiple providers etc

 (Paypal/Braintree acquisition was alarming, I hope they don't mess 
 braintree too :)

 A beautiful reference for anyone who are interested: 
 https://spreedly.com/gateways

 On Monday, January 6, 2014 10:16:56 PM UTC+2, Doug Anderson wrote:

 Stripe is working hard to expand their international support (add Canada 
 to your list along with 8 other countries currently in beta).  But I would 
 agree that PayPal has the best international/currency support.  With PayPal 
 I can be located in the U.S. and accept payments in a variety of currencies 
 (as long as I enable my account to allow it). But to my knowledge with 
 PayPal you either have to transfer customers to the PayPal site for a 
 portion of the processing OR deal with credit card numbers hitting your 
 server and thus having to deal with PCI compliance.  I don't even know if 
 PCI compliance is possible with App Engine so that may just leave option #1 
 (transfering customers to PayPal for a portion of the processing... a 
 perfectly viable option... just less than ideal imo)

 On Monday, January 6, 2014 2:41:42 PM UTC-5, Kaan Soral wrote:

 If you are inside US you probably didn't notice this, which is good for 
 you, however there is a HUGE barrier around payment services

 It's extremely hard to accept payments, you have to be a company at 
 least and procedures after that are blurry

 For example you can only use stripe from US/UK/Ireland - as far as I 
 remember

 On Saturday, January 4, 2014 9:51:13 PM UTC+2, Doug Anderson wrote:

 My advice would be to use Stripe.com for processing payments.  You'll 
 be amazed at how easy it is to get started AND customers don't have to 
 leave your site!
 (I'm not associated with Stripe in any way... just using it with App 
 Engine and can attest to its ease of use)

 I may re-add PayPal at some point (in addition to Stripe) but it's a 
 pita to deal with the user leaving your site, processing the ipn 
 notifications, and then HOPING the user hits the button to return to your 
 site when he's finished on PayPal.  With PayPal there's no guarantee the 
 user will return to your site (although it's fairly likely).  I've also 
 noticed that the initial redirect to PayPal can take a while (for the page 
 to load).  Just my experience... I'm sure there are others that really 
 like 
 it.


 On Thursday, January 2, 2014 4:52:23 PM UTC-5, Robert Avram wrote:

 I'm trying to figure out how to process payments using paypal python 
 sdk and google app engine.
 the following code seems to work, but I can't figure out, based on the 
 SDK, how to handle the exceptions (wrong credit card number etc).
 I would like the customer to be 

Re: [google-appengine] Can't get a module to start via a cron job

2014-01-07 Thread alex
 Aside from just having the [module name].yaml file in the directory with 
my default app.yaml file, do I need to do anything else to get the 
dev_server to recognize the additional module?

Make sure you supply all *.yaml files to dev_appserver in cmdline args, 
e.g.:

dev_appserver.py app.yaml module1.yaml module2.yaml dispatch.yaml

Execute dev_appserver.py -h for more details.

On Tuesday, January 7, 2014 9:19:12 PM UTC+1, Adrian wrote:

 Thank you for the suggestions... this is odd... my directory has a 
 loadandprocess.yaml module, with the following text:

 application: [my app name]
 module: loadandprocess
 version: one
 runtime: python27
 api_version: 1
 threadsafe: true
 instance_class: B4_1G
 basic_scaling:
   max_instances: 1
   
 handlers:
 - url: /.*
   script: loadAndProcess.application
   login: admin

 But whenever I call 
 logging.info(modules.get_modules())

 It only recognizes my default application:

 INFO 2014-01-07 20:15:50,482 callLoadAndProcess.py:10] ['default']

 Aside from just having the [module name].yaml file in the directory with 
 my default app.yaml file, do I need to do anything else to get the 
 dev_server to recognize the additional module?

 Thanks!




 On Tuesday, January 7, 2014 2:47:39 AM UTC-5, Vinny P wrote:

 On Mon, Jan 6, 2014 at 7:03 PM, Adrian adrianj...@gmail.com wrote:

   File /home/adrian/arapphost/callLoadAndProcess.py, line 10, in get
 modules.start_module(loadandprocess,1)
   File 
 /home/adrian/google_appengine/google/appengine/api/modules/modules.py, 
 line 385, in start_module
 rpc.get_result()



 The traceback claims that the module and version you're referring to 
 doesn't exist. Try to debug the problem by:

 1. Sometimes modules throw up unusual errors when versions are expressed 
 as pure numbers instead of a mix of letters and numbers. In 
 loadandprocess.yaml, change *version: 1* to *version: one*. Remember to 
 update *callLoadAndProcess.py* with the correct version (the 
 *start_module* call).

 2. You can use *get_modules()* and *get_versions(module=___)* in the 
 *modules* package to enumerate all the modules and all the versions of a 
 given module that App Engine recognizes within your application. App Engine 
 may be recording the module under a different name or version. 
   
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 App Engine Code Samples: http://www.learntogoogleit.com
   



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Google App Engine Module Instances - separate or not?

2014-01-07 Thread Vinny P
On Tue, Jan 7, 2014 at 5:22 PM, Gary Mort garyam...@gmail.com wrote:

 If an application is configured with multiple modules, for example I want
 to have the option to seperate out the admin part of the website from the
 front end and configure them as seperate modules - if both modules are
 used at the same time will they use two seperate instances even at low
 load, or is the decision to start multiple instances based on load?

 For example, there are a couple of front end ajax functions that, when a
 super admin is logged on, will poll the admin part of the website for
 some statistical data.  When testing, the load will be low so without
 modules it would be a single instance.  With modules is it forced to run as
 two instances?




Unique modules/versions use different instances. Modules can specify
different sizes of instances (F1 vs. F4), frontend or backend instances (F1
vs B1), so they need their own instances allocated to them.

If you're concerned about high instance usage under low load, you can
configure the admin module as a basic scaling instance with a low
*idle_timeout* parameter so the instance shuts down quickly when not in
use:
https://developers.google.com/appengine/docs/python/modules/#Python_Instance_scaling_and_class


-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Configure static file handler/path via app.yaml or dynamically?

2014-01-07 Thread Gary Mort
With the local SDK, static files have a special handler which can serve 
their data without requiring the instance to be executing.

It strikes me that it would be useful to allow for a redirect handler as 
well.  This would help for static files where you want to store the files 
in a Google Storage Bucket so they can be updated without requiring a 
deployment of a new version of the app code, as such I've submitted a 
feature request for this in 10459.
https://code.google.com/p/googleappengine/issues/detail?id=10459https://code.google.com/p/googleappengine/issues/detail?can=2start=0num=100q=colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Loggroupby=sort=id=10459


By extension, it would also be useful to allow for a redirect handler to 
google storage either dynamically or only if a GS object exists in order to 
support caching.  IE a PHP application could dynamically generate HTML for 
a page, then save the html to Google Storage under a pre-determined object 
name and in the future the redirect handler can access that instead:
https://code.google.com/p/googleappengine/issues/detail?id=10460

Don't know if others would also like this, so I figured I'd post about the 
requests here in case there is broader support.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Processing payments using Paypal, python SDK

2014-01-07 Thread Vinny P
On Tue, Jan 7, 2014 at 2:57 PM, Robert Avram robert.av...@gmail.com wrote:

 beautiful! Thanks! You're awesome. Do you know if the SDK is threadsafe
 though?

 On Friday, January 3, 2014 5:47:52 PM UTC-8, Vinny P wrote:

 You can do this (at the bottom of your code):
 *if payment.create():*
 *  # Preapproval successful, redirect the customer to the approval URL.*



No problem! Glad to hear it's fixed.

Unfortunately, the SDK is not thread safe.

-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: Configure static file handler/path via app.yaml or dynamically?

2014-01-07 Thread WooDzu
Voted up on both as I see many benefits from having it

On Wednesday, January 8, 2014 12:59:15 AM UTC, Gary Mort wrote:

 With the local SDK, static files have a special handler which can serve 
 their data without requiring the instance to be executing.

 It strikes me that it would be useful to allow for a redirect handler as 
 well.  This would help for static files where you want to store the files 
 in a Google Storage Bucket so they can be updated without requiring a 
 deployment of a new version of the app code, as such I've submitted a 
 feature request for this in 10459.
 https://code.google.com/p/googleappengine/issues/detail?id=10459https://code.google.com/p/googleappengine/issues/detail?can=2start=0num=100q=colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Loggroupby=sort=id=10459


 By extension, it would also be useful to allow for a redirect handler to 
 google storage either dynamically or only if a GS object exists in order to 
 support caching.  IE a PHP application could dynamically generate HTML for 
 a page, then save the html to Google Storage under a pre-determined object 
 name and in the future the redirect handler can access that instead:
 https://code.google.com/p/googleappengine/issues/detail?id=10460

 Don't know if others would also like this, so I figured I'd post about the 
 requests here in case there is broader support.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.