On Nov 4, 6:00 am, "Ikai Lan (Google)" <[email protected]> wrote: > I'm confused ... an Object[] array? This is bad for a ton of reasons. > Calling put() 4000 times in a single request is just bad for a lot of > reasons. > > I'm not sure I understand what problem you are trying to solve. Can you > explain so we can help you put together a better solution? >
For representational simplicity, I wrote as Object[] array. The core issue is that in a single request, equivalently in a single transaction, can i call put() for 4000 times? The corresponding use case is that the user creates about 4000 objects ( in gwt ), about 100 bytes each. These 4000 objects are to be persisted in a single transaction. There are cross references among these 4000 objects so I am planting the key s in the holder objects. It is uncomfortable to use batch put() for this reason. To repeat my question, in a single transaction can I call put() for 4000 times? If not, I will begin to look for alternative implementations. J.Ganesan > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > plus.ikailan.com | twitter.com/ikai > > On Thu, Nov 3, 2011 at 8:13 AM, J.Ganesan <[email protected]>wrote: > > > > > > > > > I have about 4000 objects to be persisted in a single request. These > > 4000 objects involve 5 entities, all in single entity group. Please > > clarify whether the following code violates the number of writes per > > second ( which is 5, I think) rule. > > > public void save( Object[] savableObjectArray) // > > savableObjectArray.length = 4000 > > { > > // begin transaction > > > for( Object object : savableObjectArray ) > > { > > // depending on the type of object, pick an existing entity. > > // There are only 5 entities. > > // set properties in the existing entity. > > > datastoreService_.put( oneOfTheFiveExistingEntity ) ; // called > > 4000 times per request. > > > // for a reason not apparent in the code, batch put is not > > possible. > > } > > > // end transaction > > } > > > No indexing is to be done. I am not worried about performance. My > > concern is only about persistence. > > > J.Ganesan > > > -- > > 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 > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
