[appengine-java] Re: Index building issue
Hi, Time is very much depending on the number of entities you already have in the DS for the index you have to build. It may take hours if your table is already huge. regards didier On Dec 30, 6:11 am, Vik vik@gmail.com wrote: Hie Today we deployed a new version of app which includes some newly added entity. Now, after deploying to app engine the app is throwing exception index building and not ready to serve (not exact words). So, in the datastore indexes section I can see the status as PocVacationSchedule pocId ▲ , endDate ▲ *Building* Queued: 1 Running: 0 Completed: 1 Total: 2 This is in the same status from last half an hour. Any idea how time will it take? There is no data in the entity at this moment. Thankx and Regards Vik Founderwww.sakshum.comwww.sakshum.blogspot.com -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Lightweight Best performing MVC framework - Recommendation
Stripes ? Thanks, Ic On Dec 30, 12:02 am, Ikai Lan (Google) ikai.l+gro...@google.com wrote: Um ... those are like the opposite of lightweight. Here are some I like: Play Framework: probably the most underrated Java framework I've ever seehttp://www.playframework.org/ Slim3: built for App Engine. Cons: kind of needs deep Eclipse integrationhttp://sites.google.com/site/slim3appengine/ There are more. I'll post in a bit. What are other frameworks everyone else here likes? -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger:http://googleappengine.blogspot.com Reddit:http://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engineOn Wed, Dec 29, 2010 at 10:49 AM, Nasif Noorudeen nas...@gmail.com wrote: spring jsf On 12/29/10, Sree sreeju...@gmail.com wrote: Hello, I am new to Java and App Engine, and coming from ASP.NET C# and Windows Azure world. I am looking for a lightweight best performing java based MVC framework. I would like to migrate my ASP.NET MVC project to App Engine (Java). It would be great if you can share your experience. I am open to Python as well, but learning Java is faster than Python, since I am good at C#. Thanks in Advance. Regards Sree -- 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...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] How to write JPA query that...
@Entity class A { ListB bs; } @Entity class B { C c; } @Entity class C { int id; } A has a list of Bs. i want to create a JPA query to fullfill below: 1. get all As, 2. and the A has one or more B, 3. and the B must has a C 4. and the C's id == the appoint id. public static ListA findAsByCid(int cid) { } how to write the JPQL query? thanks. -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How to write JPA query that...
now i managed to get the answer. thx anyway -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Lightweight Best performing MVC framework - Recommendation
I like, VRaptor, http://vraptor.caelum.com.br/en/ Icarus wrote: Stripes ? Thanks, Ic On Dec 30, 12:02 am, Ikai Lan (Google) ikai.l+gro...@google.com wrote: Um ... those are like the opposite of lightweight. Here are some I like: Play Framework: probably the most underrated Java framework I've ever seehttp://www.playframework.org/ Slim3: built for App Engine. Cons: kind of needs deep Eclipse integrationhttp://sites.google.com/site/slim3appengine/ There are more. I'll post in a bit. What are other frameworks everyone else here likes? -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger:http://googleappengine.blogspot.com Reddit:http://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engineOn Wed, Dec 29, 2010 at 10:49 AM, Nasif Noorudeen nas...@gmail.com wrote: spring jsf On 12/29/10, Sree sreeju...@gmail.com wrote: Hello, I am new to Java and App Engine, and coming from ASP.NET C# and Windows Azure world. I am looking for a lightweight best performing java based MVC framework. I would like to migrate my ASP.NET MVC project to App Engine (Java). It would be great if you can share your experience. I am open to Python as well, but learning Java is faster than Python, since I am good at C#. Thanks in Advance. Regards Sree -- 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...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Understanding gwt-dispatch and Singletons/member variables
I switched to local variables and now it works perfectly. On 23 Dez., 10:05, l.denardo lorenzo.dena...@gmail.com wrote: I don't fully understand your problem (maybe a few lines of code will help). Anyway: *Member variables in action handlers are usually created as they should, empty, for my experience *Memcache is shared across all application instances, so if you populate your map using the memcache value and then check for it, your map will always contain the same items once cache is populated. i.e. what is expected is something like private MapString, Serializable cacheMap = new HashMapString, Serializable(); //map will be empty cacheMap.put( memcacheServiceInstance.get(key) ); //cacheMap will be populated always with the same value, if provided key results in a memcache hit Regards Lorenzo On Dec 22, 12:55 pm, Sky skysoftwaredes...@googlemail.com wrote: Hi all, I use gwt-dispatch in a project and now I have a question concerning the gwt-dispatch framework and member variables in ActionHandlers. I use guice on server side and bind the ActionHandlers as follow: bindHandler(GetXYHandler.class); - this is per definition no singleton! In GetXYHandler I have a member variable, which stores the data retrieved from Googles MemCacheService: private MapString, Serializable cacheMap = new HashMapString, Serializable(); When making a server request in the execute method of GetXYHandler the cacheMap is filled with objects, when a cache hit in memcache occurs - the cacheMap member variable is not empty anymore! My understanding of member variables (in example cacheMap) is, that they should be created new in each serverCall if they are not static. In my case the cacheMap should be empty each time when the execute method is called. In my local tests the behaviour is somewhat different. When I test it in debug modus locally (different user calls), the cacheMap stays always filled like a static variable. Is this the normal behaviour of member variables of Actionhandlers? My understanding would say this is very curious, because its not a singleton? If this is normal behaviour, no member variables could be used, because they would not be synchronized... Thanks for your help! -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] saving password option in deployer
Hie Is it possible to have the option of saving password for the id used to deploy app to the app engine via eclipse? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: passing multiple parameters to JDOQL
query.declareParameters(Long bind_pocId, Date bind_startDate, Date bind_endDate); This is correct. However, I personally prefer the shorter form, where instead of using filter column == alias along with query.declareParameters(Type alias) you just use filter column == :alias (note the colon before the alias name). Your query can be rewritten as follows: Query query = pm.newQuery(PocVacationSchedule.class); query.setFilter(pocId == :pi startDate == :sd endDate == :ed); ListPocVacationSchedule rulesList = (ListPocVacationSchedule) query.execute(pocId, startFrom, endFrom); -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Concurrency issue when dealing with datastore
I had to strongly synchronize my app using Java options (locka, synchrnized objects, and so on...). I have to warn you that all this synchronization will be in vain once your application grows beyond 1 JVM. Java keyword synchronized is only effective within a single instance of JVM. That is not to say that even with 1 JVM your application may lose a lot of performance if you are synchronizing on static methods or singleton objects, e.g. the datastore. I think it is quite unbelievable that a huge giant like BigTable is so weak in concurrency issues... BigTable gives you a lot of well-documented options to deal with simultaneous access to data. A good place to start is http://code.google.com/appengine/docs/java/datastore/transactions.html. In your case, unless you really have to transact on all entities processed by the servlet, I would recommend that you break your task into several sub-tasks each limited to a single entity group. Perhaps my approach is geared from my experience in relational DBs, but I'm quite puzzeld... Sounds like that might be the case. When working with BigTable, always keep in mind that two entities (called table rows in RDBMS) do not necessarily end up on the same server node. This is good, because it allows BigTable to distribute the load across multiple hard drives. However, when this happens you no longer are able to transact on these entities. Entity groups tell BigTable that two or more related entities must be stored in the database in such a way that a transaction is possible. Unfortunately, you immediately lose scalability within the entity group (thus the recommendation to keep them small). Relational DBs always make that sacrifice by default and put all table rows on the same hard drive. This makes it easy to transact on arbitrary entities. However, you have to partition your database manually to scale. Plus, you cannot transact across partitions, so even with a RDBMS you still have the same limitation. -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Lightweight Best performing MVC framework - Recommendation
http://code.google.com/p/litemvc/ Before you read on, a disclaimer: I am biased as I am one of the commiters to this project - I have used litemvc with a fairly complex appengine application - Really easy to integrate with Guice and Freemarker - Follows Guice configuration philosophy, namely: * No XML * Java-based configuration, e.g.: map(/, IndexHandler.class).templateResult(OK, /index.jsp); - Follows convention-over-configuration for handlers: * Handlers are POJOs * No interfaces and no annotations * Handler method names == HTTP method names, e.g. get(), post() * URL regex groups are mapped to method parameters, e.g. map(/user/ (\\d+), ...) will pass group(1) to get(String userId) * Automatic injection of standard method parameters, such as HttpServetRequest and HttpServletResponse Cheers, Yegor -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: persistent and scalable global atomic counter: not possible with GAE?
MG, Have you considered using Key.getId() method to implement global atomic counter in your application? GAE build in functionality for automatically unique IDs Key.getId() method will return unique long value. Also Keys are indexed, so if your application has to search within counters - indexed search will be efficient. On Wed, Dec 29, 2010 at 5:09 PM, Ikai Lan (Google) ikai.l+gro...@google.comikai.l%2bgro...@google.com wrote: Sweet. Remember that Memcache's INCR operation IS atomic. Waiting to see your solution ... as well as what you are using it for =). -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Wed, Dec 29, 2010 at 12:38 PM, MG michael.glas...@gmail.com wrote: Ikai, you are right - I don't need a counter, a sequence of unique and growing numbers will do. And I think I can make a scalable numeric sequence by combining a sharded counter with a memcache counter (and an occasional transaction). I'll post my solution when it's done. MG On Dec 29, 1:48 pm, Ikai Lan (Google) ikai.l+gro...@google.comikai.l%2bgro...@google.com wrote: What are you building? With distributed systems, it can be tricky to do some things. A single, scalable, atomic counter is an implementation for a solution, not a solution to a problem. There may be an alternate implementation that'll make your life easier but solve the problem at hand. -- Ikai Lan -- 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...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: How to completely erase the datastore of an app
Hi CRI, I ran into this as well, however, the Datastore viewer only allows someone to view a certain number of entries at a time. If you're app has thousands of saved entities, it can be time consuming to delete them all. I created a few simple tasks to do this for me. I make these both POSTs and only invoke them manually from my computer using RESTClient. NOTE: I'm using objectify. The first one loops through each class type and calls a servlet to delete each of that type: Class[] clazzes = {Operator.class, DDMessage.class, Event.class, DailyStatus.class, DocumentGroup.class, Document.class, StatusCapture.class}; for (Class clazz : clazzes) { Queue queue = QueueFactory.getQueue(trashcan); queue.add(withUrl(/deletealloftype) .param(kind, clazz.getName()) .method(POST)); } This servlet deletes each item one after another until it hits the deadline, and then it puts itself back in the task queue. try { DAO dao = new DAO(); Class clazz = Class.forName(request.getParameter(kind)); QueryObject query = dao.ofy().query(clazz); QueryResultIteratorObject iterator = query.iterator(); while (iterator.hasNext()) { Object o = iterator.next(); Objectify ofy = dao.fact().beginTransaction(); ofy.delete(o); ofy.getTxn().commit(); } } catch (DeadlineExceededException dee) { Queue queue = QueueFactory.getQueue(trashcan); queue.add(withUrl(/deletealloftype) .param(kind, request.getParameter(kind)) .method(POST)); } Hope this helps, MG On Dec 29, 2010, at 11:00 AM, Didier Durand wrote: Hi, You can very easily empty your datastore using the Datastore viewer of the admin console: you can select and delete all entities from the viewer screen. regards didier On Dec 29, 4:52 pm, cghersi cristiano.ghe...@gmail.com wrote: Hi, I've got an app on GAE with 4 versions, up to now. Until the 4th version I had an entity with an ancestor, so its keys were of the type (EntityID-AncestorID). In the 5th version I changed my design and now this entity hasn't got ancestor any more. Its keys are now simple long values. On my development server all is OK, given that my local datastore has been correctly updated. But with the online app I'm not able to remove the unused indexes and to create entities with the new long key. How may I completely erase my datastore online in order to rebuild it from scratch? Thank you very much!!! Bye CRI -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Prevent filesystem writes in development mode?
Hello, I was wondering if it's somehow possible to make the development server forbid file writes as the AppEngine servers do and emulate the AppEngine environment more closely? I'd like to know if one of my libraries uses temp files before deploying it to AppEngine. Thanks, Tobias -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Processing large xml-files with JAXB in app engine
I forgot to say that the cause for the DeadlineExceededException was log4j, which is unable to log very large strings (xml). Nevertheless is JAXB in my opinion not the first choice when parsing large xml files, because of the worse performance. On 28 Dez., 23:06, androidDeveloper stepmas...@googlemail.com wrote: I switched to javax.xml.parsers.SAXParser. The problem is now solved and its obviously faster. Performance JAXB (very large XML) ~ 4sec SAXParser with specific optimizations ~ 0,35secs Thanks for your help! On 26 Dez., 21:03, dreamer venugopal.vasire...@gmail.com wrote: If the requirement is pure parsing and not the Marshalling and u- Marshalling from xml to objects, you may be better off using Stax or SAX parsers. On Dec 26, 4:29 am, Didier Durand durand.did...@gmail.com wrote: Hi, I don't need xsd and don't parse very large xml but the code is simple to implement: so, unless you have a huge code base already working on JAXB, you can probably write directly with the classes provided by GAE It's hard for me to compare with jaxb that I didn't use that much. The issue I see with JAXB and other external jars is that you need to check their requirements againt the JRE list that I provided im my previous post: you are never sure that the next version will require a class unsupported by GAE. regards didier On Dec 26, 11:44 am, androidDeveloper stepmas...@googlemail.com wrote: Hi, This approach would be my next choice. but implementing and testing this should be more complex as with JAXB? On 26 Dez., 08:54, Didier Durand durand.did...@gmail.com wrote: Hi, I use the xml parsing classes that are natively part of GAE JDK itself : javax.xml.parsers.DocumentBuilder, javax.xml.parsers.DocumentBuilderFactory, org.w3c.dom.Document, etc. See bottom ofhttp://code.google.com/appengine/docs/java/jrewhitelist.html Aren't those enough for what you want to achieve ? regards didier On Dec 23, 6:54 pm, crllvnc crll...@gmail.com wrote: I've been using JAXB for xml file unmarshalling in an upload servlet. As far as I remember, the only size limit I have faced is related to the 30s timeout. Here are my imports : import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.bind.UnmarshalException; import javax.xml.bind.Unmarshaller; Maybe switching from JAXB2 to JAXB would solve (part of) your problems. Moreover, JAXB does not require any jar. -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] spring openid
in my log, i have this /j_spring_openid_security_check 6653cpu ms 73api cpu ms the request use high amount of cpu and may soon exceed it quota any way to optimize this? -- 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...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.