[appengine-java] Re: DatastoreService instances

2010-04-01 Thread keyurva
Thanks John and Jeff. On Apr 1, 8:52 pm, Jeff Schnitzer wrote: > Appengine devs have said on a number of occasions that we should not > assume thread-safety of any class not documented as being thread-safe. >  I don't see anything in the javadocs indicating that DatastoreService > is thread-safe,

[appengine-java] Re: DatastoreService instances

2010-04-01 Thread keyurva
Thanks John and Jeff. Thread-safety is a good enough reason to not keep a DS instance lying around. On Apr 1, 8:52 pm, Jeff Schnitzer wrote: > Appengine devs have said on a number of occasions that we should not > assume thread-safety of any class not documented as being thread-safe. >  I don't s

Re: [appengine-java] DatastoreService instances

2010-04-01 Thread Jeff Schnitzer
Appengine devs have said on a number of occasions that we should not assume thread-safety of any class not documented as being thread-safe. I don't see anything in the javadocs indicating that DatastoreService is thread-safe, therefore keeping an appwide instance of DS is probably risky - even if

Re: [appengine-java] Like query in google datastore

2010-04-01 Thread Jeff Schnitzer
I wrote this comment on the objectify mailing list earlier today; it seems apropos so I will copy it here: - Sadly, true fulltext search is not something offered by appengine. It's not impossible to layer on top of appengine, but it's a nontrivial problem. The dumb solution (that will work f

RE: [appengine-java] Book Recommendation

2010-04-01 Thread Steve Robillard
I have read every published book on GAE and this is by far the best, Programming Google App Engine hands down, JAVA or python. Having said that GAE is a very fast moving target and there has been much development since this book was published last year. This book along with the online docs will get

[appengine-java] Book Recommendation

2010-04-01 Thread iwas9409
I'm lower intermediate programmer that would like to delve into Google App Engine for Java using is Data store. Can someone recommend a good book or additional places then the 'getting started' stuff on Google App Engine with Java. -Tom -- You received this message because you are subscribed t

Re: [appengine-java] DatastoreService instances

2010-04-01 Thread John Patterson
As Ikai pointed out a DatastoreService is really very light weight so it really makes very little difference. If you are changing the config properties from place to place your only options are to cache each service by config or create a new one each time. If I were writing code by hand I

Re: [appengine-java] Like query in google datastore

2010-04-01 Thread John Patterson
Like Gal said, you would need to make your own full-text search. You don't need an OR query if all values are in a single multi-valued property. You could do this by creating an index entity: CandidatesSearch { @Parent Candidate source; List words; } It is a child of the Ca

[appengine-java] DatastoreService instances

2010-04-01 Thread keyurva
In my application, I create a DatastoreService instance, maintain a reference to it and use it for the life of that instance of the application. In another discussion I learned that the cost of creating a new DatastoreService instance is negligible. Given that, is it still advisable for me to mai

[appengine-java] Re: Low-level API and eventual consistency

2010-04-01 Thread keyurva
Thanks. On Apr 1, 4:29 pm, "Ikai L (Google)" wrote: > That's correct. The cost of creating an instance is negligible, though. It's > not dissimilar to creating different MemcacheService instances with > different write policies. > > > > On Thu, Apr 1, 2010 at 4:09 PM, keyurva wrote: > > I use th

Re: [appengine-java] Low-level API and eventual consistency

2010-04-01 Thread Ikai L (Google)
That's correct. The cost of creating an instance is negligible, though. It's not dissimilar to creating different MemcacheService instances with different write policies. On Thu, Apr 1, 2010 at 4:09 PM, keyurva wrote: > I use the low-level datastore API. At runtime, I want to use the new > event

[appengine-java] Low-level API and eventual consistency

2010-04-01 Thread keyurva
I use the low-level datastore API. At runtime, I want to use the new eventual consistency on occasions and strong consistency at others. I was looking at the Query class to set the consistency option but noticed that it is only available in DatastoreServiceConfig. Is it expected that one needs to

[appengine-java] MEMCACHE JCACHE NOT CLEARING ON DEVELOPENT ENV OR PRODUCTION

2010-04-01 Thread Geo
Hi GAE Team First, I want to say that this is a great system. I like the collaboration, and total outcome of GAE. Now to my issue. I am sure I am doing something wrong, but after I implemented caching on my test application, i see that my caching policies are not taking effect. Basically keepi

[appengine-java] Re: java.lang.ClassNotFoundException: com.google.appengine.tools.appstats.AppstatsFilter

2010-04-01 Thread KarthikR
Hi In my 1.3.2 installation, the missing class "com.google.appengine.tools.appstats.AppstatsFilter" is part of 'appengine-api-labs-1.3.2.jar'. The jar is found in the following directories: lib\impl\ , lib\user and demos\guestbook\war\WEB-INF \lib . Can you check if your install has the labs api

[appengine-java] Re: javax.net.ssl.HttpsURLConnection

2010-04-01 Thread jcjones1515
Ok. I was able to implement the solution described here: http://esxx.blogspot.com/2009/06/using-apaches-httpclient-on-google-app.html On Apr 1, 11:37 am, Don Schwarz wrote: > Yes, you're right.  HttpsURLConnection is not currently available and we > should remove the reference to it from the do

Re: [appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Max Ross (Google)
The 2 options you listed are indeed better, but they don't work if your goal is to prevent access to an uninitialized FetchOptions object. That was our original intent, so that's how we ended up steering you through the Builder at the start. At one point before we launched we had a more standard

[appengine-java] Re: How to exclude requests to /stats when viewing appstats?

2010-04-01 Thread Peter Ondruska
Well, then let the filter filter explicitly those url-patterns you want to check stats for. On 1 dub, 16:20, Ice13ill wrote: > I'm trying to use appstats to view the requests to my app. But i can't > exclude the requests to /stats/ as stated in the dev guide: > > "This installs the filter for all

Re: [appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Jeff Schnitzer
Oh, I wasn't suggesting a constructor that takes all the arguments, I'm just wondering why this: FetchOptions opts = FetchOptions.Builder.withLimit(10).offset(200); ...is better than this... FetchOptions opts = new FetchOptions().limit(10).offset(200); ...or even... FetchOptions opts = FetchOp

Re: [appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Max Ross (Google)
Ok, we'll expose that method. With a public constructor it's very easy to mix up your args, especially when you have args of the same type. For example, someone is pretty much guaranteed to mix up the offset, limit, and prefetch args. A Builder prevents this. Josh Bloch has a nice chapter on th

[appengine-java] Re: Eventually consistent reads and JDO

2010-04-01 Thread Isdal
Thanks Ikai! I noticed that the docs are updated now too. This page has a couple examples on it as well: http://code.google.com/appengine/docs/java/datastore/usingjdo.html // Tomas On Mar 30, 3:57 pm, "Ikai L (Google)" wrote: > Yep. The example is documented here: > > http://googleappengine.blo

Re: [appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Jeff Schnitzer
Yes, that would solve the problem. Although I have to wonder, how is this any better than having a public constructor? Jeff On Thu, Apr 1, 2010 at 10:08 AM, Max Ross (Google) wrote: > Hi Jeff, > > Note that DatastoreServiceConfig exposes a withDefaults() method. > FetchOptions has one too but i

[appengine-java] Finally, I published my Android/GAE based MMO War Game

2010-04-01 Thread ZeroCool
Big thanks to GAE team and Objectify authors. I couldn't have done it without the help of you guys. If anyone is interested, search 'pocket empires' or 'pe' in Android Market. Now app engine is doing great serving about 3 requests/second with about 700 active users. Looking forward to feedbacks :)

Re: [appengine-java] com.google.appengine.api.datastore.DatastoreServiceConfig; not resolved by Eclipse with GAE plugin v1.3.2

2010-04-01 Thread Max Ross (Google)
Hi Didier, I can't say what's going on with your plugin but this is almost certainly a classpath issue. DatastoreServiceConfig was introduced in 1.3.2 so make sure you have the appengine-api.jar that shipped with SDK 1.3.2 in your classpath. Max On Thu, Apr 1, 2010 at 4:01 AM, Didier Durand wro

Re: [appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Max Ross (Google)
Hi Jeff, Note that DatastoreServiceConfig exposes a withDefaults() method. FetchOptions has one too but it's package protected. We didn't expose it because FetchOptions isn't required for many low level datastore calls and we didn't see why users would want to create one if they didn't plan to ad

Re: [appengine-java] Problem deploying the tutorial app

2010-04-01 Thread Ikai L (Google)
What is your application ID? On Wed, Mar 31, 2010 at 6:58 PM, theBULLL wrote: > Hello, > > I am getting the following error and I cannot seem to figure out what > is wrong. I would appreciate any insight. Here is what results in > the Eclipse console. I have replace my app id number with MY_AP

Re: [appengine-java] javax.net.ssl.HttpsURLConnection

2010-04-01 Thread Don Schwarz
Yes, you're right. HttpsURLConnection is not currently available and we should remove the reference to it from the documentation. Do you need to be able to provide client-side certificates, validate server-side certificates or do custom hostname validation? If so, please star one of the followin

[appengine-java] Re: How to register a custom ELResolver?

2010-04-01 Thread KarthikR
Hi Can you check out http://stackoverflow.com/questions/2551517/gae-j-unable-to-register-a-custom-elresolver ? > this is recognizeable as a bug in Tomcat 6.x. A workaround is to force the loading of JspRuntimeContext yourself before getting the factory: > Class.forName("org.apache.jasper.compil

[appengine-java] javax.net.ssl.HttpsURLConnection

2010-04-01 Thread jcjones1515
This doc: http://code.google.com/appengine/docs/java/urlfetch/usingjavanet.html#Using_HttpURLConnection seems to indicate that using javax.net.ssl.HttpsURLConnection is acceptable, however it is not included in the JRE white list. When I try to use it I get the following: java.lang.NoClassDefFou

[appengine-java] Problem deploying the tutorial app

2010-04-01 Thread theBULLL
Hello, I am getting the following error and I cannot seem to figure out what is wrong. I would appreciate any insight. Here is what results in the Eclipse console. I have replace my app id number with MY_APP_ID. Compiling module com.mywebapp2.MyWebApp2 Compiling 6 permutations Compilin

[appengine-java] Re: Fwd: JSF 2.0 Netbeans and Google Appengine given error

2010-04-01 Thread KarthikR
Hi Can you take a look at http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-google-app-engine-sdk-1-2-6/ ? Regards On Mar 31, 2:14 am, Haroon Idrees wrote: > I attached simple hello world app for appengine sdk 1.3.2 and I alread > follow the instruction given at and add the def

[appengine-java] Re: How to register a custom ELResolver?

2010-04-01 Thread KarthikR
Hi Can you take a look at http://stackoverflow.com/questions/2551517/gae-j-unable-to-register-a-custom-elresolver and see if it helps? regards. On Mar 30, 10:05 am, Davide Angelocola wrote: > Hello, > > I've the following class: > >   public class WebAiatListener implements ServletContextListe

[appengine-java] Re: Fwd: JSF 2.0 Netbeans and Google Appengine given error

2010-04-01 Thread KarthikR
Hi This issue is discussed at http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-google-app-engine-sdk-1-2-6/ Regards On Mar 31, 2:14 am, Haroon Idrees wrote: > I attached simple hello world app for appengine sdk 1.3.2 and I alread > follow the instruction given at and add the de

[appengine-java] Re: makePersistentAll and updates

2010-04-01 Thread gemma
Thankyou very much, that's a much clearer explanation than in the JDO API. Much appreciated! Thanks Gemma On Apr 1, 4:52 pm, datanucleus wrote: > > I'd like to avoid having to lookup the object using the Key and then > > updating it, and was wondering if I could get away with using the > > make

[appengine-java] Re: makePersistentAll and updates

2010-04-01 Thread datanucleus
> I'd like to avoid having to lookup the object using the Key and then > updating it, and was wondering if I could get away with using the > makePersistentAll method as a shortcut.  The docs seem to imply I > could do this if the object was detached, but not sure how it would > behave if it was a r

[appengine-java] Toronto Area Developers - Java User Group (JUG) meeting

2010-04-01 Thread Steve Pritchard
The Toronto Java User Group (JUG) will be holding a meeting this coming Tuesday, April 6th at 7:00pm. The topic will be the Google App Engine and the Browser Based Builder. Details of the JUG meeting are at http://www.torontojug.org/meetings/201004.html The presentation will focus on my positive

[appengine-java] makePersistentAll and updates

2010-04-01 Thread gemma
Hello chaps, I've been sifting through the JDO docs to try to understand what behaviour I will see if I use makePersistentAll with a bunch of PersistenceCapable objects when some may already exist in the datastore (with the objects in the Collection for makePersistentAll having the same Key as in

Re: [appengine-java] Like query in google datastore

2010-04-01 Thread Gal Dolber
There is no easy way to do that. Problems: 1. Appengine do not support fulltext queries 2. Appengine do not support OR Solutions: 1. Make your own fulltext search implementation 2. Use IN operand 2010/4/1 Manjoor > I have a simple java class with following attributes > > Candidat

[appengine-java] How to exclude requests to /stats when viewing appstats?

2010-04-01 Thread Ice13ill
I'm trying to use appstats to view the requests to my app. But i can't exclude the requests to /stats/ as stated in the dev guide: "This installs the filter for all URLs, with the of /*. (This includes the Appstats web-based administration interface discussed in the next section, which you may pr

[appengine-java] Java Mail Service

2010-04-01 Thread moissinac
Hello I have servlet with a code copied from the documentation for sending an email with the mail service Each time I call the service, I see the trace in the quota count like this: Mail Mail API Calls 0% 0% 5 of 7000 Okay Recipients Emailed 0% 0% 5 of 2000 Ok

[appengine-java] Like query in google datastore

2010-04-01 Thread Manjoor
I have a simple java class with following attributes Candidates.java name skills education currentEmployer I need app-engine java equevalent code of the following SQL query Select * from Candidates where (name like '%searchcontent%') OR (skills like '%searchcontent%') OR (education like '%sea

[appengine-java] Re: java.lang.ClassNotFoundException: com.google.appengine.tools.appstats.AppstatsFilter

2010-04-01 Thread Prashant Gupta
someone please help me out following is the code I added to my web.xml file : appstats com.google.appengine.tools.appstats.AppstatsFilter logMessage Appstats available: /appstats/details?time={ID} appstats /*

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread John Patterson
On 1 Apr 2010, at 19:02, Duong BaTien wrote: Hi: Iterable foo = ofy.query().ancestor(yourobject); This is the required pattern shown in Google IO scalable application for GAE. If you are talking about the "million fan out" problem in Bret Slatkins talk that was also a typed query.

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Duong BaTien
Hi: On Wed, 2010-03-31 at 22:51 -0700, Jeff Schnitzer wrote: > On Wed, Mar 31, 2010 at 6:41 PM, jd wrote: > > > > On Apr 1, 3:14 am, Jeff Schnitzer wrote: > >> What does Twig do when someone issues a type-less query? > >> > >> datastore.find().addFilter("color", EQUAL, "green"). returnResultsNow

[appengine-java] com.google.appengine.api.datastore.DatastoreServiceConfig; not resolved by Eclipse with GAE plugin v1.3.2

2010-04-01 Thread Didier Durand
Hello, I need to use com.google.appengine.api.datastore.DatastoreConfig -> works fine under Eclipse The Javadoc at http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/DatastoreConfig.html recommends to switch to com.google.appengine.api.datastore.DatastoreServic

[appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Jeff Schnitzer
This is a genuine, heartfelt plea: The Builder pattern (DatastoreServiceConfig, FetchOptions) makes code extra annoying when layering an API on top of the low-level API. Let's say you are writing some code by hand that creates a FetchOptions with a limit and an offset: FetchOptions opts = FetchO

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread John Patterson
On 1 Apr 2010, at 16:26, Jeff Schnitzer wrote: On Thu, Apr 1, 2010 at 2:19 AM, John Patterson wrote: From a quick browse of the Objectify source code it looks to me like the default is to use Class.getSimpleName() for the kind name which will also break on renaming and doesn't even hav

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread John Patterson
On 1 Apr 2010, at 16:20, Jeff Schnitzer wrote: 1) I vehemently disagree that fully-qualified java class names should show up in the datastore. It's one of those things that nobody notices at the beginning and then becomes cruft that is difficult to change sometime later. Ask any DBA what they

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Jeff Schnitzer
On Thu, Apr 1, 2010 at 2:19 AM, John Patterson wrote: > > From a quick browse of the Objectify source code it looks to me like the > default is to use Class.getSimpleName() for the kind name which will also > break on renaming and doesn't even have the advantage of working > out-of-the-box with no

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Jeff Schnitzer
On Thu, Apr 1, 2010 at 1:57 AM, John Patterson wrote: > > You are making a classic premature optimization mistake. > [...] > The only String value that can uniquely identify a class with no > "registration" is its fully qualified type name.  I see no problem using > that kind name as a sensible de

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread John Patterson
On 1 Apr 2010, at 14:58, Jeff Schnitzer wrote: If you go with #2, you've just created a framework that will break your datastore when you rename your Java objects. I'll assume nobody thinks this is actually a good idea. From a quick browse of the Objectify source code it looks to me like th

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread John Patterson
On 1 Apr 2010, at 15:04, Jeff Schnitzer wrote: or you've somehow registered a mapping (typically from Kind, but it could be any synthetic field) to the java class ahead of time. This means that You are making a classic premature optimization mistake. Twig is built on the principal that it s

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Jeff Schnitzer
On Thu, Apr 1, 2010 at 12:45 AM, John Patterson wrote: > > All queries that are possible with the low-level datastore are possible with > Twig because there are low-level to type-safe "bridge" methods.  So you can > simply do a typeless low-level ancestor query and then get Twig to convert > the r

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Jeff Schnitzer
Let's take a step back for a moment. Fundamentally, all these API layers do is map back and forth between untyped datastore Entity objects and Java classes. Let's say the user runs a query that returns an Entity. Somehow the framework must figure out what Java class to instantiate and populate w

[appengine-java] java.lang.ClassNotFoundException: com.google.appengine.tools.appstats.AppstatsFilter

2010-04-01 Thread Prashant Gupta
1. Hi, I am getting following error while trying to setup Appstatsfor my app. Please help me to find out where I am wrong. I am using SDK v1.3.2. 04-01 12:40AM 46.303 EXCEPTION java.lang.ClassNotFoundException:

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread John Patterson
On 1 Apr 2010, at 12:51, Jeff Schnitzer wrote: In other words, Twig cannot perform the simple query: Iterable foo = ofy.query().ancestor(yourobject); All queries that are possible with the low-level datastore are possible with Twig because there are low-level to type-safe "bridge" methods

[appengine-java] Re: Discussion on will-it-play-in-app-engine

2010-04-01 Thread Trung
I tried myfaces 2.0.0 beta 3 successfully. All you need is myfaces jars, EL implementation jars (I used EL jars from Tomcat) and a context parameter org.apache.myfaces.config.annotation.LifecycleProvider org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider I a

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Yasuo Higa
Hi Jeff, > In other words, Twig cannot perform the simple query: > > Iterable foo = ofy.query().ancestor(yourobject); > > If you ever want to support something like this, you will need a > registration process. > > If you ever want to support true polymorphic queries, you will need a > registratio