Re: [appengine-java] OpenId Provider using java

2012-01-24 Thread Matthew Jaggard
OK. I have implemented this in my program and have it mostly working* I
have tried to separate the parts that are relevant into a separate project
and remove the branding that I don't want to give away yet. So sorry if it
doesn't work well for you but you should get the general idea of the code
required. I've also never used git before so it's not a great project yet!

https://github.com/mjaggard/AppEngine-OpenID

Let me know what you think and also if you have any more specific questions.

Thanks,
Mat.


* the only part that doesn't work well on my main application is where I
tell the user at the bottom of the page if they're logged in or not. I do
this using a browser Cookie because I don't want to make requests that need
a JVM on my main public pages.


On 23 January 2012 18:41, TG gae.ic2...@gmail.com wrote:

 I cant find a example of openId provider using java on google app engine.

 I only found a phyton example.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-appengine-java/-/ZmEL1euaslIJ.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Is the Java Google Cloud Storage API supported in v1.6.1

2012-01-24 Thread michaelvb
I've been trying to use the Google Cloud Storage API which is published now 
under the Docs section of the App Engine site.  The docs states the API is 
supported on v1.6.0 and higher.  I have tried running my app locally and in 
App Engine and I get errors like:
java.io.IOException
at 
com.google.appengine.api.files.FileServiceImpl.translateException(FileServiceImpl.java:586)
at 
com.google.appengine.api.files.FileServiceImpl.makeSyncCall(FileServiceImpl.java:561)
at 
com.google.appengine.api.files.FileServiceImpl.create(FileServiceImpl.java:479)
at 
com.google.appengine.api.files.FileServiceImpl.createNewGSFile(FileServiceImpl.java:149)

Caused by: com.google.apphosting.api.ApiProxy$ApplicationException: 
ApplicationError: 704: Only blobstore supported currently
at 
com.google.appengine.api.files.dev.LocalFileService.throwError(LocalFileService.java:208)
at 
com.google.appengine.api.files.dev.LocalFileService.create(LocalFileService.java:218)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

The errors also seem to vary if I try using Google Storage under my Google 
Apps account and my regular gmail account.

Under my Google Apps account I get messages like:
Caused by: com.google.apphosting.api.ApiProxy$ApplicationException: 
ApplicationError: 7: 
at 
com.google.apphosting.runtime.ApiProxyImpl$AsyncApiFuture.failure(ApiProxyImpl.java:517)
at 
com.google.net.rpc3.client.RpcStub$RpcCallbackDispatcher$1.runInContext(RpcStub.java:741)
at 
com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)

Is the Java Google Storage API supported?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/7yQOSXugnAUJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Copying Entities to Another Application

2012-01-24 Thread markabrucey
Hi, I have recently created a new application to copy entities to from an 
older application.

I have done this in order to test my map reduce jobs safely as I have seem 
to be un-able to get it working properly LOCALLY. (see: 
https://groups.google.com/forum/#!topic/google-appengine-java/BA4SrhGLF9k)

I have read in GAE 1.5.3 RELEASE NOTES 
(http://googleappengine.blogspot.com/2011/08/app-engine-153-sdk-released.html) 
the below:

*Datastore Admin* - You can now enable the Datastore 
Adminhttp://code.google.com/appengine/docs/adminconsole/datastoreadmin.html 
function 
from the Admin Console. This will allow Java users to make use of this 
functionality, like deleting all entities of a certain kind, without having 
to upload a Python version of their application. And for Python developers, 
you no longer need to enable this in your app.yaml file.

In this process I kept getting a 403 error which I believe may be linked to 
this not being properly set up (I don't know if this has to be configured 
in the Java version anywhere since it is not yet documented for Java): 

remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION = (
'HTTP_X_APPENGINE_INBOUND_APPID', ['source appid here'])

So with no documentation to aid me, I decided to do it the Python way. This 
seemed pretty simple to set up and this is what I did:

1. Make a python Hello World app (with correct app.yaml config and 
appengine-config.py file for the remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION
)
2. Deploy the python application  set it as the default version
3. Make sure both Datastore Admin areas are enabled (also making sure that 
the source application is READ ONLY mode).
4. Choose the Kinds in the source app to copy across.
5. Click the copy button.

Then this is where I hit more problems...
How long should it take to copy entities? (it does say quite a while) - I 
have maybe less than 10GBytes of data to copy to the target application and 
still the Job status is:

Active (0 steps completed, 1 active) - This was to copy only 1 Kind which 
was 783 KBytes.

I saw: Copy job with id 
https://ah-builtin-python-bundle-dot-latest-dot-acsoft-test.appspot.com/_ah/mapreduce/detail?mapreduce_id=158524493308560DDC11C
 
kicked off.

Then the following:

Loading Job Status...   KeyError: Could not find job with ID u'..'
Overview
   
   
Counters
   
   
Mapper statusShardStatusDescriptionLast work itemTime elapsed
What does this mean? I have a few my jobs now because I was unaware that 
anything actually worked properly until I realised that appended to the end 
of the Datastore Admin page was a list of my jobs and statuses.

They have all been in the following state for over 2 hours (surely at least 
one kinds should have copied by now given their small sizes?):

Copying all ..., ..., ..., ..., ..., ... entities to app_idActive (0 steps 
completed, 6 active)Copying all ... entities to app_idActive (0 steps 
completed, 1 active)



Sorry if it is a bit of an essay, I try to be as informative as possible.


Thanks for any replies,

Mark


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/JxjxM8KrdfIJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] 1.6.2 Pre-Release SDKs Out

2012-01-24 Thread Marzia Niccolai
Hi,

The 1.6.2 were uploaded yesterday. Release notes are below.

- Marzia

Java Version 1.6.2===- The Admin Console Datastore
Admin has added experimental backup and restore  functionality. The
job occurs within your application and counts against your
application quota, including Instance Hours, Datastore Ops and
Datastore  Storage.- Channel API quota is now automatically measured
in terms of minutes a channel  has been open, instead of channels
created. Additionally, developers can now  specify how long a channel
can be open, with the default remaining two hours.- Task Queue API
requests now include a X-Appengine-TaskETA header, that can be  used
to measure task delivery latency.- We have removed the deprecated labs
version of the TaskQueue API.- The default API deadlines for Blobstore
API calls have been raised to 15s for  online and 30s for offline
requests, up from 5s.- The Images API now allows you to stretch an
image without maintaining the  aspect ratio.
http://code.google.com/p/googleappengine/issues/detail?id=2220
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D2220usg=AFQjCNF8o0Kw1igg_YfIHonC4lUh7t-bhA-
Fixed an issue where the SDK did not resize images down to 512 pixels
by  default, as it does in production.- Fixed an issue with the Images
API where valid images were returning a  NotImageError.
http://code.google.com/p/googleappengine/issues/detail?id=5545
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D5545usg=AFQjCNGtEahZ9f4KlXxHlKdFlhprPe5VYA

Python Version 1.6.2- The Admin Console Datastore
Admin has added experimental backup and restore  functionality. The
job occurs within your application and counts against your
application quota, including Instance Hours, Datastore Ops and
Datastore  Storage.- Channel API quota is now automatically measured
in terms of minutes a channel  has been open, instead of channels
created. Additionally, developers can now  specify how long a channel
can be open, with the default remaining two hours.- Task Queue API
requests now include a X-Appengine-TaskETA header, that can be  used
to measure task delivery latency.- The default API deadlines for
Blobstore API calls have been raised to 15s for  online and 30s for
offline requests, up from 5s.- The Images API now allows you to
stretch an image without maintaining the  aspect ratio.
http://code.google.com/p/googleappengine/issues/detail?id=2220
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D2220usg=AFQjCNF8o0Kw1igg_YfIHonC4lUh7t-bhA-
The Blobstore API now includes the asynchronous function calls
create_upload_url_async, delete_async, and fetch_data_async.- Django
version 1.3 is now available in the Python 2.5 runtime.- We've added a
django_wsgi builtin to allow easier bootstrapping of Django
applications.- Fixed an issue with remote_api where calling
fetch_page() with a page size  of 301 and chaining the calls through
the returned cursor was skipping half  of the results.- Fixed an issue
where the PIL _imagingmath module was not available in Python  2.7.-
Fixed an issue where the SDK did not resize images down to 512 pixels
by  default, as it does in production.- Fixed an issue with the Images
API where valid images were returning a  NotImageError.
http://code.google.com/p/googleappengine/issues/detail?id=5545
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D5545usg=AFQjCNGtEahZ9f4KlXxHlKdFlhprPe5VYA-
Fixed an issue where the SDK didn't start when using Python 2.7 and
the  --backends flag.
http://code.google.com/p/googleappengine/issues/detail?id=6187
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D6187usg=AFQjCNGpyXlwcpJ4bgAb3UqLKl3QYwtl4g-
Fixed an issue where Jinja2 was not included in the SDK for use with
Python  2.7.
http://code.google.com/p/googleappengine/issues/detail?id=6265
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D6265usg=AFQjCNEcUbWg9MMFHqgxR5HOjvTQ8eiESg-
Fixed an issue with the sql datastore stub in Python 2.7 where the
sqlite  module no longer accepted strings with non-ASCII characters.
 http://code.google.com/p/googleappengine/issues/detail?id=6290
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D6290usg=AFQjCNHJq5jt9s-6HaCdIHHDCfZICu1NYA-
Fixed an issue where gzip did not work with Python 2.7 in the
dev_appserver.
http://code.google.com/p/googleappengine/issues/detail?id=6324
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D6324usg=AFQjCNFUmdSo0Xjb6Sjxs3LfcttMycMwVA-
Fixed an issue where urllib2 did not work with Python 2.7.
http://code.google.com/p/googleappengine/issues/detail?id=6567
http://www.google.com/url?q=http://code.google.com/p/googleappengine/issues/detail%3Fid%3D6567usg=AFQjCNFsAGP7Uk17L8hPIYeK0BuAsLLtkg-
Fixed 

[appengine-java] Re: OpenId Provider using java

2012-01-24 Thread Francois Masurel
I've successfully built an OpenId provider on GAE Java using this project 
as a starting point :

http://code.google.com/p/joid/ 

I added some connectors to enable users to log in using their social 
networks accounts (Twitter, Facebook, Foursquare, LinkedIn, etc.) as well 
as Mozilla BrowserId.

Francois

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/yXgdzmKglRMJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] play and Frontend Instace Hours

2012-01-24 Thread jacek kijewski
Hi,
 I've deployed a simple application to my gae account. It's modified sample 
application, without any backend.
I've observed that even without any requests, the frontend instance value 
is increasing. After ten hours of idleness there is about 4-5 hours of the 
Frontend Instance activity and it's still increasing.
Ok, I know that 1h costs 0.08$ but why that is happening. Did you face 
similar problem?
Regards
Jacek


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/VKnoLSzVq0MJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: play and Frontend Instace Hours

2012-01-24 Thread Paul Ford
This is only true if you have converted to a paid app instance. As far as I 
can tell from the following -  
http://code.google.com/appengine/docs/billing.html

Developers can consume a certain amount of resources for free and it is 
only upon conversion to a paid instance that you start to pay the prices 
listed in the enclosed url. i.e. the $0.08 for Frontend, etc;

Hope this helps

regards

paul

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/7kECC9Eh4Y8J.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] lost trying to understand JDO on BigTable: please help coding example

2012-01-24 Thread John Goche
Hello,

I have the following classes in a unidirectional 1-1 relationship to each
other:

class A {

   B b;

   // ... more fields

}

class B {

  String k;

  // ... more fields
}

I want k to be the primary key for class B as well as for class A.
How do I accomplish this task? I've been told I need to implement
a PK class but don't understand why I would need one.

Given I cannot find much information on the BigTable implementation
I don't even know how to think about the problem (I understand RDBMS
and think of each class as having its own table, although this may be
wrong).

Thank you for your kind help,

John Goche

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Google AppEngine MapReduce is not working anymore... HELP needed!!

2012-01-24 Thread Emanuele Ziglioli


Could you post it on the MapReduce group too?
http://groups.google.com/group/app-engine-pipeline-api


On Jan 25, 12:15 am, imanol00 imano...@gmail.com wrote:
 Hi guys.

 I have a problem using the MapReduce feature of Google App Engine. In
 general, it works fine, but I am experiencing some strange behaviour
 in the MapReduce job management. It's just like there are some jobs
 that are running zombie in my application.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] lost trying to understand JDO on BigTable: please help coding example

2012-01-24 Thread Matthew Jaggard
Do you have any good reason to have separate classes rather than one big
one with all the stuff that's in each? The main reason I ask is that
loading two entities is about twice as expensive as loading one twice the
size. If you do have a good reason, you could still persist them as a
single entity, but I'm not sure how to do this in JDO. In Objectify, you
would just @Embed one class into the other.

Mat.

On 24 January 2012 20:05, John Goche johngoch...@googlemail.com wrote:


 Hello,

 I have the following classes in a unidirectional 1-1 relationship to each
 other:

 class A {

B b;

// ... more fields

 }

 class B {

   String k;

   // ... more fields
 }

 I want k to be the primary key for class B as well as for class A.
 How do I accomplish this task? I've been told I need to implement
 a PK class but don't understand why I would need one.

 Given I cannot find much information on the BigTable implementation
 I don't even know how to think about the problem (I understand RDBMS
 and think of each class as having its own table, although this may be
 wrong).

 Thank you for your kind help,

 John Goche

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] lost trying to understand JDO on BigTable: please help coding example

2012-01-24 Thread John Goche
On Tue, Jan 24, 2012 at 10:08 PM, Matthew Jaggard matt...@jaggard.org.ukwrote:

 Do you have any good reason to have separate classes rather than one big
 one with all the stuff that's in each?


Well, the reason is that I need to reuse class B. For example class A also
has a separate ListB member.


 The main reason I ask is that loading two entities is about twice as
 expensive as loading one twice the size.


Tough. I cannot sacrifice code readability here.


 If you do have a good reason, you could still persist them as a single
 entity, but I'm not sure how to do this in JDO. In Objectify, you would
 just @Embed one class into the other.

 Mat.


Thank you for your reply.

Looking forward to hearing from someone who would know how to do this in
JDO.

Regards,

John Goche



 On 24 January 2012 20:05, John Goche johngoch...@googlemail.com wrote:


 Hello,

 I have the following classes in a unidirectional 1-1 relationship to each
 other:

 class A {

B b;

// ... more fields

 }

 class B {

   String k;

   // ... more fields
 }

 I want k to be the primary key for class B as well as for class A.
 How do I accomplish this task? I've been told I need to implement
 a PK class but don't understand why I would need one.

 Given I cannot find much information on the BigTable implementation
 I don't even know how to think about the problem (I understand RDBMS
 and think of each class as having its own table, although this may be
 wrong).

 Thank you for your kind help,

 John Goche

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] lost trying to understand JDO on BigTable: please help coding example

2012-01-24 Thread Ikai Lan (Google)
You don't need to implement a Primary Key class. Specify the primary field
as a Key and generate the key using KeyFactory:

http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.Builder.html

You can autogenerate IDs with this method:

http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyRange.html

You'll probably get more mileage persisting the object in a single entity
(treating the datastore more like a key-value store) and using a
translation later to turn it into classes to work with than trying to do
magic trying to get these classes to persist the way you want them to. In
my opinion, you're not sacrificing code readability - you're just moving
work around.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
plus.ikailan.com



On Tue, Jan 24, 2012 at 1:21 PM, John Goche johngoch...@googlemail.comwrote:



 On Tue, Jan 24, 2012 at 10:08 PM, Matthew Jaggard 
 matt...@jaggard.org.ukwrote:

 Do you have any good reason to have separate classes rather than one big
 one with all the stuff that's in each?


 Well, the reason is that I need to reuse class B. For example class A also
 has a separate ListB member.


 The main reason I ask is that loading two entities is about twice as
 expensive as loading one twice the size.


 Tough. I cannot sacrifice code readability here.


 If you do have a good reason, you could still persist them as a single
 entity, but I'm not sure how to do this in JDO. In Objectify, you would
 just @Embed one class into the other.

 Mat.


 Thank you for your reply.

 Looking forward to hearing from someone who would know how to do this in
 JDO.

 Regards,

 John Goche



 On 24 January 2012 20:05, John Goche johngoch...@googlemail.com wrote:


 Hello,

 I have the following classes in a unidirectional 1-1 relationship to
 each other:

 class A {

B b;

// ... more fields

 }

 class B {

   String k;

   // ... more fields
 }

 I want k to be the primary key for class B as well as for class A.
 How do I accomplish this task? I've been told I need to implement
 a PK class but don't understand why I would need one.

 Given I cannot find much information on the BigTable implementation
 I don't even know how to think about the problem (I understand RDBMS
 and think of each class as having its own table, although this may be
 wrong).

 Thank you for your kind help,

 John Goche

 --
 You received this message because you are subscribed to the Google
 Groups Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: play and Frontend Instace Hours

2012-01-24 Thread jacek kijewski
Hi
I had a problem with increasing of Frontend Hours rate without
requests to the app.
I found the cause and work-around. I will be investigating the problem
further.

There was some requests from one of Firefoxes, I used to test the
app.
These were not usual requests for the whole page, but requests for
resources such as css and js.
/public/stylesheets/clear.css etc.

I don't have access to the computer, which is the source of these
requests. I will check it tomorow.
But i've created dos.xml and put the IP of this computer to my black
list.
Tomorow I will check, from where I got this request and why.
Regards
Jacek

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] lost trying to understand JDO on BigTable: please help coding example

2012-01-24 Thread John Goche
On Tue, Jan 24, 2012 at 10:31 PM, Ikai Lan (Google) ika...@google.comwrote:

 You don't need to implement a Primary Key class. Specify the primary field
 as a Key and generate the key using KeyFactory:


 http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.Builder.html


Thank you for your reply, but what is a key with ancestors?



 You can autogenerate IDs with this method:


 http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyRange.html

 You'll probably get more mileage persisting the object in a single entity
 (treating the datastore more like a key-value store) and using a
 translation later to turn it into classes to work with than trying to do
 magic trying to get these classes to persist the way you want them to.


Can you give me an example? In my code I have the following:

class Data {
  static ListA la;
}

class A {
  B foo;
  C bar;
  ListD foobar1;
  ListE foobar2;
}

class B {
  String k; // (needs to be the primary key of A)
  //...
}

I only need persist la, but I have the given class structure and have made
everything
persistencecapable. Not sure if this is the way to go.


 In my opinion, you're not sacrificing code readability - you're just
 moving work around.


So how would I move stuff around in the example given above?

Thanks,

John Goche

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] lost trying to understand JDO on BigTable: please help coding example

2012-01-24 Thread Jeff Schnitzer
On Tue, Jan 24, 2012 at 4:21 PM, John Goche johngoch...@googlemail.com wrote:

 The main reason I ask is that loading two entities is about twice as
 expensive as loading one twice the size.

 Tough. I cannot sacrifice code readability here.

This is an intriguing attitude.

You have arrived with a preconceived notion of exactly what you want
your Java data structure to look like and you are now trying to force
GAE into that mold.  If you stay this path, you will very likely end
up abandoning appengine in frustration.  At best, you will produce
software that works poorly.

You have a long learning curve ahead of you, both in terms of learning
how the datastore works and learning how to create a data model that
is both performant and maintainable.  I have two pieces of advice:

 * Read the Storing Data section of the GAE manual *completely*.
The nature of keys and ancestry is only one of many pieces of
knowledge you must master to develop applications here.  Even though
it looks vaguely like one on the surface, this is not an RDBMS and
your learned instincts are likely wrong.  Do not believe you can just
understand JDO.

 * When you ask for help, try be somewhat more general describing what
you want to do.  You're asking about how to specifically arrange
primary keys in Java classes when it may be the case that what you
want to do is embed one class in the other.  There is not one
canonical way to model entities on GAE, so if you want help, start
from the perspective of this is roughly what I'm trying to do... is
it the right way?

As to your specific problem, I think you'll get a lot more help if you
rephrase the question.  Everyone here is just taking guesses at what
you're trying to ask.

Suerte,
Jeff

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Using email service and avoiding spam

2012-01-24 Thread Peter Kuhar
Hi,

When using appengine email service my emails regulary go to spam.

I guess it has something to do with return path emails being something like 
3-ksftwojc40rgb3z5-t53x3rz2.t536vav8+av9al61byr8@m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com

Any suggestions on how to avoid that? The from email is one of the 
registered admins of the app.

br,
Peter

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/_dUeVKI_J2UJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.