[google-appengine] Re: Adding Custom Domain fails with Invalid Request

2013-08-09 Thread rdodev
So sad that it's a 9-month old issue with no owner and medium priority. 
When it comes to custom domain management for GAE I'm at a point when I 
just throw my hands in the air in hopelessness.

On Thursday, August 8, 2013 11:04:11 PM UTC-4, Jason Collins wrote:

 Right on cue, I'm making a plug for this issue. Please star it: 
 https://code.google.com/p/googleappengine/issues/detail?id=8528

 j

 On Wednesday, 7 August 2013 14:09:31 UTC-6, Ivan Wang wrote:

 I hate GAE for this change

 On Friday, July 26, 2013 5:45:22 PM UTC+10, Ryan Swart wrote:

 I've been trying to add a custom domain to my app for the last couple of 
 hours; the domain is an alias of my main Google Apps for Business account. 
 It fails with an invalid request error if I sign in with my personal 
 Gmail account, or infinitely redirects to the account selection page if I 
 use my Apps for Business account. 

 I managed to add the custom domain from the Apps for Business interface, 
 but this isn't documented in the Google Appengine Docs. What's going on?



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] GAE/J: Error creating a DatastoreServiceFactory with remote API 1.8.3

2013-08-09 Thread Gilberto Torrezan Filho
Hi there,

I'm having problems starting a DatastoreServiceFactory with the remote API 
provided by the 1.8.3 SDK, using a standalone client. I'm using the code 
provided 
herehttps://developers.google.com/appengine/docs/java/tools/remoteapito 
authenticate, and simply calling 
DatastoreServiceFactory.getDatastoreService() after that.

This is the error:

java.lang.IllegalArgumentException: No provider was registered for com.
google.appengine.api.datastore.IDatastoreServiceFactory
at com.google.appengine.spi.ServiceFactoryFactory.getFactory(
ServiceFactoryFactory.java:64)
at com.google.appengine.api.datastore.DatastoreServiceFactory.getFactory
(DatastoreServiceFactory.java:78)
at com.google.appengine.api.datastore.DatastoreServiceFactory.
getDatastoreService(DatastoreServiceFactory.java:20)
at com.google.appengine.api.datastore.DatastoreServiceFactory.
getDatastoreService(DatastoreServiceFactory.java:40)

The very same code works as expected using the v.1.8.2 SDK.

Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: Deploy issues

2013-08-09 Thread Tony França
I've managed to get around this problem by using the alternative 
psh-to-deploy method
https://developers.google.com/appengine/docs/push-to-deploy

It's working much better so far.



On Friday, June 7, 2013 1:18:31 PM UTC-3, Renzo Nuccitelli wrote:

  We were experiencing deploy issues yesterday. Here is the stack trace:

 Traceback (most recent call last):
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 2284, in DoUpload
 missing_files = self.Begin()
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 1947, in Begin
 self.Send('/api/appversion/create', payload=config_copy.ToYAML())
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 1892, in Send
 return self.rpcserver.Send(url, payload=payload, **self.params)
   File 
 /home/qmagico/google_appengine/google/appengine/tools/appengine_rpc.py, 
 line 393, in Send
 f = self.opener.open(req)
   File /usr/lib/python2.7/urllib2.py, line 400, in open
 response = self._open(req, data)
   File /usr/lib/python2.7/urllib2.py, line 418, in _open
 '_open', req)
   File /usr/lib/python2.7/urllib2.py, line 378, in _call_chain
 result = func(*args)
   File /usr/lib/python2.7/urllib2.py, line 1215, in https_open
 return self.do_open(httplib.HTTPSConnection, req)
   File 
 /home/qmagico/google_appengine/lib/fancy_urllib/fancy_urllib/__init__.py, 
 line 370, in do_open
 req)
   File /usr/lib/python2.7/urllib2.py, line 1180, in do_open
 r = h.getresponse(buffering=True)
   File /usr/lib/python2.7/httplib.py, line 1030, in uygetresponse
 response.begin()
   File /usr/lib/python2.7/httplib.py, line 407, in begin
 version, status, reason = self._read_status()
   File /usr/lib/python2.7/httplib.py, line 371, in _read_status
 raise BadStatusLine(line)
 BadStatusLine: ''
 Password for jenkins...@gmail.com javascript:: Traceback (most recent call 
 last):
   File /home/qmagico/google_appengine/appcfg.py, line 171, in module
 run_file(__file__, globals())
   File /home/qmagico/google_appengine/appcfg.py, line 167, in run_file
 execfile(script_path, globals_)
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 4507, in module
 main(sys.argv)
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 4498, in main
 result = AppCfgApp(argv).Run()
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 2686, in Run
 self.action(self)
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 4233, in __call__
 return method()
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 3245, in Update
 self.UpdateVersion(rpcserver, self.basepath, appyaml, yaml_file_basename)
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 3194, in UpdateVersion
 return appversion.DoUpload(paths, openfunc)
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 2284, in DoUpload
 missing_files = self.Begin()
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 1947, in Begin
 self.Send('/api/appversion/create', payload=config_copy.ToYAML())
   File /home/qmagico/google_appengine/google/appengine/tools/appcfg.py, 
 line 1892, in Send
 return self.rpcserver.Send(url, payload=payload, **self.params)
   File 
 /home/qmagico/google_appengine/google/appengine/tools/appengine_rpc.py, 
 line 393, in Send
 f = self.opener.open(req)
   File /usr/lib/python2.7/urllib2.py, line 400, in open
 response = self._open(req, data)
   File /usr/lib/python2.7/urllib2.py, line 418, in _open
 '_open', req)
   File /usr/lib/python2.7/urllib2.py, line 378, in _call_chain
 result = func(*args)
   File /usr/lib/python2.7/urllib2.py, line 1215, in https_open
 return self.do_open(httplib.HTTPSConnection, req)
   File 
 /home/qmagico/google_appengine/lib/fancy_urllib/fancy_urllib/__init__.py, 
 line 370, in do_open
 req)
   File /usr/lib/python2.7/urllib2.py, line 1180, in do_open
 r = h.getresponse(buffering=True)
   File /usr/lib/python2.7/httplib.py, line 1030, in getresponse
 response.begin()
   File /usr/lib/python2.7/httplib.py, line 407, in begin
 version, status, reason = self._read_status()
   File /usr/lib/python2.7/httplib.py, line 371, in _read_status
 raise BadStatusLine(line)
 httplib.BadStatusLine: ''

  We have tested our internet connection and it was just fine. We had those 
 problems on another days too. Any a comment about that?

  Thanks,

  Renzo




 -- 
   Renzo Nuccitelli
   www.qmagico.com.br
  

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to 

[google-appengine] Re: Best Practices for Continuous Deployment on AppEngine

2013-08-09 Thread Jay
I am curious. What kind of instability do you see? I haven't seen or at 
least noticed that. I'm not suggesting it doesn't exist. If there is 
something to watch out for there I would like to know.

On Thursday, August 8, 2013 1:25:01 PM UTC-5, aloo wrote:

 I haven an appengine app and we currently do about 5-10 deploys per day. 
 These deploys all have a NEW app version and are then set to default.

 We notice that while switching over the default version, we get about a 
 minute or 2 of instability while instances are switching over.

 We plan on increasing the number of deploys to 30/day. Does it make sense 
 to still deploy to a new version everytime?

 What are the best practices here? How do you handle a lot of deploys?


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Channel API token reuse broken?

2013-08-09 Thread Peter D
Is there some magic to getting token re-use to work?

In my situation, I want to make sure that clients reuse a token at least in 
the case of page refreshes for example, so I store their token in a cookie. 
Both in production and the dev_appserver (1.8.3), whenever I re-use a 
token, the channel socket will never receive any messages.

The biggest issue, is that the channel still fully succeeds in opening, 
the onopen callback is called correctly. So there is absolutely no way for 
me to even tell if there is something wrong, but no messages will be 
received ever.

No matter how much I test things, it seems that after a token has been 
connected to once, it will no longer function afterwards.

Anyone else have the same issue?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: Adding Custom Domain fails with Invalid Request

2013-08-09 Thread Jason Collins
I'm very confident that there is a solution in the works. I just keep 
bringing this issue forward because I think it's a serious gaping hole that 
weakens the overall offering and the weeks continue to leak by. Maybe a few 
more people should pitch in and just git 'er done!

j

On Friday, 9 August 2013 03:25:31 UTC-6, rdodev wrote:

 So sad that it's a 9-month old issue with no owner and medium priority. 
 When it comes to custom domain management for GAE I'm at a point when I 
 just throw my hands in the air in hopelessness.

 On Thursday, August 8, 2013 11:04:11 PM UTC-4, Jason Collins wrote:

 Right on cue, I'm making a plug for this issue. Please star it: 
 https://code.google.com/p/googleappengine/issues/detail?id=8528

 j

 On Wednesday, 7 August 2013 14:09:31 UTC-6, Ivan Wang wrote:

 I hate GAE for this change

 On Friday, July 26, 2013 5:45:22 PM UTC+10, Ryan Swart wrote:

 I've been trying to add a custom domain to my app for the last couple 
 of hours; the domain is an alias of my main Google Apps for Business 
 account. It fails with an invalid request error if I sign in with my 
 personal Gmail account, or infinitely redirects to the account selection 
 page if I use my Apps for Business account. 

 I managed to add the custom domain from the Apps for Business 
 interface, but this isn't documented in the Google Appengine Docs. What's 
 going on?



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: Best Practices for Continuous Deployment on AppEngine

2013-08-09 Thread aloo
The instability is mostly around 500's serving. I guess its because new 
instances need to be booted up? I thought the new code would just run on 
the existing instances that are already running but I guess thats not the 
case.

On Friday, August 9, 2013 8:42:34 AM UTC-7, Jay wrote:

 I am curious. What kind of instability do you see? I haven't seen or at 
 least noticed that. I'm not suggesting it doesn't exist. If there is 
 something to watch out for there I would like to know.

 On Thursday, August 8, 2013 1:25:01 PM UTC-5, aloo wrote:

 I haven an appengine app and we currently do about 5-10 deploys per day. 
 These deploys all have a NEW app version and are then set to default.

 We notice that while switching over the default version, we get about a 
 minute or 2 of instability while instances are switching over.

 We plan on increasing the number of deploys to 30/day. Does it make sense 
 to still deploy to a new version everytime?

 What are the best practices here? How do you handle a lot of deploys?



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Best Practices for Continuous Deployment on AppEngine

2013-08-09 Thread aloo


On Thursday, August 8, 2013 1:54:55 PM UTC-7, Vinny P wrote:

 On Thu, Aug 8, 2013 at 1:25 PM, aloo aleem.maw...@gmail.com javascript:
  wrote:

 I haven an appengine app and we currently do about 5-10 deploys per day. 
 These deploys all have a NEW app version and are then set to default.

 We notice that while switching over the default version, we get about a 
 minute or 2 of instability while instances are switching over.

  
  
 Use traffic splitting ( 
 https://developers.google.com/appengine/docs/adminconsole/trafficsplitting ) 
 to incrementally move more and more users to the new version of an 
 application. That buys time for instances to spool up for the new version 
 and spool down for the previous version.


Interesting. So new versions of the app spin up new instances? Existing 
instances don't get the newly deployed code?
 



 On Thu, Aug 8, 2013 at 1:25 PM, aloo aleem.maw...@gmail.com javascript:
  wrote:

 We plan on increasing the number of deploys to 30/day. Does it make sense 
 to still deploy to a new version everytime?

 What are the best practices here? How do you handle a lot of deploys?

  
  
 Is there a particular reason that you need to deploy new versions so 
 rapidly? 30 deploys a day is fine for a test/low-production application, 
 but if you're a high-traffic app it's a good idea to deploy on a much less 
 frequent basis.


We practice continuos deployment. As soon as a feature is ready or a bug is 
fixed we deploy it, individually, immediately. We find that much better 
than having larger releases with more code changes in each release.
 

  
  
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 App Engine Code Samples: http://www.learntogoogleit.com
   
  
  


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Best Practices for Continuous Deployment on AppEngine

2013-08-09 Thread Vinny P
On Friday, August 9, 2013 12:27:39 PM UTC-5, aloo wrote:

 So new versions of the app spin up new instances? Existing instances don't 
 get the newly deployed code?



I wouldn't say new versions spin up new instances, that leads to 
confusion about what's happening. The more correct way to say it is 
different app versions get their own instances.  

Remember that App Engine doesn't know which version is new or old (the 
version doesn't have to be a number, it can be a word too!). All it knows 
is that you have different versions of the app uploaded, and that you want 
to run them. So it allocates instances to run each version. By using 
Traffic Splitting, you can slowly move traffic from one version to another, 
and that sends a hint to the scheduler: hey, this version is getting less 
traffic, maybe I should spool down the instances running that version. But 
wait, this other version over here is getting more traffic, so I'll 
allocate more instances to that.

If you want to directly replace a version of your app, then upload your 
application with the same version as the currently deployed default app.

-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Not Able to view my entities in DataStore

2013-08-09 Thread VB
Hi Vinny,

thanks again for your reply.
well my understanding is that the code written in Noteendpoint.java (that 
was automatically generated from the Note.java on selecting Create 
Endpoint) is actually doing the writing part to the datastore.

Below is the code for the Noteendpoint.java that was generated.
As seen in the my code inside the EndpointsTask class, it invokes 
Noteendpoint.insertNote (highlighted in Bold below) to do the insertion of 
Note into the datastore.

package com.cloudnotes;

import com.cloudnotes.EMF;

import com.google.api.server.spi.config.Api;
import com.google.api.server.spi.config.ApiMethod;
import com.google.api.server.spi.config.ApiNamespace;
import com.google.api.server.spi.response.CollectionResponse;
import com.google.appengine.api.datastore.Cursor;
import com.google.appengine.datanucleus.query.JPACursorHelper;

import java.util.List;

import javax.annotation.Nullable;
import javax.inject.Named;
import javax.persistence.EntityExistsException;
import javax.persistence.EntityNotFoundException;
import javax.persistence.EntityManager;
import javax.persistence.Query;

@Api(name = noteendpoint, namespace = @ApiNamespace(ownerDomain = 
cloudnotes.com, ownerName = cloudnotes.com, packagePath = ))
public class NoteEndpoint {

/**
 * This method lists all the entities inserted in datastore.
 * It uses HTTP GET method and paging support.
 *
 * @return A CollectionResponse class containing the list of all entities
 * persisted and a cursor to the next page.
 */
@SuppressWarnings({ unchecked, unused })
@ApiMethod(name = listNote)
public CollectionResponseNote listNote(
@Nullable @Named(cursor) String cursorString,
@Nullable @Named(limit) Integer limit) {

EntityManager mgr = null;
Cursor cursor = null;
ListNote execute = null;

try {
mgr = getEntityManager();
Query query = mgr.createQuery(select from Note as Note);
if (cursorString != null  cursorString != ) {
cursor = Cursor.fromWebSafeString(cursorString);
query.setHint(JPACursorHelper.CURSOR_HINT, cursor);
}

if (limit != null) {
query.setFirstResult(0);
query.setMaxResults(limit);
}

execute = (ListNote) query.getResultList();
cursor = JPACursorHelper.getCursor(execute);
if (cursor != null)
cursorString = cursor.toWebSafeString();

// Tight loop for fetching all entities from datastore and accomodate
// for lazy fetch.
for (Note obj : execute)
;
} finally {
mgr.close();
}

return CollectionResponse.Note builder().setItems(execute)
.setNextPageToken(cursorString).build();
}

/**
 * This method gets the entity having primary key id. It uses HTTP GET 
method.
 *
 * @param id the primary key of the java bean.
 * @return The entity with primary key id.
 */
@ApiMethod(name = getNote)
public Note getNote(@Named(id) String id) {
EntityManager mgr = getEntityManager();
Note note = null;
try {
note = mgr.find(Note.class, id);
} finally {
mgr.close();
}
return note;
}

*/***
* * This inserts a new entity into App Engine datastore. If the entity 
already*
* * exists in the datastore, an exception is thrown.*
* * It uses HTTP POST method.*
* **
* * @param note the entity to be inserted.*
* * @return The inserted entity.*
* */*
* @ApiMethod(name = insertNote)*
* public Note insertNote(Note note) {*
* System.out.println(inserting note - +note);*
* EntityManager mgr = getEntityManager();*
* try {*
* if (containsNote(note)) {*
* throw new EntityExistsException(Object already exists);*
* }*
* mgr.persist(note);*
* } finally {*
* mgr.close();*
* }*
* return note;*
* }*

/**
 * This method is used for updating an existing entity. If the entity does 
not
 * exist in the datastore, an exception is thrown.
 * It uses HTTP PUT method.
 *
 * @param note the entity to be updated.
 * @return The updated entity.
 */
@ApiMethod(name = updateNote)
public Note updateNote(Note note) {
EntityManager mgr = getEntityManager();
try {
if (!containsNote(note)) {
throw new EntityNotFoundException(Object does not exist);
}
mgr.persist(note);
} finally {
mgr.close();
}
return note;
}

/**
 * This method removes the entity with primary key id.
 * It uses HTTP DELETE method.
 *
 * @param id the primary key of the entity to be deleted.
 */
@ApiMethod(name = removeNote)
public void removeNote(@Named(id) String id) {
EntityManager mgr = getEntityManager();
try {
Note note = mgr.find(Note.class, id);
mgr.remove(note);
} finally {
mgr.close();
}
}

private boolean containsNote(Note note) {
EntityManager mgr = getEntityManager();
boolean contains = true;
try {
Note item = mgr.find(Note.class, note.getId());
if (item == null) {
contains = false;
}
} finally {
mgr.close();
}
return contains;
}

private static EntityManager getEntityManager() {
return EMF.get().createEntityManager();
}

}




On Wednesday, August 7, 2013 12:06:40 PM UTC+5:30, Vinny P wrote:

 On Wed, Aug 7, 2013 at 12:13 AM, Lekh Raj lekhraj...@gmail.comjavascript:
  wrote:

 Is there any other way to debug this and identify what might be going 
 wrong?

 public void sendMsg(View view) {
  EditText msgTxt = 

[google-appengine] The Users Service.

2013-08-09 Thread Eric Sepich
I have deployed:
https://developers.google.com/appengine/docs/java/gettingstarted/usingusers

I am greeted by my Gmail username when I visit the page.


package com.clock;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.SimpleTimeZone;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.*;

import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;

@SuppressWarnings(serial)
public class ClockecsServlet extends HttpServlet {
public void doGet(HttpServletRequest req,
  HttpServletResponse resp)
throws IOException, ServletException {
SimpleDateFormat fmt = new SimpleDateFormat(-MM-dd 
hh:mm:ss.SS);
fmt.setTimeZone(new SimpleTimeZone(0, ));

UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
String loginUrl = userService.createLoginURL(/);
String logoutUrl = userService.createLogoutURL(/);

req.setAttribute(user, user);
req.setAttribute(loginUrl, loginUrl);
req.setAttribute(logoutUrl, logoutUrl);
req.setAttribute(currentTime, fmt.format(new Date()));

resp.setContentType(text/html);

RequestDispatcher jsp = 
req.getRequestDispatcher(/WEB-INF/home.jsp);
jsp.forward(req, resp);
}
}

%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
html
  head
titleThe Time Is.../title
  /head
  body
c:choose
  c:when test=${user != null}
p
  Welcome, ${user.email}!
  You can a href=${logoutUrl}sign out/a.
/p
  /c:when
  c:otherwise
p
  Welcome!
  a href=${loginUrl}Sign in or register/a to customize.
/p
  /c:otherwise
/c:choose
pThe time is: ${currentTime}/p
  /body
/html


In the application above 

c:when test=${user != null}

is not evaluating to anything and I am greeted by *Welcome! Sign in or 
register*. Since I am logged into Gmail it should display *Welcome! You can 
sign out *
*
*
I am wondering if req.setAttribute(user, user); has set anything at all. 
It does not seem like it. I see what looks like a good call to User user = 
userService.getCurrentUser(); in the servlet. I don't see the problem yet. 
Does anyone know what could be wrong with the code?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Best Practices for Continuous Deployment on AppEngine

2013-08-09 Thread aloo
I guess my real question is can a single instance run more than one version?

On Friday, August 9, 2013 10:51:36 AM UTC-7, Vinny P wrote:

 On Friday, August 9, 2013 12:27:39 PM UTC-5, aloo wrote:

 So new versions of the app spin up new instances? Existing instances 
 don't get the newly deployed code?



 I wouldn't say new versions spin up new instances, that leads to 
 confusion about what's happening. The more correct way to say it is 
 different app versions get their own instances.  

 Remember that App Engine doesn't know which version is new or old (the 
 version doesn't have to be a number, it can be a word too!). All it knows 
 is that you have different versions of the app uploaded, and that you want 
 to run them. So it allocates instances to run each version. By using 
 Traffic Splitting, you can slowly move traffic from one version to another, 
 and that sends a hint to the scheduler: hey, this version is getting less 
 traffic, maybe I should spool down the instances running that version. But 
 wait, this other version over here is getting more traffic, so I'll 
 allocate more instances to that.

 If you want to directly replace a version of your app, then upload your 
 application with the same version as the currently deployed default app.

 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

 App Engine Code Samples: http://www.learntogoogleit.com




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Best Practices for Continuous Deployment on AppEngine

2013-08-09 Thread Vinny P
On Fri, Aug 9, 2013 at 5:26 PM, aloo aleem.maw...@gmail.com wrote:

 I guess my real question is can a single instance run more than one
 version?




No.

One instance can run only one version of a given application.

-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: Important for Python developers - Updates to the Development Server in 1.7.6

2013-08-09 Thread Andrew Jessup


Good news everyone!

We just wanted to give you a quick update on PDB debugging support in the 
new dev_appserver. 

One of the key design goals of the new dev_appserver was to provide a more 
faithful emulation of how your application performs in production - 
including servicing each incoming request in a separate thread or process. 
This not only makes your local development faster, but also means issues 
(such as race conditions) that may arise from concurrent requests executing 
in parallel can be more easily identified and corrected.

However a development environment with multiple concurrent threads and 
processes can present a challenge when using a command line debugger such 
as PDB. We’ve been working on reconciling our design goal of a 
dev_appserver that supports production-like concurrency while still 
allowing developers to use tools like PDB to introspect and debug their 
code in a sensible, serialised way.

We’ve made some progress on this front recently, and wanted to share it 
with you.

The latest release 1.8.3 of the Python SDK supports PDB. That is you can 
add a line such as:

import pdb; pdb.set_trace();

into your code, and dev_appserver2 will break at this point, and drop into 
the PDB REPL, allowing you to debug your code from the command line.

However, a note of caution - if you make multiple simultaneous requests 
that invoke pdb.set_trace(), then two debugging sessions will start 
concurrently and both will send output to STDOUT. This can lead to 
unpredictable debugging experiences.

To help prevent this, you can also disable some of the dev_appserver’s 
multi-threading and multi-processing support. 

   - 
   
   Multi-threading can be disabled by modifying your app.yaml and setting 
   thread_safe to false. 
   - 
   
   For a given module, you can disable multi-processing using the 
   --max_module_instances=1 flag.
   

Using these techniques you can serialize your requests. Note that, if you 
are using App Engine modules in your application, the dev_appserver will 
still serve multiple requests simultaneously for different modules.

We hope you enjoy this early support for pdb in dev_appserver2. Please let 
us know what you think.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Not Able to view my entities in DataStore

2013-08-09 Thread Vinny P
On Fri, Aug 9, 2013 at 2:28 PM, VB apps4mas...@gmail.com wrote:

 well my understanding is that the code written in Noteendpoint.java (that
 was automatically generated from the Note.java on selecting Create
 Endpoint) is actually doing the writing part to the datastore.
 Below is the code for the Noteendpoint.java that was generated.
 As seen in the my code inside the EndpointsTask class, it invokes
 Noteendpoint.insertNote (highlighted in Bold below) to do the insertion of
 Note into the datastore.




If the code is being automatically generated by App Engine's endpoint
services, then it's good.

I wonder if your client is successfully pushing the messages to the server;
do you see any requests recorded in GAE's server logs? You can also try
installing appstats (
https://developers.google.com/appengine/docs/java/tools/appstats ), it
records all calls to the datastore so you can see if any entities are being
stored.


-
-Vinny P
Technology  Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [google-appengine] Best Practices for Continuous Deployment on AppEngine

2013-08-09 Thread Nick
We do continuous deployment as well, although not 30 a day.
I can't quite remember when there started being issues with 500s being served 
when deploying an app, but it wasn't always the case. Appengine used to just 
handle deploying newer code to the same version and start up new instances, 
shutting down old ones naturally.

We basically have two versions, one set to default, and another used for smoke 
test and to host while we're deploying. We upload new code to the smoke testing 
environment, smoke test, then switch it to default. Then we deploy to the other 
version and flip it back to default.

Occasionally the behaviour doing this changes (for a while the old instances on 
the old version didn't shutdown, and had to be done manually), but that's the 
nature of appengine.

Issue to star if you're interested (this affects everyone, any deployment will 
currently cause downtime to consumers for a small window - 2 seconds to a 
couple of minutes, there will be no indication of this in your logs at all):
http://code.google.com/p/googleappengine/issues/detail?id=7874q=Deploycolspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


[google-appengine] Re: Instability with my app

2013-08-09 Thread timh
I am not seeing any actual issues (nothing in the logs) but I have noticed 
all my instances are getting shut down and restarted about every 30 mins.
Normally an instances are at least half a day old.  Billing enabled but low 
traffic site.

T

On Saturday, August 10, 2013 7:55:06 AM UTC+8, PK wrote:

 For the past 40 minutes my app has been going up and down with logs 
 showing: a problem was encountered with the process...   

 This is a paid python app with a long track record of stability. I last 
 modified source code 24 hours ago so I doubt it is a fault on our end. 

 Anybody else with similar issues today? 

 PK 
 http://www.gae123.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.