[google-appengine] Re: Root domain on own hosting and subdomain on AppEngine. Possible?

2010-01-27 Thread olex13
2Tekniklas, 2Danny:

Thank you, that was exactly the information I was looking for.

BR, Olex

On Jan 26, 7:41 pm, Danny Tuppeny  wrote:
> On Jan 25, 11:50 am, olex13  wrote:
>
> > I'm not an expert in all this DNS/CNAME/etc things, so I afraid that
> > once I'll configure subdomain on appengine app,
> > root domain will not work on my PHP hosting
>
> There's nothing to worry about, it won't break. When you set up Google
> Apps (and App Engine), you only need to add CNAME records for
> subdomains. Nothing else will be affected. If you want to use email @
> Google Apps, you'll need to also set up MX records, but again, this
> won't affect your root domain (or other sub-domains).

-- 
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-appeng...@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.



Re: [google-appengine] export to csv

2010-01-27 Thread Pablo Francavilla
Hi Wesley, I think I didn't express well

My Application it's written with GAE/J . Our customer ask us to give him a
way to export to csv the entities of his application.

So, I Googled a lot, and I found the only way to do that it's deploying a
"parallel" python application. I follow these links

http://appengine-cookbook.appspot.com/recipe/using-the-python-bulk-exporter-tool-with-a-java-application/
http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Downloading_and_Uploading_All_Data
http://groups.google.com/group/google-appengine/browse_thread/thread/e26ea1dd8b9a38f9

My question is: It's possible to export to csv without writing a python
class for each Java class ?

Thanks

On Tue, Jan 26, 2010 at 8:27 PM, Wesley C (Google)

> wrote:

> it looks like you have some issue with your app.yaml file. please make
> sure it's of a format similar to the following:
>
>
> application: sandbox-getsense-it
> version: 1
> runtime: python
> api_version: 1
>
> handlers:
> - url: /.*
>  script: main.py
>
>
> also, here are two recent threads about creating CSV files:
>
>
> http://groups.google.com/group/google-appengine-python/browse_thread/thread/5055294449e1929b
>
> http://groups.google.com/group/google-appengine-python/browse_thread/thread/d9149ba91bfa9a9d
>
> hope this helps!
> -- wesley
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "Core Python Programming", Prentice Hall, (c)2007,2001
> "Python Fundamentals", Prentice Hall, (c)2009
>   http://corepython.com
>
> wesley.j.chun :: wesc+...@google.com 
> developer relations :: google app engine
>
> --
> 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-appeng...@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.
>
>

-- 
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-appeng...@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.



[google-appengine] Re: Datastore Query problem

2010-01-27 Thread App Engine User
This may help

http://code.google.com/p/pgae-examples/source/browse/1e/java/ch08/queries/src/queries/JPAQueriesServlet.java


On Jan 26, 6:13 pm, BlueBlood  wrote:
> Hi there,
> I'm a newbie with GAE, I'm using JPA to access datastore and I'm
> having a problem querying datastore.
>
> I have successfully inserted a few record into datastore using JPA but
> I can not read them back from datastore.
> Following is my code to query datastore.
>
> --
> EntityManager em = EMF.get().createEntityManager();
>                 Query query = em.createQuery("select t from
> com.test.dataschema.User_JPA as t");
>                 List result = query.getResultList();
>
> --
> EMF class definition:
>
> package com.fineart.dataschema;
> import javax.persistence.EntityManagerFactory;
> import javax.persistence.Persistence;
>
> public final class EMF {
>
>         private static final EntityManagerFactory emfInstance =
>         Persistence.createEntityManagerFactory("transactions-
> optional");
>
>     private EMF() {}
>
>     public static EntityManagerFactory get() {
>         return emfInstance;
>     }}
>
> --
>
> I would be so grateful if someone help me out.
> Thanks.

-- 
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-appeng...@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.



[google-appengine] Dynamic internationalization

2010-01-27 Thread Alexandru Farcas
There are any tutorial to teach me how to use dynamic
internationalization using Dictionary?

-- 
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-appeng...@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.



[google-appengine] Dynamical Internationalization problem with host page

2010-01-27 Thread Alexandru Farcas
I have :  public Dictionary dict=Dictionary.getDictionary("dict_ro");

where i have to put variable "dict_ro" in the host page and how?



my host page looks like this:





   

   My application

   
   
   

   

 var dict_ro = {
   firstName = "prenume",
lastName = "nume",
phone = "telefon",
addContact = "Adauga contact",
add = "Adauga",
getContacts = "Cauta clienti",
get= "Cauta",
listContacts = "Listare clienti",
initResult = "Aplicatia a inceput"
};

 


  
Your web browser must have JavaScript enabled




  


-- 
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-appeng...@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.



[google-appengine] Getting 404

2010-01-27 Thread Tim
When trying to navigate to my app, I get the dreaded 404 error. Is the
DNS service down?

-- 
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-appeng...@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.



[google-appengine] App engine - RPX Openid/ User Auth / Session Management - HELP!

2010-01-27 Thread spider100
Ive spent days searching the web and im drawing a blank. I simply want
to integrate RPX (janrain) into Appengine - lods of code for the
script inserts and the return of the openid token - thats all great -
but other than that no-one seems to take it any further as in actually
create an openid login that works - why? i assume no session
management?

Here is a simple class handler that gets the TOKEN for the open id and
then makes a fetch to grab the users profile. All very simple using
RPX.

class RPXHandler(webapp.RequestHandler):
  def get(self):
token = self.request.get('token')
url = 'https://rpxnow.com/api/v2/auth_info'
args = {
  'format': 'json',
  'apiKey': '#YOUR KEY#',
  'token': token
  }
r = urlfetch.fetch(url=url,
   payload=urllib.urlencode(args),
   method=urlfetch.POST,
   headers={'Content-Type':'application/x-www-form-
urlencoded'}
   )
json = simplejson.loads(r.content)

logging.info(json)

if json['stat'] == 'ok':
  unique_identifier = json['profile']['identifier']
  nickname = json['profile']['preferredUsername']
  email = json['profile']['email']


  # log the user in using the unique_identifier
  # this should your cookies or session you already have
implemented


  self.redirect('static/loggedin.html')
  else:
  self.redirect('static/error.html')

Now # here is where the problem starts - ideally we could be lazy and
just log them into Google accounts - but their is no method to log a
user in ie;

user.login(email)

so that abandons any hope of using google accounts - and to fair if we
have open id - why bother!

SO...

Next easy route - sessions - but in webapp appengine their are none -

Can anyone HAS anyone made this work - need some method of protecting
each page - ie Login=true
A method to log out
A method to get user credentials

Basically a simple user system using RPX/Openid - Dont need register
or passwords - just a user system that auths through RPX/Openid and
stored the data on app engine etc

I hope this make sense?

Martin

-- 
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-appeng...@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.



[google-appengine] Re: export to csv

2010-01-27 Thread Matthew Blain
I recommend using the new bulkloader we're working on. I'll send you a
link to it--it should make your life pretty simple.

You do not need to deploy a Python app (see various threads from me--
we'll document this soon).
bulkloader --dump writes out a sqlite3 file with encoded entities--
it's not particularly useful by itself, it's primarily useful for
bulkloader --restore. Though it can be parsed.

--Matthew

On Jan 27, 5:19 am, Pablo Francavilla  wrote:
> Hi Wesley, I think I didn't express well
>
> My Application it's written with GAE/J . Our customer ask us to give him a
> way to export to csv the entities of his application.
>
> So, I Googled a lot, and I found the only way to do that it's deploying a
> "parallel" python application. I follow these links
>
> http://appengine-cookbook.appspot.com/recipe/using-the-python-bulk-ex...http://code.google.com/appengine/docs/python/tools/uploadingdata.html...http://groups.google.com/group/google-appengine/browse_thread/thread/...
>
> My question is: It's possible to export to csv without writing a python
> class for each Java class ?
>
> Thanks
>
> On Tue, Jan 26, 2010 at 8:27 PM, Wesley C (Google)
> 
>
>
>
> > wrote:
> > it looks like you have some issue with your app.yaml file. please make
> > sure it's of a format similar to the following:
>
> > application: sandbox-getsense-it
> > version: 1
> > runtime: python
> > api_version: 1
>
> > handlers:
> > - url: /.*
> >  script: main.py
>
> > also, here are two recent threads about creating CSV files:
>
> >http://groups.google.com/group/google-appengine-python/browse_thread/...
>
> >http://groups.google.com/group/google-appengine-python/browse_thread/...
>
> > hope this helps!
> > -- wesley
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > "Core Python Programming", Prentice Hall, (c)2007,2001
> > "Python Fundamentals", Prentice Hall, (c)2009
> >  http://corepython.com
>
> > wesley.j.chun :: wesc+...@google.com 
> > developer relations :: google app engine
>
> > --
> > 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-appeng...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com > e...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.

-- 
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-appeng...@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.



[google-appengine] Re: App engine - RPX Openid/ User Auth / Session Management - HELP!

2010-01-27 Thread lucrussell
Hi Martin,

I'm working on something similar at the moment.  It is a bit difficult
to find information; the best reference I have found so far is the
DemandID application(http://demand.openid.net/).  You can get the
source for it from the SVN server (http://demand.googlecode.com/svn/
trunk).  This application uses its own simple session implementation,
but you could replace it with something like GAE Utiltities.

Hope this helps.

Luc


On Jan 27, 5:56 pm, spider100  wrote:
> Ive spent days searching the web and im drawing a blank. I simply want
> to integrate RPX (janrain) into Appengine - lods of code for the
> script inserts and the return of the openid token - thats all great -
> but other than that no-one seems to take it any further as in actually
> create an openid login that works - why? i assume no session
> management?
>
> Here is a simple class handler that gets the TOKEN for the open id and
> then makes a fetch to grab the users profile. All very simple using
> RPX.
>
> class RPXHandler(webapp.RequestHandler):
>   def get(self):
>     token = self.request.get('token')
>     url = 'https://rpxnow.com/api/v2/auth_info'
>     args = {
>       'format': 'json',
>       'apiKey': '#YOUR KEY#',
>       'token': token
>       }
>     r = urlfetch.fetch(url=url,
>                        payload=urllib.urlencode(args),
>                        method=urlfetch.POST,
>                        headers={'Content-Type':'application/x-www-form-
> urlencoded'}
>                        )
>     json = simplejson.loads(r.content)
>
>     logging.info(json)
>
>     if json['stat'] == 'ok':
>       unique_identifier = json['profile']['identifier']
>       nickname = json['profile']['preferredUsername']
>       email = json['profile']['email']
>
>       # log the user in using the unique_identifier
>       # this should your cookies or session you already have
> implemented
>
>       self.redirect('static/loggedin.html')
>       else:
>       self.redirect('static/error.html')
>
> Now # here is where the problem starts - ideally we could be lazy and
> just log them into Google accounts - but their is no method to log a
> user in ie;
>
> user.login(email)
>
> so that abandons any hope of using google accounts - and to fair if we
> have open id - why bother!
>
> SO...
>
> Next easy route - sessions - but in webapp appengine their are none -
>
> Can anyone HAS anyone made this work - need some method of protecting
> each page - ie Login=true
> A method to log out
> A method to get user credentials
>
> Basically a simple user system using RPX/Openid - Dont need register
> or passwords - just a user system that auths through RPX/Openid and
> stored the data on app engine etc
>
> I hope this make sense?
>
> Martin

-- 
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-appeng...@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.



[google-appengine] Re: When is the Timeout bug going to get fixed?

2010-01-27 Thread Prem
Keeping static files on external storage like Amazon S3/Amazon
Cloudfront or any CDN might help. I have not hit the file limit yet
but I did this to speed up page response. Maybe this will help?

On Jan 27, 3:30 am, phtq  wrote:
> Our application error log for the 26th showed around 160 failed http
> requests due to timeouts. That's 160 users being forced to hit the
> refresh button on their browser to get a normal response. A more
> typical day has 20 to 60 timeouts. We have been waiting over a year
> for this bug to get fixed with no progress at all. Its beginning to
> look like it's unfixable so perhaps Google could provide some
> workaround. In our case, the issue arises because of the 1,000 file
> limit. We are forced to hold all our .js, .css, .png. mp3, etc. files
> in the database and serve them from there. The application is quite
> large and there are well over 10,000 files. The Python code serving up
> the files does just one DB fetch and has about 9 lines of code so
> there is no way it can be magically restructured to make the Timeout
> go away. However, putting all the files on the app engine as real
> files would avoid the DB access and make the problem go away. Could
> Google work towards removing that file limit?

-- 
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-appeng...@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.



[google-appengine] Getting JUnit tests running for Eclipse and JDO

2010-01-27 Thread Will Bunker
I have gotten the basic setup recommended in the docs.  I am able to
query the database successfully but as soon as I attempt to persists a
JDO object I get a can't find annotations error.  The code is simply:

public class UserTestCase extends LocalDatastoreTestCase {

public void testDatesBeingSetOnCreate() {

User user = new User("w...@thebunkers.com", "mypassword");

//DatastoreServiceFactory.getDatastoreService().put(user);

PersistenceManager manager = newPersistenceManager();
manager.makePersistent(user);
manager.close();

Query query = new Query(User.class.getSimpleName());
assertEquals(1, DatastoreServiceFactory.getDatastoreService
().prepare(query).countEntities());
}


}

The error occurs at the makePersistent call.  If I comment it out the
test runs fine except of course there is no user on the assert line.

The error is:

org.datanucleus.jdo.exceptions.NoPersistenceInformationException: The
class "The class "com.sootra.shared.User" is required to be
persistable yet no Meta-Data/Annotations can be found for this class.
Please check that the Meta-Data/annotations is defined in a valid file
location." is required to be persistable yet no Meta-Data can be found
for this class. Please check that the Meta-Data is defined in a valid
file location for JDO.

I am able to run the create user fine when running the app locally, as
well as uploading it to app engine.  So the code is fine, but I am
unable to get JUnit test to recognize where the MetaData is being
created by the enhancer.

Has anyone successfully gotten this to run in Eclipse.  I am guessing
that I am missing some classpath setting or meta information, but can
not find any references anywhere on the net yet.

-- 
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-appeng...@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.



[google-appengine] Re: PHISHING APP retwite

2010-01-27 Thread nickmilon
but 
  countries that use to block Twitter usually block google as well, so
it is useless.

Regards
Nick

On Jan 27, 7:03 am, ds  wrote:
> Maybe it is useful for people in countries where Twitter is blocked.
> If so, best tell people so they're not caught unawares.

-- 
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-appeng...@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.



[google-appengine] Re: When is the Timeout bug going to get fixed?

2010-01-27 Thread phtq
Thanks for mentioning this recipe, it worked well in testing and we
will try it on the user population tomorrow.

On Jan 27, 9:48 am, djidjadji  wrote:
> There is an article series about the datastore. It explains that the
> Timeouts are inevitable. It gives the reason for the timeouts. They
> will always be part of Bigtable and the Datastore of GAE.
>
> The only solution is a retry on EVERY read. The get by id/key and the queries.
> If you do that then very few reads will result in a Timeout.
> I wait first 3 and then 6 secs between each request. I log each Timeout.
> If still Timeout after 3 read tries I raise the exception.
>
> The result is very few final read Timeouts. The log shows frequent
> requests that need a retry, but most of them will succeed with the
> first.
>
> For speed, fetch the Static content object by key_name, and key_name
> is the file path.
>
> 2010/1/26 phtq :
>
>
>
> > Our application error log for the 26th showed around 160 failed http
> > requests due to timeouts. That's 160 users being forced to hit the
> > refresh button on their browser to get a normal response. A more
> > typical day has 20 to 60 timeouts. We have been waiting over a year
> > for this bug to get fixed with no progress at all. Its beginning to
> > look like it's unfixable so perhaps Google could provide some
> > workaround. In our case, the issue arises because of the 1,000 file
> > limit. We are forced to hold all our .js, .css, .png. mp3, etc. files
> > in the database and serve them from there. The application is quite
> > large and there are well over 10,000 files. The Python code serving up
> > the files does just one DB fetch and has about 9 lines of code so
> > there is no way it can be magically restructured to make the Timeout
> > go away. However, putting all the files on the app engine as real
> > files would avoid the DB access and make the problem go away. Could
> > Google work towards removing that file limit?
>
> > --
> > 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-appeng...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine?hl=en.

-- 
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-appeng...@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.



[google-appengine] Re: When is the Timeout bug going to get fixed?

2010-01-27 Thread phtq
Splitting an application across multiple systems leaves your
application with a downtime which is the sum of the downtimes of the
individual systems. I wouldn't like to do that. I would hope Google
would lift the file limit so we could get the extra speed within the
same system.

On Jan 28, 7:15 am, Prem  wrote:
> Keeping static files on external storage like Amazon S3/Amazon
> Cloudfront or any CDN might help. I have not hit the file limit yet
> but I did this to speed up page response. Maybe this will help?
>
> On Jan 27, 3:30 am, phtq  wrote:
>
>
>
> > Our application error log for the 26th showed around 160 failed http
> > requests due to timeouts. That's 160 users being forced to hit the
> > refresh button on their browser to get a normal response. A more
> > typical day has 20 to 60 timeouts. We have been waiting over a year
> > for this bug to get fixed with no progress at all. Its beginning to
> > look like it's unfixable so perhaps Google could provide some
> > workaround. In our case, the issue arises because of the 1,000 file
> > limit. We are forced to hold all our .js, .css, .png. mp3, etc. files
> > in the database and serve them from there. The application is quite
> > large and there are well over 10,000 files. The Python code serving up
> > the files does just one DB fetch and has about 9 lines of code so
> > there is no way it can be magically restructured to make the Timeout
> > go away. However, putting all the files on the app engine as real
> > files would avoid the DB access and make the problem go away. Could
> > Google work towards removing that file limit?

-- 
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-appeng...@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.



[google-appengine] Re: Getting 404

2010-01-27 Thread Wooble


On Jan 27, 11:41 am, Tim  wrote:
> When trying to navigate to my app, I get the dreaded 404 error. Is the
> DNS service down?

A 404 error is returned from a web server.  Without DNS, you wouldn't
be reaching the server at all.

I'd check that your application is actually configured to serve the
URL you're requesting in app.yaml or web.xml, as well as in your
handler script.

-- 
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-appeng...@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.



[google-appengine] Re: Getting JUnit tests running for Eclipse and JDO

2010-01-27 Thread Will Bunker
Resolved this issue.  I was trying to use a class that I had marked
with:

@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)


not realizing that this puts all the persistence information in the
subclassed instances.

-- 
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-appeng...@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.



Re: [google-appengine] Re: Can't see the datastore viewer

2010-01-27 Thread Amit Prakash
Hi Wesley,
 Thanks for the response. Whats a LinkProperty in the context of Java on
apengine?
-Amit


On Wed, Jan 27, 2010 at 2:37 AM, Wesley C (Google)

> wrote:

> hi amit,
>
> apologies for the late reply. another user had a similar issue, and my
> recommendation is the same. please follow the advice i give there:
>
>
> http://groups.google.com/group/google-appengine-java/browse_thread/thread/68c98191e1d3679b
>
> best regards,
> -- wesley
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "Core Python Programming", Prentice Hall, (c)2007,2001
> "Python Fundamentals", Prentice Hall, (c)2009
>   http://corepython.com
>
> wesley.j.chun :: wesc+...@google.com 
> developer relations :: google app engine
>
> --
> 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-appeng...@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.
>
>

-- 
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-appeng...@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.



[google-appengine] Directly Putting Data in AppEngin e’s Blobstore

2010-01-27 Thread ekampf
I have a method which is basically an API where a caller uploads an
image and some metadata properties.
The method needs to verify the user's credentials and then process the
image and create several thumbnail sizes of the image and save them
all to the blobstore.

What I'm trying to do is get the url from blobstore.create_upload_url
and then issue a POST call to that url myself with my images.
I've been running into a lot of problems creating the creating the
multipart/form-data request and making this work..

Has anyone used this approach with the blobstore API?
Can anyone provide a sample that performs this call?

-- 
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-appeng...@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.



[google-appengine] java.lang.NoClassDefFoundError: Could not initialize class org.datanucleus.store.appengine.DatastoreFieldManager

2010-01-27 Thread Miroslav Genov

Hello,

7 hours after last deploy of my application I got the following exception:

java.lang.NoClassDefFoundError: Could not initialize class 
org.datanucleus.store.appengine.DatastoreFieldManager
  at 
org.datanucleus.store.appengine.query.DatastoreQuery$3.fetchFields(DatastoreQuery.java:511) 

  at 
org.datanucleus.state.JDOStateManagerImpl.loadFieldValues(JDOStateManagerImpl.java:841) 

  at 
org.datanucleus.state.JDOStateManagerImpl.initialiseForHollowAppId(JDOStateManagerImpl.java:284) 

  at 
org.datanucleus.state.StateManagerFactory.newStateManagerForHollowPopulatedAppId(StateManagerFactory.java:116) 

  at 
org.datanucleus.ObjectManagerImpl.findObjectUsingAID(ObjectManagerImpl.java:2117) 

  at 
org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo(DatastoreQuery.java:522) 

  at 
org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo(DatastoreQuery.java:490) 

  at 
org.datanucleus.store.appengine.query.DatastoreQuery.access$300(DatastoreQuery.java:108) 

  at 
org.datanucleus.store.appengine.query.DatastoreQuery$6.apply(DatastoreQuery.java:604) 

  at 
org.datanucleus.store.appengine.query.DatastoreQuery$6.apply(DatastoreQuery.java:596) 

  at 
org.datanucleus.store.appengine.query.LazyResult.resolveNext(LazyResult.java:94) 

  at 
org.datanucleus.store.appengine.query.LazyResult.resolveAll(LazyResult.java:116) 

  at 
org.datanucleus.store.appengine.query.LazyResult.size(LazyResult.java:110)
  at 
org.datanucleus.store.appengine.query.StreamingQueryResult.size(StreamingQueryResult.java:124) 

  at 
com.evo.adm.contract.server.ContractDaoJdo.findAll(ContractDaoJdo.java:140)
  at 
com.evo.adm.contract.server.ContractServiceImpl.findAll(ContractServiceImpl.java:250) 

  at 
com.evo.adm.contract.server.ContractServiceImpl$$EnhancerByGuice$$815fbed1.CGLIB$findAll$12() 

  at 
com.evo.adm.contract.server.ContractServiceImpl$$EnhancerByGuice$$815fbed1$$FastClassByGuice$$da19b7a9.invoke() 

  at 
com.google.inject.internal.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) 

  at 
com.google.inject.internal.ProxyFactory$1.intercept(ProxyFactory.java:48)


Does anyone have an idea what is causing it ?

Regards,
Miroslav

--
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-appeng...@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.



Re: [google-appengine] Re: Lock the memcache and how to block the call ?

2010-01-27 Thread Iap
2010/1/27 Danny Tuppeny :
> What is it you're trying to do? Deliberately causing your requests to
> block each other doesn't sound very scalable. Also, sleeping for only
> 1 millisecond will likely eat a ton of CPU while it spins waiting for
> the lock.

I think that "Lock" is essential for IPC, as well as
Inter-Request-Communication.
I set up a queue in the memcache.
And I have 2 process to update the queue.
One for production, the other for consuming.
I hope to sync these two processes (requests).
(The queue is not persistent, it is not worth to be stored in the datastore.
Also it is for performance. I have known that the memcache can be out of date.
It is not the issue for me.)

-- 
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-appeng...@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.



[google-appengine] question about memcache time

2010-01-27 Thread Satoshi
I am building a social network site, which involves a lot of
activities by users. I am using memcache to keep track of "who is
online". Whenever a user access my site, I store some user information
(name, etc.) to memcache using the user id as the memcache key. By
making the memcache timer short (a few minutes), I am able to quickly
detect a particular user is on-line or not.

In order to fully optimize this algorithm, I would like to know if the
memcache timer (started as the result of previous memcache.set) will
be reset when I call memcache.get or not.

If memcache.get does reset the timer, I will simply call memcache.get
each time the user accesses the site, and do nothing if it succeeds
(and call memcache.set if it fails).

If it does not, I need to call memcache.set whenever the user access
the site (to explicitly reset the timer).

I'd appreciate your help.
Satoshi

-- 
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-appeng...@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.



Re: [google-appengine] question about memcache time

2010-01-27 Thread Nickolas Daskalou
Hi Satoshi,

The memcache timers do not get reset when you get() a value, so you'll have
to do as you suggested and set() the timer each time the user accesses your
site.

Nick


2010/1/28 Satoshi 

> I am building a social network site, which involves a lot of
> activities by users. I am using memcache to keep track of "who is
> online". Whenever a user access my site, I store some user information
> (name, etc.) to memcache using the user id as the memcache key. By
> making the memcache timer short (a few minutes), I am able to quickly
> detect a particular user is on-line or not.
>
> In order to fully optimize this algorithm, I would like to know if the
> memcache timer (started as the result of previous memcache.set) will
> be reset when I call memcache.get or not.
>
> If memcache.get does reset the timer, I will simply call memcache.get
> each time the user accesses the site, and do nothing if it succeeds
> (and call memcache.set if it fails).
>
> If it does not, I need to call memcache.set whenever the user access
> the site (to explicitly reset the timer).
>
> I'd appreciate your help.
> Satoshi
>
> --
> 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-appeng...@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.
>
>

-- 
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-appeng...@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.



Re: [google-appengine] Re: PHISHING APP retwite

2010-01-27 Thread Danny Tuppeny
I've seen quite a few posts from people in different countries complaining
that *some* ghs IP addresses are blocked, and they often use their hosts
files to hit one that isn't. So I suspect this will work for them. There are
also non-countries that block twitter - companies that like to stop staff
browsing the web.



2010/1/27 nickmilon 

> but 
>  countries that use to block Twitter usually block google as well, so
> it is useless.
>
> Regards
> Nick
>
> On Jan 27, 7:03 am, ds  wrote:
> > Maybe it is useful for people in countries where Twitter is blocked.
> > If so, best tell people so they're not caught unawares.
>
> --
> 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-appeng...@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.
>
>

-- 
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-appeng...@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.



Re: [google-appengine] Re: Lock the memcache and how to block the call ?

2010-01-27 Thread Danny Tuppeny
I'm still not entirely clear on what you're trying to do. Why do you need to
sync these requests? If it's a queue of some sort, would the TaskQueue API
help?

http://code.google.com/appengine/docs/python/taskqueue/

2010/1/28 Iap 

> 2010/1/27 Danny Tuppeny :
> > What is it you're trying to do? Deliberately causing your requests to
> > block each other doesn't sound very scalable. Also, sleeping for only
> > 1 millisecond will likely eat a ton of CPU while it spins waiting for
> > the lock.
>
> I think that "Lock" is essential for IPC, as well as
> Inter-Request-Communication.
> I set up a queue in the memcache.
> And I have 2 process to update the queue.
> One for production, the other for consuming.
> I hope to sync these two processes (requests).
> (The queue is not persistent, it is not worth to be stored in the
> datastore.
> Also it is for performance. I have known that the memcache can be out of
> date.
> It is not the issue for me.)
>
> --
> 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-appeng...@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.
>
>

-- 
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-appeng...@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.



[google-appengine] Re: Transaction across entities in different groups

2010-01-27 Thread Danny Tuppeny
On Jan 24, 12:29 am, dburns  wrote:
> Making a User instance the parent of a SS (snapshot) instance seems
> like a natural fit, except then I can't fetch all the favourites via:
> favs = SS.get_by_id(user.fav_ids).  The reason is that all parents
> have to be the same to use SS.get_by_id (according 
> tohttp://code.google.com/appengine/docs/python/datastore/modelclass.htm...),
> but those favourites may have been created by various users (hence the
> parents would be different).

Can you use SS.get(keys) instead?

I think the reason that get_by_id requires the parent is because IDs
are not full keys (and presumably an ID can be duplicated for
different kinds). If you create Keys for them (you'll need to know
their Kind), you could call SS.get(keys) and get them all in one go.

-- 
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-appeng...@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.



Re: [google-appengine] Re: Lock the memcache and how to block the call ?

2010-01-27 Thread Iap
2010/1/28 Danny Tuppeny :
> I'm still not entirely clear on what you're trying to do. Why do you need to
> sync these requests? If it's a queue of some sort, would the TaskQueue API
> help?
> http://code.google.com/appengine/docs/python/taskqueue/
>

Hi, Danny. Thanks for your help.
The taskqueue is something like cron. That is not what I am looking for.
I am looking for something that behave just like the standard module:
threading.Lock.

-- 
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-appeng...@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.



[google-appengine] Re: bulkloader.py --restore timeout during connect

2010-01-27 Thread Miroslav Genov
Same on my side. Any idea what is causing it?

Regards,
  Miroslav

On Jan 7, 1:30 am, Ryan  wrote:
> Forgot to say that these objects are all part of a entity group.  The
> parent entities have already been restored though.  Do I need to
> handle entity groups differently?
>
> Thanks,
> Ryan
>
> On Jan 6, 2:35 pm, Ryan  wrote:
>
> > I've was able to restore most of my model objects from a local dev
> > instance to production using bulkloader.py --dump and --restore, but
> > my last Model object is timing out:
>
> > bulkloader.py --restore --kind=RecommendationIndex --url=http://
> > .appspot.com/remote_api --filename=RecommendationIndex.bulk --
> > debug 
>
> > [INFO    ] Logging to bulkloader-log-20100106.140340
> > [INFO    ] Throttling transfers:
> > [INFO    ] Bandwidth: 25 bytes/second
> > [INFO    ] HTTP connections: 8/second
> > [INFO    ] Entities inserted/fetched/modified: 20/second
> > [INFO    ] Opening database: bulkloader-progress-20100106.140340.sql3
> > [DEBUG   ] [Thread-1] RestoreThread: started
> > [DEBUG   ] [Thread-1] RestoreThread: exiting
> > [DEBUG   ] [Thread-2] RestoreThread: started
> > [DEBUG   ] [Thread-3] WorkerThread: started
> > [DEBUG   ] [Thread-5] WorkerThread: started
> > [DEBUG   ] [Thread-4] WorkerThread: started
> > [DEBUG   ] [Thread-6] WorkerThread: started
> > [DEBUG   ] [Thread-7] WorkerThread: started
> > [DEBUG   ] [Thread-8] WorkerThread: started
> > [DEBUG   ] [Thread-9] WorkerThread: started
> > [DEBUG   ] [Thread-10] WorkerThread: started
> > [DEBUG   ] [Thread-11] WorkerThread: started
> > [DEBUG   ] Configuring remote_api. url_path = /remote_api, servername
> > = <>.appspot.com
> > [DEBUG   ] [Thread-12] WorkerThread: started
> > [DEBUG   ] Bulkloader using app_id: <>
> > [INFO    ] Connecting to <>.appspot.com/remote_api
> > Traceback (most recent call last):
> >   File "/usr/local/bin/bulkloader.py", line 67, in 
> >     run_file(__file__, globals())
> >   File "/usr/local/bin/bulkloader.py", line 63, in run_file
> >     execfile(script_path, globals_)
> >   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> > google/appengine/tools/bulkloader.py", line 3960, in 
> >     sys.exit(main(sys.argv))
> >   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> > google/appengine/tools/bulkloader.py", line 3956, in main
> >     return _PerformBulkload(arg_dict)
> >   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> > google/appengine/tools/bulkloader.py", line 3814, in _PerformBulkload
> >     return_code = app.Run()
> >   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> > google/appengine/tools/bulkloader.py", line 3125, in Run
> >     self.RunPostAuthentication()
> >   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> > google/appengine/tools/bulkloader.py", line 3230, in
> > RunPostAuthentication
> >     self.request_manager.IncrementId(list(ancestor_path), kind,
> > high_id)
> >   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> > google/appengine/tools/bulkloader.py", line 1197, in IncrementId
> >     start, end = datastore.AllocateIds(model_key, 1)
> >   File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
> > GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
> > google/appengine/api/datastore.py", line 1377, in AllocateIds
> >     raise _ToDatastoreError(err)
> > google.appengine.api.datastore_errors.Timeout
>
> > The data set isn't particularly large (the dump is about 8 megs), and
> > it has the same number of entries and another model object (~5000)
> > that restored fine.  It's an 'index' object as recommended in the
> > Google I/O talk, so has some rather large StringListProperty values,
> > but never more than 500 short strings in a particular object, and of
> > course the exception occurs before it's actually transferring any
> > data.
>
> > If anyone has any ideas on what may be causing this, I'd love to hear
> > them.  It's always the same exception (datastore.AllocateIds), I guess
> > I could sprinkle in some logging statements around there in
> > bulkloader.py, but figured I'd ask here first.  I tried --dry_run and
> > got the standard datastore_v3 error, so it's definitely datastore
> > related.
>
> > Thanks,
> > Ryan

-- 
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-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr..

[google-appengine] Ancestor Queries...

2010-01-27 Thread Patrick Twohig
I've got a snippet of code that looks something like this

public  getSubEntities(Transaction transaction, Key parent) {
com.google.appengine.api.datastore.Query query;
com.google.appengine.api.datastore.PreparedQuery pquery;

Map  out = new HashMap();

query = new
com.google.appengine.api.datastore.Query().setAncestor(parent);
pquery = datastore.prepare(transaction, query);

for (Entity e : pquery.asQueryResultIterable()) {
out.put(e.getKey(), e);
}

return out;
}

...but when I run it, it never finds any sub entities of the given key.  I'm
guessing I'm missing somthing?  I'm trying to find all the direct
sub-entities of the given entity key.  I've checked that they're in the
datastore, but for whatever reason the loop never hits.  Any suggestions?  I
haven't tried this in the app engine, just the local data store.


-- 
Patrick H. Twohig.

Namazu Studios
P.O. Box 34161
San Diego, CA 92163-4161

Office: 619.862.2890 x100
Cell: 619.453.5075
Twitter: @svm_invictvs
IRC: svm_invic...@irc.freenode.net ##java, #android-dev, #iphonedev,
#appengine

http://www.namazustudios.com/

This communication, and any attachments, shall be considered confidential
and proprietary information of Namazu Studios LLC.  This message, and
attachments, are intended for the listed recipients only.  If you are not
one of the intended recipients, please destroy all copies of this
communication.

-- 
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-appeng...@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.