Re: [appengine-java] Global count down timer
Loreno, I don't know what you mean with "global count down timer", if you want to trigger an action upon the end of the global count down you can use the * cron* implementation. Can you explain what is the use that you want with this? In "low-level speaking", the only ways to share state across multiple instances / requests safety from concurrent access issues and given the cloud nature of it is use the datastore and memcache. *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Mon, Jun 27, 2011 at 12:48 PM, lorenoolive...@gmail.com < lorenoolive...@gmail.com> wrote: > Is it possible to implement a global count down timer in GAE/J? I would > like an unique timer to be shared among all the application instances. The > precision of the timer is seconds. > > Any idea? > > -- > 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 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-java@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] Global count down timer
Loreno, You'll not be able to start a thread inside the AppEngine, this is one of the limitations of the platform (fair enough I guess). And about use the memcache you might be careful because the AppEngine staff doesn't ensure that your data will be safe, it's said that you must never develop something using the memcache as the main mechanism to provide the wanted feature, use it as a performance improvement hook. You must keep in mind that AppEngine isn't just about develop and deploy in the cloud, there is a philosophy inherent to it, you should spent less computacional power as possible, why don't you use the cron service to check in certain intervals instead of keeping a thread running wasting computional power? *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Mon, Jun 27, 2011 at 3:13 PM, lorenoolive...@gmail.com < lorenoolive...@gmail.com> wrote: > Sounds promising... Should say that I didn't know about the backend service > so far. I'm starting with GAE, but with a non trivial problem, instead of a > hello world :-) > > Now I just need to be able to update my timers in a second by second > fashion (there are situations where I need to restart them). As far as I > could see, Thread.sleep( 1000 ) should not be a problem... > > Thanks for the advice Bruno! > > > On Mon, Jun 27, 2011 at 1:35 PM, Bruno Fuster wrote: > >> Right... >> >> I'm not sure but you could use the increment method from MemcacheService >> to atomically update this value each second from a single machine (backends) >> and read that from your dynamic instances constantly using ajax. >> >> >> http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService.html#increment(java.lang.Object, >> long) >> >> >> >> On Mon, Jun 27, 2011 at 1:08 PM, lorenoolive...@gmail.com < >> lorenoolive...@gmail.com> wrote: >> >>> I thought on this, but I think this works fine only if I have just one >>> running copy of my application. If I have two or more (because the workload >>> can be high), they can be out of sync regarding their local clocks. Thus, >>> requests that arrive at approximately the same time at the different >>> instances, can get a different value to the "second" variable... >>> >>> >>> >>> On Mon, Jun 27, 2011 at 12:58 PM, Bruno Fuster wrote: >>> >>>> You could just put this countdown date into your cache (or even a static >>>> property if it won't change) and calculate the seconds easily using >>>> jodatime >>>> >>>> int seconds = Seconds.secondsBetween(new DateTime(), >>>> cache.get(countdownDate)).getSeconds(); >>>> >>>> After that, use javascript intervals to recalculate the countdown while >>>> the user is at your page instead of consuming some services on your >>>> back-end. >>>> >>>> >>>> >>>> >>>> On Mon, Jun 27, 2011 at 12:48 PM, lorenoolive...@gmail.com < >>>> lorenoolive...@gmail.com> wrote: >>>> >>>>> Is it possible to implement a global count down timer in GAE/J? I would >>>>> like an unique timer to be shared among all the application instances. The >>>>> precision of the timer is seconds. >>>>> >>>>> Any idea? >>>>> >>>>> -- >>>>> 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 to >>>>> google-appengine-java+unsubscr...@googlegroups.com. >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/google-appengine-java?hl=en. >>>>> >>>> >>>> >>>> >>>> -- >>>> Bruno Fuster >>>> >>>> -- >>>> 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 to >>>> google-appengine-java+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>
Re: [appengine-java] Does anyone use sitebricks?
Drew, I'll re-use an e-mail that I've just sent to a person on the Guice mailing list, maybe it help you to start using it: The GWT servlets responsible for proccessing the requests incoming from the RPC framework are just servlets. You map them in the servlet module, using the same context name as the module created in GWT (e.g.: if your module call myModule your context will also be myModule) following this pattern: The mapping in the servlet module will be: // The servlet that you bind to the above url pattern must extends RemoteServiceServlet and implements the interface below The service interface that you create altogether with the async one must have the annotation @RemoteServiceRelativePath("") Once everything is "wired" you must add the servlet module to your injector and that's it, you'll be able to call this service from you GWT application and also use @Inject as any other class mapped to use DI. :) Here is an exemple of it: // This is the service interface that is created with the async version. This is a requirement of the RPC framework. @RemoteServiceRelativePath("prototype") public interface PrototypeService extends RemoteService { } // This is the GWT servlet that will proccess my RPC calls! @Singleton public class PrototypeServiceImpl extends RemoteServiceServlet implements PrototypeService { private Objectify objectify; @Inject public PrototypeServiceImpl(Objectify objectify) { this.objectify = objectify; } ... } // This is the servlet module that will map my url patterns to my servlets. Note that the web.xml will not be used to map // it anymore. If you want your servlets and filters to be DI-aware then you must map them here. public class ServletModule extends com.google.inject.servlet.ServletModule { @Override protected void configureServlets() { serve("/bus/prototype").with(PrototypeServiceImpl.class); } } I hope it helps you. :) *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Fri, Jul 1, 2011 at 9:21 AM, Drew Spencer wrote: > Hey Gal, > > I'm struggling to see what it actually does and does not do atm. Maybe > after I learn Guice for a couple of days all will become clear! I'm still > feeling my way around GAE and GWT and now I have to learn Guice. Nice to > know there is someone out there using it though! > > Drew > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine-java/-/YzXOXQ7W8xYJ. > > To post to this group, send email to > google-appengine-java@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-java@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] How to update a record in Google Apps data store
Swaminathan, None of us will explain better than the official documentation does, try it: http://code.google.com/appengine/docs/java/datastore/ *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Mon, Jul 4, 2011 at 1:12 PM, Thiago Rossi wrote: > You just need to retrieve it, change it and close the persistence manager. > No makePersistent method needed. > > For example: > > public void updateEmployeeTitle(User user, String newTitle) { > > > > PersistenceManager pm = PMF.get().getPersistenceManager(); > > > > try { > > > Employee e = pm.getObjectById(Employee.class, user.getEmail()); > > > > e.setTitle(newTitle); > > > > } finally { > > > > pm.close(); > > > } > } > > > If you're using Datastore , the principe is the same. > > > On 2 July 2011 18:10, Swaminathan wrote: > >> Hi, >> >> This is swaminathan, am now working on GAE/J. I am happy to deploy an >> application in cloud using GAE. >> >> In my project, i have just created a record in the data store and i >> need to update/overwrite the record. >> >> When i create a record, i get a auto generated Key. I have a query >> like 'How to update/overwrite the data in the record. >> >> Can any one help me out. >> >> Thank You >> >> -- >> 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 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-java@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-java@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] Problem with BlobStore
In fact there is, but yet your application need to enable billing. http://code.google.com/appengine/docs/quotas.html#Blobstore *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Mon, Jul 4, 2011 at 9:31 AM, Bilel Labidi wrote: > Hi > > Am working on a project using GWT+GAE, i try to add a user profil > (BlobService to uplad image). > This works on local client but once I upload it to online and open the > app, it shows the error message as follows > > Uncaught exception from servlet > com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The > Blobstore API will be enabled for this application once billing has > been enabled in the admin console. >at > com.google.appengine.runtime.Request.process-8a690d78b7b79704(Request.java) >at com.google.net.rpc.RpcStub$RpcCallbackDispatcher > $1.runInContext(RpcStub.java:1025) >at com.google.tracing.TraceContext$TraceContextRunnable > $1.run(TraceContext.java:448) >at > com.google.tracing.TraceContext.runInContext(TraceContext.java:688) >at com.google.tracing.TraceContext > > $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java: > 326) >at com.google.tracing.TraceContext > $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java: > 318) >at com.google.tracing.TraceContext > $TraceContextRunnable.run(TraceContext.java:446) >at com.google.net.rpc.RpcStub > $RpcCallbackDispatcher.rpcFinished(RpcStub.java:1046) >at com.google.net.rpc.RPC.internalFinish(RPC.java:2038) >at > com.google.net.rpc.impl.RpcNetChannel.finishRpc(RpcNetChannel.java: > 2352) >at > com.google.net.rpc.impl.RpcNetChannel.messageReceived(RpcNetChannel.java: > 1279) >at > com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: > 319) >at > com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: > 290) >at > com.google.net.async.Connection.handleReadEvent(Connection.java:474) >at > > com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java: > 831) >at > com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java: > 207) >at > com.google.net.async.EventDispatcher.loop(EventDispatcher.java:103) >at com.google.net.async.GlobalEventRegistry > $2.runLoop(GlobalEventRegistry.java:95) >at com.google.net.async.LoopingEventDispatcher > $EventDispatcherThread.run(LoopingEventDispatcher.java:384) > Unexpected exception from servlet: > com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The > Blobstore API will be enabled for this application once billing has > been enabled in the admin console. > > There is no minimum free quota available for users? How can i make an > online test without enable my admin console? > > -- > -Thanks > -LABIDI Bilel > -Neediz > > -- > 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 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-java@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] Aw: Bytearrays as Strings in Google Datastore
Thanks for the clarification, I was curious about what could be the causing of the error! :) *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Mon, Jul 4, 2011 at 12:54 PM, meiaestro wrote: > Solved it by using ShortBlob instead of String in datastore. > > Cheers! > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine-java/-/ElXraFqHxq0J. > > To post to this group, send email to > google-appengine-java@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-java@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] JDO: how to add a child without the collection
Thiago, Nowadays the amount of documentation and features of both interfaces are almost equals. Java has some characteristics that Python doesn't and vice-versa. But let's cope with your problem, the solution given by "objectuser" is valid and should work fine, the only problem is that you'll never be able to use transactions if the entities are not in the same entity group. A middle term between querying the real entity and just refering the id of it is to query and persist just the Key through: Query q = new Query("User").setKeysOnly(); Combined with the filter that you may want and after that asking the datastore service (because I haven't found any hook in the JDO API to ask for the keys) for the keys and using it as the argument to your new LoginHistory entity. And your english is not bad. Bwt, I'm brazilian too! :) *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Mon, Jul 4, 2011 at 11:54 AM, Thiago wrote: > Hi. > > I'm using Google App Engine and I really liked it. It was a bit > difficult in the beginning because there are more documentation for > Python and I only know Java but now I think I'm going well. > > I'm using JDO and I understand that do add a child to a one to many > relationship I need to do this: > > User user = pm.getObjectById(User.class.getName(), "thiago"); > LoginHistory loginHistory = new LoginHistory(now); > loginHistory.setKey(user.getKey().getChild(LoginHistory.class.getName(), > now.getTime()); > user.getLoginHistory(loginHistory); > pm.close(); > > I loginHostory has to have User as the parent, so User("thiago")/ > LoginHistory([time]). I can't do makePersistent(myChild) because it > won't appear in the collection or anywhere with user, so I don't know > how JDO makes the link with the collection because I can't see in the > Datastore Viewer. > > But my real question is: I have an entity and the collection is really > big, like user.getLoginHistory(), and I think after a lot of logins it > will be wrong to retrieve this collection just to add a new child. > Isn't there any way to create a child in a collection without using > the parent? Something like makePersistent(newChild) and newChild have > the key like I said? Or how can I do this using Datastore (low level > API)? I can't see the property with the collection in the Datastore > viewer. > > Thank you very much. > > PS: Sorry for my English, I'm brazilian. > > -- > 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 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-java@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] [Objectify] logical constraints and null values
Until where I know, there is no feature to accomplish the OR, AND is implicit when you add more filters. IS NULL is equals to .filter("attr", null); IS NOT NULL is equals to .filter("attr !=" null); If you find something about doing OR, let us know! :) *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Mon, Jul 4, 2011 at 5:30 PM, hadf wrote: > Hello, > > Two questions : > > How can I filter a query with logical constraints (or, and) ? (where > attribut = foo1 or attribut = foo2) > And furthermore, how can I filter a query with null or non null > values ? (where attribut is null / where attribut is not null) > > Thank you 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-java@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-java@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] Changing datastore property type
Jamie, I don't know if get it right, but if it's part of the key it is not possible to change. If this property is not part of the key, then you'll have to deal with it. Probably you're using some persistence framework such as JDO, JPA or Objectify. These are probably trying to bind the properties found in the datastore Entity object into somekind of DTO / POJO through reflection and then getting this class cast exception. Even it being allowed to use multiple type values in a given property, I don't think it's a good idea. I would recommend you to build something to migrate your old entities to the new model, maybe using datastore low-level API to have more control over what's done. If the class cast exception is been thrown somewhere else than the persistence framework (I bet it's not!), you can do some treatment over the type object retrieved or do as I said about running some code to adapt your entities to your new "schema". *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Wed, Jul 6, 2011 at 2:10 AM, Jamie wrote: > > I'm currently storing an ID property as an Integer in the datastore. > This ID is actually an ID from a third party API. Recently they > announced that this ID field will now be a String type. > > I understand that different entities of the same kind can have > different properties as well as having the same property with > different types. This is fine for new entities that I save with the > updated Java model, but how do I handle retrieval of old entities > using this updated Java model? I'm currently getting a > ClassCastException ("java.lang.Long cannot be cast to > java.lang.String") which is to be expected. > > What's the recommendation on how to handle this, as this would appear > to be a common scenario? > > 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-java@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-java@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] Changing datastore property type
*Jamie*, What I meant when I mentioned the low-level API, is because there he will use the Entity type and retrieve the property value as an Object, also he will have full access to the properties that one entity have or not. But it's just for the matter of "normalizing" his database. Use it as the primary mechanism to persist and retrieve objects isn't a good idea hehehe ... *Jeff*, You've said: "Objectify will let you change the field type to a String and do the right thing out of the box.", how? I know that's possible through @AlsoLoad annotation to override the default behavior of binding properties based on the member name. But what I understood about his need is that actually he have entities whose the property names are equals but with different object types as values. So, the only class shared in the String vs Long hierarchy will be Object. Isn't this? *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Wed, Jul 6, 2011 at 4:03 PM, Jeff Schnitzer wrote: > On Wed, Jul 6, 2011 at 11:50 AM, jMotta wrote: > >> Jamie, >> >> I don't know if get it right, but if it's part of the key it is not >> possible to change. >> > > It sounds like the id is being stored as a field/property of an entity - > it's basically a foreign key. > > >> If this property is not part of the key, then you'll have to deal with it. >> Probably you're using some persistence framework such as JDO, JPA or >> Objectify. These are probably trying to bind the properties found in the >> datastore Entity object into somekind of DTO / POJO through reflection and >> then getting this class cast exception. >> > > Jamie, you didn't mention what API you are using to access the datastore. > > FWIW, Objectify will let you change the field type to a String and do the > right thing out of the box. It's a little more tricky if you have an index > on that field, but reprocessing the data (thus recreating the index) is > pretty simple - just load and save all the entities. No need to go to the > low-level api. > > Unfortunately JDO is more fragile - schema migration doesn't seem to have > been planned into the API. > > Jeff > > -- > 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 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-java@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: Channel API Disconnect not being hit every time.
Amorgos, I really didn't understand what you meant. You're sending a request to those addresses and they're not responding, that's it? Have you enabled the channel API on the appengine-web.xml? Jayr Motta Software Developer On Jul 6, 2011 6:54 PM, "Amorgos" wrote: > Any views on this? > > Thanks > > > On Jul 4, 9:41 am, Amorgos wrote: >> Hey, >> >> I have created servlet which is hooked onto the POSTs for /_ah/channel/ >> connected/ and /_ah/channel/disconnected/. This is hit most of the >> time, but it does not get executed every time. >> >> Is this expected behaviour? >> >> 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-java@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-java@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] Specifying cache expiration
Vik, Go to you administration panel > Application Settings > There is a combo "Cookie Expiration" to set how long it should keep your users logged in. If the problem isn't in this cookie, you should look into your code where you generate a cookie and set the Max Age of it to 1 week (in ms probably). I think that's it. :P *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Thu, Jul 7, 2011 at 6:55 AM, Vik wrote: > Hie > > I used PageSpeed chrome extension to analyze my app home page which is > hosted on GAE. The suggestion come to set image cache expiration to 1 week > at least. Now I do not know where should I do that? > > Please advise. > > Thankx and Regards > > Vik > Founder > http://www.sakshum.org > http://blog.sakshum.org > > -- > 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 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-java@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] Reading Blobstore data
Luca, The fetchData() method was designed to retrieve a fragment of a given blobstore. Also, there are limitations about how much data you want to transfer, look this http://stackoverflow.com/questions/3410886/reading-a-blobstoreinputstream-1mb-in-size *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Thu, Jul 7, 2011 at 9:19 AM, Luca Matteis wrote: > Hello, > > I'm trying to simply read blobstore data without using the .serve() > method. It seems like I can use the .fetchData() method, but the > parameters needed are unclear to me and how I would generate them. > > I just need to read all the bytes. For example if I store a plain/text > file in the blobstore, I want to read it as a String so that I can > parse it and do something else with it. > > Any ideas? > Thanks, > Luca > > -- > 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 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-java@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: Specifying cache expiration
That's cool, I didn't know that. I don't know if it was just with me but the Rob Coops answer was kind hidden into the Vik thanks: Rob Coops wrote: > Have a look at the following page: > http://code.google.com/appengine/docs/java/config/appconfig.html#Static_Files_and_Resource_Files > > Under the header: Setting the Browser Cache Expiration ;-) > > Hope that helps, also there is a bit of chatter on why a GAE would or would > not GZip a file when transferring it this will also help a lot specially for > large text files which are wonderfully small when compressed. > > Regards, > > Rob > Nice! :) *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Thu, Jul 7, 2011 at 11:24 AM, Bruno Fuster wrote: > Hi > > I think you need to config your static files cache using GAE's proxy like > this (appengine-web.xml) > > > > > > > > > > > > > > > > > On Thu, Jul 7, 2011 at 10:43 AM, Vik wrote: > >> Tx a lot guys.. this seems to be answering me what i was looking for,. >> >> >> Thankx and Regards >> >> Vik >> Founder >> http://www.sakshum.org >> http://blog.sakshum.org >> >> >> On Thu, Jul 7, 2011 at 6:09 PM, Rob Coops wrote: >> >>> Have a look at the following page: >>> http://code.google.com/appengine/docs/java/config/appconfig.html#Static_Files_and_Resource_Files >>> >>> Under the header: Setting the Browser Cache Expiration ;-) >>> >>> Hope that helps, also there is a bit of chatter on why a GAE would or >>> would not GZip a file when transferring it this will also help a lot >>> specially for large text files which are wonderfully small when compressed. >>> >>> Regards, >>> >>> Rob >>> >>> On Thu, Jul 7, 2011 at 11:55 AM, Vik wrote: >>> >>>> Hie >>>> >>>> I used PageSpeed chrome extension to analyze my app home page which is >>>> hosted on GAE. The suggestion come to set image cache expiration to 1 week >>>> at least. Now I do not know where should I do that? >>>> >>>> Please advise. >>>> >>>> Thankx and Regards >>>> >>>> Vik >>>> Founder >>>> http://www.sakshum.org >>>> http://blog.sakshum.org >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Google Web Toolkit" group. >>>> To post to this group, send email to >>>> google-web-tool...@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> google-web-toolkit+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/google-web-toolkit?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Google Web Toolkit" group. >>> To post to this group, send email to google-web-tool...@googlegroups.com >>> . >>> To unsubscribe from this group, send email to >>> google-web-toolkit+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/google-web-toolkit?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-java@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. >> > > > > -- > Bruno Fuster > > -- > 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 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-java@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] Sending sms from mobile clients to GAE
Pramod, So far as I know there is no service to do it yet, neither any "supported gateway". You should look for some SMS gateway provider that offers a REST or SOAP interface, then you'd be able to call it within GAE. But it would be cool to have in a future a SMS service in GAE. Nice one! :) *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Mon, Jul 11, 2011 at 8:25 AM, pramod kumarg wrote: > > > Hi, > > > anybody plz lead me how to acheive Sending sms from mobile clients to > GAE using any gateway server. > > also plz provide the supported gateway servers by GAE. > > > > > Regards, > > > prmod > > -- > 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 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-java@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: Unauthorized Sender Error when trying to send an email (User logged in with Google Account)
I don't think you'll be able to do this, and wait for an answer of any Googler about it is to wait a "no". So far as I know, this kind of feature isn't pretty common and could lead to something undesired, try another approach or to use something outside appengine. :P *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Fri, Jul 15, 2011 at 6:38 AM, Zbój wrote: > I'm having the same problem. The sender of the email is the user who's > currently signed in and I'm getting this exception too. Sending emails > from admin accounts works without problems. > > > On Jul 13, 8:33 am, kghate wrote: > > The documentationhttp:// > code.google.com/appengine/docs/java/mail/overview.htmlclearly states > > the following > > > > *For security purposes, the sender address of a message must be the email > > address of an administrator for the application, the Google Account email > > address of the current user who is signed in, or any valid email > receiving > > address for the app (see Receiving Mail< > http://code.google.com/appengine/docs/java/mail/overview.html#Receivi.. > .>). > > The message can also include a "reply to" address, which must also meet > > these restrictions.* > > > > In my use case, we want the email to be sent from the email address of > the > > current user who is signed in, and not via any email that is in the > > permissions list. The administrator emails (listed in the permissions > list) > > are being sent successfully, no issues there. > > > > I am using UserService to get the current user's email information > > > > UserService userService = UserServiceFactory.getUserService(); > > if (userService.isUserLoggedIn()) { > > msg.setFrom(new InternetAddress(userService.getCurrentUser().getEmail(), > > from));}else{ > > > > // request user to login so that email can be sent > > > > > > > > > > > > > > > > } > > -- > 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 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-java@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] "appspot.com" without "www" domain names - but not a general word to remember and refer to -
You must be kidding, right? They're already giving you a free domain name with all possible services without charge anything and you "request" a domain easy to remember. Why don't you buy one? You've said that you could pay for this service, go on! *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Sun, Jul 17, 2011 at 12:11 PM, dreamer wrote: > Hi, > > My apps url is "http://schoolk12.appspot.com/";. > I had hard time remembering this URL, for sure I can not expect > general user to remember this. > So I have to have "www" domain name. > > I din't have any intention of buying domain name any time soon.I am > hoping "App engine+GWT+Datastore" - really takes off, And > "appspot.com" domain becomes so popular, and we don't have to buy > "www" - domain names for most of the hosted apps if not all. > > "appspot" is not a general term to remember, if this were some thing > like "cloud.com" or "googlecloud.com", it would > have been easier to remember for general user to remember. > > We can pay these www domain costs to google, for paid service. The way > domain names are going, I would be cleaner, if google brands some > thing like "appspot.com". > > So I request google come up with very generic domain name. > Some of the suggestions. > > "cloud.com" > "globe.com" > > Then my URL looks like this > > "http://schoolk12.cloud.com/"; > "http://schoolk12.globe.com/"; > > For general user, I feel these URLS may be easy to remember and refer > to. > > Please share your opinion. > > -Venu > http://schoolk12.appspot.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-java@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-java@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: "appspot.com" without "www" domain names - but not a general word to remember and refer to -
I think you got the whole internet thing wrong. When you have a business, doesn't matter for your users if it's written in Java or ASM, they just care if it works or won't. So, if it will be appengine or anything else it's much more a choice from you than from anyone else. In other words, your user doesn't care if it's appspot or "yourdomain.com" ... but probably he will remeber "yourdomain.com" easily. In the future if you choose to move from appengine to something else, you'll be stuck on it. Instead request something from Google, a company that doesn't even know that you exist, buy a domain, do something useful, work on your business, that's it. *Jayr Motta* Software Developer * * I'm on BlackBeltFactory.com<http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> ! On Sun, Jul 17, 2011 at 1:10 PM, dreamer wrote: > =>Why don't you buy one? > > One extra requirement, takes long way in larger scope. > What I mean is, for sure if app engine widely becomes popular, > "appspot.com" may become normal word for non tech folks. > but there are already popular words available like "cloud" , "sky", > which straight away can be leveraged for their popularity. > > On Jul 17, 8:20 am, jMotta wrote: > > You must be kidding, right? They're already giving you a free domain name > > with all possible services without charge anything and you "request" a > > domain easy to remember. > > > > Why don't you buy one? You've said that you could pay for this service, > go > > on! > > > > *Jayr Motta* > > Software Developer > > * > > * > > I'm on BlackBeltFactory.com< > http://www.blackbeltfactory.com/ui#!User/jmotta/ref=jmotta> > > ! > > > > On Sun, Jul 17, 2011 at 12:11 PM, dreamer >wrote: > > > > > > > > > > > > > > > > > Hi, > > > > > My apps url is "http://schoolk12.appspot.com/";. > > > I had hard time remembering this URL, for sure I can not expect > > > general user to remember this. > > > So I have to have "www" domain name. > > > > > I din't have any intention of buying domain name any time soon.I am > > > hoping "App engine+GWT+Datastore" - really takes off, And > > > "appspot.com" domain becomes so popular, and we don't have to buy > > > "www" - domain names for most of the hosted apps if not all. > > > > > "appspot" is not a general term to remember, if this were some thing > > > like "cloud.com" or "googlecloud.com", it would > > > have been easier to remember for general user to remember. > > > > > We can pay these www domain costs to google, for paid service. The way > > > domain names are going, I would be cleaner, if google brands some > > > thing like "appspot.com". > > > > > So I request google come up with very generic domain name. > > > Some of the suggestions. > > > > > "cloud.com" > > > "globe.com" > > > > > Then my URL looks like this > > > > > "http://schoolk12.cloud.com/"; > > > "http://schoolk12.globe.com/"; > > > > > For general user, I feel these URLS may be easy to remember and refer > > > to. > > > > > Please share your opinion. > > > > > -Venu > > >http://schoolk12.appspot.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-java@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-java@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-java@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.