Re: [google-appengine] Re: Upload works locally but not on server.

2011-08-29 Thread Yasuo Higa
Hi Brian, There is a blobstore sample using slim3: http://slim3demo.appspot.com/blobstore/ Yasuo Higa On Fri, Aug 26, 2011 at 9:37 PM, Brian brian...@gmail.com wrote: Adam -- How were you able to modify the post header?  I'm experiencing the same issue and am using the slim3 mvc framework

Re: [appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-09 Thread Yasuo Higa
It's *NO* bogus benchmark because the sample iterates the results. http://code.google.com/p/slim3/source/browse/trunk/slim3demo/src/slim3/demo/controller/performance/GetLLController.java Yasuo Higa The code linked from http://slim3demo.appspot.com/performance/ has just gone back to calling

Re: [google-appengine] Re: Is the native API really so much faster than JDO and slim3?

2011-06-09 Thread Yasuo Higa
, (System.currentTimeMillis() - start) / COUNT); return redirect(basePath); } http://slim3demo.appspot.com/performance/ Slim3 is slightly faster than frameworks that use reflection, but the difference is small. Yasuo Higa On Fri, Jun 10, 2011 at 2:29 AM, Alfred Fuller arfuller+appeng...@google.com wrote

Re: [appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Yasuo Higa
It is not bogus. LazyList#size() fetches all data as follows: public int size() { resolveAllData(); return results.size(); } Yasuo Higa On Wed, Jun 8, 2011 at 11:32 PM, Dennis Peterson dennisbpeter...@gmail.com wrote: It's not my benchmark, it's Slim3's :) ...but you're right

Re: [appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Yasuo Higa
Hi Dennis, You can see all sources. http://slim3demo.appspot.com/performance/ Java runtime reflections are very very slow. If you don't think so, please try it by you. Yasuo Higa On Thu, Jun 9, 2011 at 12:00 AM, Dennis Peterson dennisbpeter...@gmail.com wrote: Apologies, no offense meant. My

Re: [appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Yasuo Higa
Hi Dennis, The following document will help you about global transactions: http://sites.google.com/site/slim3appengine/#gtx Yasuo Higa On Thu, Jun 9, 2011 at 12:33 AM, Dennis Peterson dennisbpeter...@gmail.com wrote: Those multi-entity transactions are definitely interesting to me. There's

Re: [appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Yasuo Higa
(); } for (BarObjectify bar : service.getBarListUsingObjectify()) { bar.getKey(); bar.getSortValue(); } for (BarJDO bar : service.getBarListUsingJDO()) { bar.getKey(); bar.getSortValue(); } LL API is much slower than before. http://slim3demo.appspot.com/performance/ Yasuo Higa On Thu, Jun

Re: [appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Yasuo Higa
fixed the samples to call list.size(). http://slim3demo.appspot.com/performance/ As a result, LL is as fast as slim3 (^^; Yasuo Higa On Thu, Jun 9, 2011 at 10:17 AM, Jeff Schnitzer j...@infohazard.org wrote: Thank you for fixing the benchmark. I am very curious.  According to this new

Re: [google-appengine] Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Yasuo Higa
No. Slim3 loads all data eagerly. Yasuo Higa On Wednesday, June 8, 2011, Jeff Schnitzer j...@infohazard.org wrote: Ok, I have figured out what's going on.  To put it gently, the benchmark is bogus. The benchmark code for the Low-Level API just gets the size() of the collection and doesn't

Re: [google-appengine] Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Yasuo Higa
No. Slim3 loads all data eagerly. Yasuo Higa On Wednesday, June 8, 2011, Jeff Schnitzer j...@infohazard.org wrote: Ok, I have figured out what's going on.  To put it gently, the benchmark is bogus. The benchmark code for the Low-Level API just gets the size() of the collection and doesn't

Re: [google-appengine] Re: Is the native API really so much faster than JDO and slim3?

2011-06-07 Thread Yasuo Higa
as the source code when compiling. so the speed of Slim3 is almost equal to LL API. Yasuo Higa On Tue, Jun 7, 2011 at 8:27 PM, Anders blabl...@gmail.com wrote: I started by looking at JDO but after finding some info about potential performance loss I wrote a simple wrapper abstract base class

Re: [google-appengine] Re: Is the native API really so much faster than JDO and slim3?

2011-06-07 Thread Yasuo Higa
are very very slow on production server, so slim3 creates the mapping logic between a model and an entity as the source code when compiling. Yasuo Higa On Wed, Jun 8, 2011 at 10:18 AM, Ikai Lan (Google) ika...@google.com wrote: I doubt the low-level API is significantly faster than JDO (have

Re: [appengine-java] How do I run my Junit test suite on the server?

2011-03-31 Thread Yasuo Higa
Hi Elio, See Kotori Web JUnit Runner: http://code.google.com/p/ktrwjr/ On Fri, Apr 1, 2011 at 12:28 AM, Eliot Stock 1...@eliotstock.com wrote: Is there a standard way to do this or do I have to write a servlet or something? If I have to write something, how am I going to get the log output

Re: [appengine-java] Can I set GAE's dev_appserver to automatically reload context when I change .class files?

2011-03-10 Thread Yasuo Higa
Hi Luca, Slim3 supports HOT reloading. https://sites.google.com/site/slim3appengine/ Yasuo Higa On Thu, Mar 10, 2011 at 7:58 PM, Luca Matteis lmatt...@gmail.com wrote: Hello everybody! I'm using Google AppEngine with their built in web server. My development goes about in a simple way: I

Re: [appengine-java] What was your Slim3 Datastore API experience like?

2011-01-23 Thread Yasuo Higa
commit, it will be rolled forward by task queue. - Is it using undocumented Google APIs? No. Yasuo Higa -- 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

Re: [google-appengine] AppEngine entity modeling - minimizing entity groups + achieving atomic cascading

2010-12-03 Thread Yasuo Higa
is a java framework, supports global transactions between multiple entity groups. http://sites.google.com/site/slim3appengine/#gtx You may worry about the overhead of global transactions. Don't worry. It is not very expensive. The demonstration is as follows: http://slim3demo.appspot.com/gtx/ Yasuo Higa

Re: [appengine-java] about【PreparedQuery.countEnti ties()】 problem, how can I get the total count of a specif ic Query?

2010-11-08 Thread Yasuo Higa
Hi liqwei, You can get the total count of a specific query as follows: Query query = new Query(Book.getKind()); PreparedQuery pq = ds.prepare(query); FetchOptions option = FetchOptions.Builder.withLimit(Integer.MAX_VALUE); out.println(pq.countEntities(option)); Hope this helps, Yasuo Higa

Re: [appengine-java] Re: countEntities() does not return more than 1000

2010-09-02 Thread Yasuo Higa
I filed an issue: http://code.google.com/p/googleappengine/issues/detail?id=3671 Yasuo Higa On Thu, Aug 26, 2010 at 2:18 AM, tomkarren tkar...@gmail.com wrote: Agreed.  We have an example for a fix that does not correspond to the 1.3.6 low level API spec.  Could you please elaborate? On Aug

[appengine-java] countEntities() does not return more than 1000

2010-08-18 Thread Yasuo Higa
. Do I misunderstand datastore count()? Yasuo Higa -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google

Re: [appengine-java] Automatic restart of development server in Eclipse

2010-07-06 Thread Yasuo Higa
Hi jesbox, Slim3 supports HOT reloading. HOT reloading means a new version of a class is automatically reloaded on the fly. The site of Slim3 is here: http://slim3.org Hope this helps, Yasuo Higa On Sun, Jul 4, 2010 at 1:40 PM, jesbox jesb...@gmail.com wrote: Hi! I have read that it should

Re: [appengine-java] java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction

2010-05-19 Thread Yasuo Higa
://sites.google.com/site/slim3appengine/slim3-datastore/transactions/global-transaction You may worry about the overhead of global transactions. Don't worry. It is not very expensive. We prepare the demonstration: http://slim3demo.appspot.com/gtx/ Hope this helps, Yasuo Higa This should help: http

[appengine-java] Testing on both production and development servers

2010-05-15 Thread Yasuo Higa
If you use org.slim3.memcache.Memcache, you should upgrade to the version 1.0.4, because MemcacheService#setNamespace() causes NullPointerException on the current production server. Thanks, Yasuo Higa -- You received this message because you are subscribed to the Google Groups Google App Engine

Re: [appengine-java] [JDO Paging] Getting a cursor BEFORE the end of results

2010-05-06 Thread Yasuo Higa
-datastore/queries-and-indexes/query-cursors The following code may help you, see 236 lines(ModelQuery#asQueryResultList): http://code.google.com/p/slim3/source/browse/trunk/slim3/src/main/java/org/slim3/datastore/ModelQuery.java Hope this helps, Yasuo Higa -- You received this message because you

Re: [appengine-java] Can't decide: JDO, Twig-Persist or Objectify?

2010-04-24 Thread Yasuo Higa
reloading, when you change the source code, you can see the changed result on your browser without restarting web application. Yasuo Higa On Sun, Apr 25, 2010 at 4:04 AM, jbdhl jbirksd...@gmail.com wrote: Hi I really can't decide which datastore abstraction to use for my app. Any help deciding

Re: [appengine-java] Re: Is it possible to have collections of embedded objects?

2010-04-08 Thread Yasuo Higa
as follows: @Attribute(lob = true) private ListEmbeddedChild Children; See http://sites.google.com/site/slim3appengine/slim3-datastore/defining-data-classes/serializable-objects Yasuo Higa -- You received this message because you are subscribed to the Google Groups Google App Engine for Java

Re: [appengine-java] Re: Is it possible to have collections of embedded objects?

2010-04-08 Thread Yasuo Higa
Hi John, thanks for your clarification. Current Slim3 does not support embedding instances like Twig/Objectify. Yasuo Higa Serializing is a bit different to embedding instances because the Blob is opaque and not able to be queried.  If you use @Embed in Twig or Objectify you can query

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

2010-04-01 Thread Yasuo Higa
-model Yasuo Higa -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr

Re: [appengine-java] Objectify - Twig - SimpleDS articles

2010-03-30 Thread Yasuo Higa
Hi Andreas, slim3 is more than just a datastore framework) You can use Slim3 as just a datastore framework. Please see http://sites.google.com/site/slim3appengine/slim3-datastore/using-slim3-datastore. Thanks, Yasuo Higa -- You received this message because you are subscribed to the Google

Re: [appengine-java] Re: Slim3 1.0.0 Released

2010-03-24 Thread Yasuo Higa
) { keys.add(child.getParentRef().getKey()); } Batch get for parents: ListParent parents = Datastore.get(Parent.class, keys); The document of relationships is here: http://sites.google.com/site/slim3appengine/slim3-datastore/relationships Hope this helps, Yasuo Higa -- You received this message

[appengine-java] Slim3 1.0.0 Released

2010-03-18 Thread Yasuo Higa
information about Slim3 here: http://slim3.org Release Notes: http://sites.google.com/site/slim3appengine/release-notes Download: http://slim3.googlecode.com/files/slim3-blank-1.0.0.zip Thanks, Yasuo Higa -- You received this message because you are subscribed to the Google Groups Google App

[appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Yasuo Higa
Transactions * Faster than JDO/JPA * Fast spin-up * HOT reloading * Type safe query You can find more information about Slim3 here: http://slim3.org Thanks, Yasuo Higa -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post

Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Yasuo Higa
/browse#svn/trunk/slim3/src/main/java/org/slim3/tester Thanks, Yasuo Higa -- 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-j...@googlegroups.com. To unsubscribe from this group

Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Yasuo Higa
. Thanks, Yasuo Higa -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr

Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Yasuo Higa
prevents the lock from being deleted? If the transaction is not committed for same reasons, the locks will be released 30 seconds later. Yasuo Higa -- 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

Re: [appengine-java] Re: Set the Timezone

2009-12-25 Thread Yasuo Higa
as follows: @Override public void init() throws ServletException { TimeZone.setDefault(TimeZone.getTimeZone(GMT-8:00)); } When I reply something, I always try it. Hope this helps, Yasuo Higa -- You received this message because you are subscribed to the Google Groups Google App Engine

Re: [appengine-java] Re: Set the Timezone

2009-12-24 Thread Yasuo Higa
-param You can change GMT-8:00 as you want. Hope this helps, Yasuo Higa -- 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-j...@googlegroups.com. To unsubscribe from this group, send

Re: [appengine-java] Re: Is there a recommended way to differentiate between production and dev GAE environments?

2009-12-21 Thread Yasuo Higa
://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes Hope this helps, Yasuo Higa -- 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-j...@googlegroups.com. To unsubscribe from this group

Re: [appengine-java] An entity group that does not have a root entity supports transaction. How does it work?

2009-12-10 Thread Yasuo Higa
the covers. Here's a pretty recent article about how the datastore works: http://code.google.com/appengine/articles/storage_breakdown.html Not a lot in there about transactions, though, but that would be something we would add to the series. I am looking forward to the article. Thanks, Yasuo Higa

Re: [appengine-java] An entity group that does not have a root entity supports transaction. How does it work?

2009-12-09 Thread Yasuo Higa
Hi Ikai, On Thu, Dec 10, 2009 at 2:49 AM, Ikai L (Google) ika...@google.com wrote: Which timestamp are you referring to? I mean timestamp as committed timestamp explained by the following document(50p): http://snarfed.org/space/datastore_talk.html Thanks, Yasuo Higa On Tue, Dec 8, 2009 at 6

Re: [appengine-java] An entity group that does not have a root entity supports transaction. How does it work?

2009-12-08 Thread Yasuo Higa
descendants, then removing the root entity. Transactions are possible for entities in the same entity group. Do you mean that a root key has time-stamp for transaction or an entity group itself is an entity? I would like to know where time-stamp for transaction is stored. Thanks, Yasuo Higa

[appengine-java] Re: Query by grandparent

2009-11-10 Thread Yasuo Higa
, Yasuo Higa --~--~-~--~~~---~--~~ 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

[appengine-java] Re: PreparedQuery.countEntities() clarifications

2009-10-30 Thread Yasuo Higa
); query.setKeysOnly(); query.addFilter(...); int count = ds.prepare(query).asList(FetchOptions.Builder.withOffset(0)).size(); The first query is faster than the second one. Hope this helps, Yasuo Higa --~--~-~--~~~---~--~~ You received this message because you are subscribed

[appengine-java] Re: PreparedQuery.countEntities() clarifications

2009-10-30 Thread Yasuo Higa
);                PreparedQuery preparedQuery = datastore.prepare(query);                int result = preparedQuery.asList(fetchOptions).size();        logger.info(Integer.toString(result));                return result;        } Hope this helps, Yasuo Higa

[appengine-java] Re: PreparedQuery.countEntities() clarifications

2009-10-30 Thread Yasuo Higa
Hi Pion, It still returns 6218 entities while The Admin Console - Datastore - Statistic shows 5029. It is unusual. I think the admin console uses Statistics API. The Statistic data may be wrong or ... Could you try an another sample? Thanks, Yasuo Higa

[appengine-java] Re: Best way to update 25 entities

2009-10-27 Thread Yasuo Higa
efficient than a single put. JDO: PersistenceManager#makePersistenceAll(Collection); Low level API: DatastoreService#put(IterableEntity) Hope this helps, Yasuo Higa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[appengine-java] Re: Bulk delete behind RPC

2009-10-24 Thread Yasuo Higa
().getTime() - starttime = 1) { ListKey keys = new ArrayListKey(); for (Entity entity : ds.prepare(query).asList(FetchOptions.Builder.withLimit(500))) { keys.add(entity.getKey()); } ds.delete(keys); } The points are setKeysOnly() and batch delete. Hope this helps, Yasuo Higa

[appengine-java] Re: using contains(Key) in JDO query

2009-10-23 Thread Yasuo Higa
) pm.getObjectsById(ids); Thanks, Yasuo Higa --~--~-~--~~~---~--~~ 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

[appengine-java] Re: Tutorial for datastore with low-level api?

2009-10-22 Thread Yasuo Higa
in a batch get. If you specify more than 1000 keys in a batch get, you will encounter the following exception: java.lang.IllegalArgumentException: cannot get more than 1000 keys in a single call Hope this helps, Yasuo Higa --~--~-~--~~~---~--~~ You received this message

[appengine-java] Re: Casting Text to String exception

2009-10-22 Thread Yasuo Higa
to String using Text#getValue() as follows: Text text = new Text(aaa); assertEquals(aaa, text.getValue()); Hope this helps, Yasuo Higa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine for Java

[appengine-java] Re: using contains(Key) in JDO query

2009-10-22 Thread Yasuo Higa
a filter of multiple keys as follows: PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(Master.class); // key is a name of a primary key field. query.setFilter(key == :keyList); ListMaster list = (ListMaster) query.execute(keyList); Hope this helps, Yasuo Higa

[appengine-java] Re: using contains(Key) in JDO query

2009-10-21 Thread Yasuo Higa
() + ') PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(Master.class); query.setFilter(detailKeySet.contains(:key)); ListMaster list = (ListMaster) query.execute(detail.getKey()); Hope this helps, Yasuo Higa --~--~-~--~~~---~--~~ You

[appengine-java] Re: JDO startsWith for Japanese does not work on production server

2009-09-16 Thread Yasuo Higa
Thanks for your suggestion, Jason. I filed it. http://code.google.com/p/googleappengine/issues/detail?id=2135 Thanks, Yasuo Higa On Thu, Sep 17, 2009 at 6:56 AM, Jason (Google) apija...@google.com wrote: Thanks for the extra digging, Yasuo. Feel free to file a bug in the issue tracker

[appengine-java] Re: JDO startsWith for Japanese does not work on production server

2009-09-14 Thread Yasuo Higa
: query.declareParameters(String content); I use implicit parameter as :content. Thanks, Yasuo Higa - Jason On Sat, Sep 12, 2009 at 10:32 PM, Yasuo Higa higaya...@gmail.com wrote: Hi all, JDO startsWith for Japanese works fine on development server, but it does not work on production

[appengine-java] JDO startsWith for Japanese does not work on production server

2009-09-12 Thread Yasuo Higa
(vendorName = datanucleus, key = gae.encoded-pk, value = true) private String key; @Persistent private String title; @Persistent private String content; ... } My jsp's encoding is UTF-8. Is there a workaround? Thanks, Yasuo Higa