Re: [google-appengine] Re: 502 Bad gateway error

2017-08-15 Thread Tomas Erlingsson
Did this get resolved?  We have an flex java app running in development 
with almost no traffic. We are constantly getting 502 telling us to try in 
30sec and our server app is rebooted many times a day. I am running this 
locally without any problems. Not seeing any errors in the log.

On Friday, 10 February 2017 06:07:26 UTC, Vinay Chitlangia wrote:
>
>
>
> On Thu, Feb 9, 2017 at 7:52 PM, 'Nicholas (Google Cloud Support)' via 
> Google App Engine  wrote:
>
>> I realize that we've already begun investigating this here but I think 
>> this would be most appropriate for the App Engine public issue tracker.  
>> The issue is leading to an increasingly specific situation and I suspect 
>> will require some exchange of code/project to reproduce the behavior you've 
>> described.  We monitor that issue tracker closely.
>>
>> When filing a new issue on the tracker, please link back to this thread 
>> for context while posting a link to the issue here so that others in the 
>> community can see the whole picture.
>>
>>- Be sure to include the latest logs for related to the *502*s.  When 
>>viewing the logs in Stackdriver Logging for instance, include *All 
>>logs* rather than just *request_log* as *nginx.error*, *stderr*, 
>>*stdout* and *vm.** logs may reveal clues as to a root cause.
>>- Mention if your are using any middleware like servlet filters that 
>>may receive request before that actual handler
>>- Lastly, include what the CPU and/or memory usage looks like on the 
>>instance(s) at the time of the 502s.  Screenshots of *Utilization *and 
>>*Memory Usage* graphs from the Developers Console will likely be 
>>sufficient
>>
>> I look forward to this issue report.
>>
> https://code.google.com/p/googleappengine/issues/detail?id=13543
> The logs are "All logs" around the time of the incident, however as a 
> copy/paste from the browser. Couldnt retrieve any logs using gcloud beta 
> logging read. This is the command I tried:
> gcloud beta logging read 'timestamp >= "2017-02-11T03:00:00Z" AND 
> timestamp <="2017-02-12T03:05:00Z"' 
>
>>
>> On Wednesday, February 8, 2017 at 1:24:01 PM UTC-5, Vinay Chitlangia 
>> wrote:
>>>
>>>
>>>
>>> On Wed, Feb 8, 2017 at 10:29 PM, 'Nicholas (Google Cloud Support)' via 
>>> Google App Engine  wrote:
>>>
 Hey Vinay Chitlangia,

 Thanks for some preliminary troubleshooting and linking this 
 interesting article.  App Engine runs Nginx processes to handle routes to 
 your application's handlers.  Handlers serving static assets for instance 
 are handled by this Nginx process and the resources are served directly, 
 thus bypassing the application altogether to save on precious application 
 resources.

 The Nginx process will often serve a *502* if the application raises 
 an exception, an internal API call raises an exception or if the request 
 simply takes too long.  As such, the status code by itself does not tell 
 us 
 much.

 Looking at the GAE logs for your application, I found the *502*s you 
 mentioned.  One thing I noticed is that they all occur from the */read* 
 endpoint.  From the naming, I assume this endpoint is reading some data 
 from BigTable.  Investigating further, perhaps you could provide some 
 additional information:

- What exactly is happening at the */read* endpoint?  A code sample 
would be ideal if that's not too sensitive.

 As you surmised, we are reading some data from bigtable in this 
>>> endpoint.
>>>

- What kind of error handling exists in said endpoint if the 
BigTable API returns non-success responses?

 The entire endpoint is in a try catch block catching Exception. In the 
>>> case of failure the exception stack trace gets written to the logs.
>>> The first line of the endpoint is a log message signalling receiveing 
>>> the request (this was done for this debugging of course!!) 
>>> For the successful request the log message (the introductory one) gets 
>>> written. For the 502 ones never.
>>> For requests that fail because of bigtable related errors, the logs have 
>>> the stacktrace but not for 502s.
>>> The 502 failure requests finish in <10ms.
>>>

- 
- Can you log various steps in the */read* endpoint?  This might 
help identify the progress the request reaches before the *502* is 
served.  It would also help in confirming that your application is 
 actually 
even getting the request as I can't currently confirm that from the 
 logs.

 My best guess is that the request does not make it to the servlet. The 
>>> reason for that is that for the 100s of failed 502 logs that I have seen, 
>>> not one has the log message, which is the absolute first line in the code 
>>> of the read handler. 
>>>

- 
- If said 

[google-appengine] Re: Disable index on String properties in low level datastore API (Java)

2017-04-26 Thread Tomas
Okay, I found it...

https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/datastore/PropertyContainer#setUnindexedProperty(java.lang.String,%20java.lang.Object)

setUnindexedProperty

On Thursday, 27 April 2017 09:40:48 UTC+12, Tomas wrote:
>
> Hi there,
>
> I'm trying optimise my app and I save simple object as a entity with two 
> properties (key, String data) into datastore. I don't need to index the 
> 'data' property at all but I have notice ev ery write does this:
>
> PropertyValue
> gae/datastore/count 
> 1
> gae/datastore/entity_writes 
> 1
> gae/datastore/index_writes 
> 3
> gae/datastore/size 
> 1
> I wonder if it's possible (and also if it makes any sense) to disable 
> indexing of the 'data' property - as far as I understand, String fields are 
> indexed by default... (I didn't specified any indexes manually).
>
> Just a note - would like to avoid using objectify as I'm trying to strip 
> my app of majority of external dependencies to improve my instance spin-up 
> time (which now sits at 3 seconds...)
>
> Thanks for any advice!
>
>
>

-- 
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/64a8e40a-d44e-473e-b1bd-6897e62383c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Disable index on String properties in low level datastore API (Java)

2017-04-26 Thread Tomas
Hi there,

I'm trying optimise my app and I save simple object as a entity with two 
properties (key, String data) into datastore. I don't need to index the 
'data' property at all but I have notice ev ery write does this:

PropertyValue
gae/datastore/count 
1
gae/datastore/entity_writes 
1
gae/datastore/index_writes 
3
gae/datastore/size 
1
I wonder if it's possible (and also if it makes any sense) to disable 
indexing of the 'data' property - as far as I understand, String fields are 
indexed by default... (I didn't specified any indexes manually).

Just a note - would like to avoid using objectify as I'm trying to strip my 
app of majority of external dependencies to improve my instance spin-up 
time (which now sits at 3 seconds...)

Thanks for any advice!


-- 
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/0d3f2751-ff0d-4dc7-a217-fbd0226d7bb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Slow cache, slow datastore, pending requests

2017-04-11 Thread Tomas
Okay, after lot of testing and deployments I've found one weird issue - 
json deserialisation is slow when the app is under load. My microservice 
accepts a json oject through post (simple bean with 10 short text 
properties). I can see that deserialisation of the bean takes 3+ seconds 
when the app experiences spike in requests. If the app is under the load 
the latency of datastore/memcache also goes up significantly (2+ seconds 
for datastore and memcache is very common).

I just wonder why is it happening - I don't think that 20 simple post 
updates should cause such issues for app engine...

The json is just my wrapper around Gson/Jackson...

log.debug("Deserialising with {}", json);
Cast data = this.json.deserialise(c, value);
log.debug("Deserialised with {}", json);

20:55:06.893 [s~/1.400479083523705872].: 2017-04-11 08:55:06 DEBUG 
StringToObjectConverter:32 - Deserialising with JacksonImpl@df29bb7
 20:55:11.389 [s~/1.400479083523705872].: 2017-04-11 08:55:06 DEBUG 
StringToObjectConverter:34 - Deserialised with JacksonImpl@df29bb7


On Tuesday, 11 April 2017 04:38:40 UTC+12, George (Cloud Platform Support) 
wrote:
>
> Hello Thomas, 
>
> You may consider making use of the “Async Datastore API 
> ” 
> and dedicated memcache, as described in the “Memcache Overview” document 
> . 
>
> To investigate this issue properly, we need a minimum of information: 
>
> - What project are you speaking about, exactly?  
>
> - What is the general structure of your Java code? 
>
> - Does your Java application make use of thread synchronization? 
>
> - Is the application designed with easy scaling in mind? The “Designing 
> for Scale” document 
>  provides 
> detailed advice in this respect. 
>
> - A timestamp for an example of slow performance for memcache or 
> datastore. 
>
> - A copy of the app.yaml would come quite handy. 
>
> - Any other piece of information you deem relevant to the issue, in excess 
> with what has been already provided. 
>
> You can send us confidential information, as requested above, by private 
> email, using the drop-down menu at the top right side of the message 
> window.  
>

-- 
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/b093fd4c-b3af-4e7e-aa48-2727152d1d2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Slow cache, slow datastore, pending requests

2017-04-09 Thread Tomas
One of example with datastore (same happens for memcache or even between 
two methods calls of my code) - in between those two lines in 
QuoteRepository in simple call to Objectify().save()

Could it be with some threadsafe locking? Or is it possible that logging is 
actually slowing the app down?

[s~app-id-replaced/1.400432737224109618].: 2017-04-10 04:49:38 
DEBUG QuoteRepository:72 - Saving quote 123 into database
[s~app-id-replaced/1.400432737224109618].: 2017-04-10 04:49:49 
DEBUG QuoteRepository:74 - Saved quote 123 into database

On Monday, 10 April 2017 09:05:40 UTC+12, Tomas wrote:
>
> Hello there,
>
> in last couple of months I've rewritten my java app running on app engine 
> and re-deployed with maven. Unfortunately from that time I'm experiencing 
> following issues:
>
> 1) extremely slow memcache queries - 700ms+ for simple getting object with 
> list of simple beans inside - very easy to serialise/deserialise but still 
> I see very slow memcache gets (even when the object is not in cache at all)
> 2) slow datastore gets (again I got around 400ms at best, but could go 
> over 1s very often - I'm using objectify batch fetch (list of ids) but I 
> see similar for simple one object .load.now()
> 3) pending requests - these drives me really crazy because I can't trace 
> why they spend so much time in the queue - I didn't touch any default 
> setting just threadsafe=true. My micro service is very simple
>
> - get request for list of data (that queries cache and then datastore)
> - that usually gets me list of 20-30 beans from datastore which I sometime 
> need to update - I create the task with list of ids and post them in one 
> query to task queue and return the non-updated list meanwhile
>
> - task receive the list and queries external service by rest with the 
> whoile list as a body
> - the external service iterates list in parallel and for each item finds 
> fresh data and post one by one back to my app engine service
>
> - on receiving the update I just save/update the item in the database
>
> So I get spike of items updates sometime, but nothing serious - let's say 
> 50 simple post updates per second (the body contains like 5 short strings) 
> - but I can see that single updated can take 10ms or 2seconds (spending 90% 
> of time in the pending queue).
>
> So I wonder if I'm missing some setting somewhere as I thought that if 
> there would be peak of pending request, app engine would spin another 
> instance to catch up - but I rarely see more that two instance while having 
> pending requests on both of them. Also it looks like that these simple 
> updates (which are not user facing request) are slowing down the main user 
> requests significantly (I can get 5-20 seconds pending on the main user 
> request when trying to get the list).
>
> Just a not, my cold start is around 4-5s and I can see the app is not 
> starting from cold with these spikes so it must be something else.
>
> This was working better with old version of my code but the new version is 
> much more maintainable si I'm not going back. I wonder if this could be 
> caused by sitting beside some heavy app which is slowing the engine for me 
> or I'm just doing something really stupid (very possible!).
>
> Many thanks for any advice! 
>
>

-- 
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/21b6e437-70b5-4d13-aded-fbded2be638f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Slow cache, slow datastore, pending requests

2017-04-09 Thread Tomas
Hello there,

in last couple of months I've rewritten my java app running on app engine 
and re-deployed with maven. Unfortunately from that time I'm experiencing 
following issues:

1) extremely slow memcache queries - 700ms+ for simple getting object with 
list of simple beans inside - very easy to serialise/deserialise but still 
I see very slow memcache gets (even when the object is not in cache at all)
2) slow datastore gets (again I got around 400ms at best, but could go over 
1s very often - I'm using objectify batch fetch (list of ids) but I see 
similar for simple one object .load.now()
3) pending requests - these drives me really crazy because I can't trace 
why they spend so much time in the queue - I didn't touch any default 
setting just threadsafe=true. My micro service is very simple

- get request for list of data (that queries cache and then datastore)
- that usually gets me list of 20-30 beans from datastore which I sometime 
need to update - I create the task with list of ids and post them in one 
query to task queue and return the non-updated list meanwhile

- task receive the list and queries external service by rest with the 
whoile list as a body
- the external service iterates list in parallel and for each item finds 
fresh data and post one by one back to my app engine service

- on receiving the update I just save/update the item in the database

So I get spike of items updates sometime, but nothing serious - let's say 
50 simple post updates per second (the body contains like 5 short strings) 
- but I can see that single updated can take 10ms or 2seconds (spending 90% 
of time in the pending queue).

So I wonder if I'm missing some setting somewhere as I thought that if 
there would be peak of pending request, app engine would spin another 
instance to catch up - but I rarely see more that two instance while having 
pending requests on both of them. Also it looks like that these simple 
updates (which are not user facing request) are slowing down the main user 
requests significantly (I can get 5-20 seconds pending on the main user 
request when trying to get the list).

Just a not, my cold start is around 4-5s and I can see the app is not 
starting from cold with these spikes so it must be something else.

This was working better with old version of my code but the new version is 
much more maintainable si I'm not going back. I wonder if this could be 
caused by sitting beside some heavy app which is slowing the engine for me 
or I'm just doing something really stupid (very possible!).

Many thanks for any advice! 

-- 
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e006eeb7-c26d-4587-be48-5e47ca45969a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Incoming request dalyed by 4+ seconds

2017-04-03 Thread Tomas
Hello there,

I've noticed that last month was pretty bad for my java apps running on app 
engine. Almost everything was unbelievably slow:

1) saving simple java bean into cache consistently takes half second 
(sometime more)
2) saving same bean (4 String fields) into datastore can take 10+ seconds 
(Using Objectify)
3) also my incoming requests are being hold for 5 seconds before they reach 
my servlet
4) looks like external http fetches are also taking more than usual (used 
to do them in 30-50ms now they take 500ms)

I've been charged with $60 for last month (App engine front-end instances) 
while usually charge is around $2-3 per app... And it's very hard to trace 
the reason for a such high charge, for example my trace console wasn't able 
to load at all etc)...

Does anyone have the similar issue? Also how could I trace the reason, why 
is the request held 'somewhere' before actually being send to my servlet?

Thanks...

-- 
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/df7cab08-fcee-4cc3-b8fd-a94b2768882b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Experiencing timeouts on my Java app frontend today

2014-05-21 Thread Tomas
Hi there

for last ~6hours I'm experiencing alot of requests pending in the queue 
while the traffic on my apps is normal as usual. My apps run quite normally 
on App Engine for couple of years (with cold starts ~4-5s and alot of 
requests to keep them warm), just today it seems something is wrong with 
app engine itself (I was also getting a lot of timeouts when doing http 
fetch t external sources). Appengine status page don't display any 
disruptions (although displayed some issues with GO engine couple of hours 
ago).

Anyone experience the same issue?

ms=17437 cpu_ms=0 pending_ms=15293 exit_code=121 app_engine_release=1.9.5
A problem was encountered with the process that handled this request, causing 
it to exit. This is likely to cause a new process to be used for the next 
request to your application. (Error code 121)


-- 
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/d/optout.


[google-appengine] Custom domains stopped to work

2014-03-11 Thread Tomas Adamek
Hi there

it seems like that today all my custom domain configured in my google apps 
account stopped to forward the traffic to app engine applications. All 
custom domains directs to google.com page now (or display 404 if I use 
custom.domain/some-path/

The standard appspot url's works fine, ie:

http://cover.librarist.com/9780007489978.jpg
http://cover-librarist-com.appspot.com/9780007489978.jpg

Does anyone have similar issue?

Cheers

Tomas

-- 
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/d/optout.


[google-appengine] Re: Custom domains stopped to work

2014-03-11 Thread Tomas
Okay seems fixed for me now, thanks google!

On Wednesday, 12 March 2014 09:40:24 UTC+13, Tomas Adamek wrote:

 Hi there

 it seems like that today all my custom domain configured in my google apps 
 account stopped to forward the traffic to app engine applications. All 
 custom domains directs to google.com page now (or display 404 if I use 
 custom.domain/some-path/

 The standard appspot url's works fine, ie:

 http://cover.librarist.com/9780007489978.jpg
 http://cover-librarist-com.appspot.com/9780007489978.jpg

 Does anyone have similar issue?

 Cheers

 Tomas


-- 
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/d/optout.


[google-appengine] App Engine credit for startups disappeared

2013-12-18 Thread Tomas Adamek
Hi there

I'm wondering if this happened to someone else as well - I've received $1k 
credit for my project ~3 months ago and today I've found out it disappeared 
from my transaction history - I can see the comment on previous statement 
and would be expecting the amount would be credited again on next bill but 
that hasn't happened so I'm bit confused now.

App Engine Migration credit adjustment - to be applied on next bill:  
USD

-- 
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: Bad news for GAE/Java from Google I/O

2013-05-17 Thread Tomas Adamek
Hi Jeff

thanks for heads up.

I one of the early java gae adopters and it really makes me sad to see 
how google kills quite awesome platform with such decisions - I went 
through simple servlet app to full scale Spring MVC (with all usual stuff 
like ehcache/velocity/others) and after major disappointment last year with 
cold starts and startup issues on GAE (Spring MVC simply didn't load in 60s 
interval sometimes, google was spinning/killing instance in couple of 
seconds) I ended up with this solution for http://www.librarist.com/:

1) I run Web frontend on Appfog (Spring MVC with Rest/Velocity/Ehache) - 
this piece is responsible for fetching all data from backend and caching 
them for user
2) REST backend runs on App engine - this part is done in multiple separate 
app engine application and it's build on own hacked spring-like minimal 
container which allow me to do some very simple DI/MVC/REST+JSON 
(configured in old good XML, no anotations no AOP) - cold start is usually 
4-5 secs and the app is fully serving then. As I said I have split all the 
app modules into separate applications which reduces number of request 
per app (so some apps with longer runnign request doesn't hold back app 
with faster requests). 

- cover app for fetching and displaying book covers
- book data app for fetching/storing all book related information
- pricing app which operates with external grabbers (grabbers run in 
parallel in different cloud providers aka Heroku/Appengine/Appfog/Openshif 
and I'm going to experiment with Amazon spot instances as well)

I've done this infrastructure change 2-3 months ago and as far as I can say 
it works fine (I'm having minimal latency in all of my app engine apps, 
usually run only one instance but google handles scaling very nicely now).

I'm not saying this is the only way to go since I know such design is not 
suit for every kind of application and our weak spot is now at frontend 
cloud provider (which is appfog at the moment and seems little bit unstable 
last couple of days) but I just would like to share my experience.

If anyone would like to see how the librarist works the good start would be 
the New Zealand front store (with 30+ suppliers) ie. 
http://www.librarist.com/nz/book/9780007310579/ - it usually does an 
instant price comparison on those 30+ shops in 2-4 secs (and I believe that 
now we should be able to keep such time even with more suppliers thanks to 
modular and parallel design of our backend).

Best regards

Tomas.

On Thursday, 16 May 2013 11:52:51 UTC+12, Jeff Schnitzer wrote:

 I attended the Autoscaling Java session at Google I/O. In summary, the 
 advice is:

  * Don't use dependency injection.
  * Don't use AOP.
  * Hardcode configuration values as much as possible.

 In other words, go back to Java circa 2002. There was no discussion of 
 changing routing so that user requests don't see cold starts. I asked about 
 this in person - apparently they're still talking about it and nothing 
 has been done about it.

 I am sad.

 Jeff


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: 1.7.8 Pre-release SDKs Available

2013-04-30 Thread Tomas
I've just noticed that some of my app instances now starts on 1.7.8 -
is this normal to run user facing apps on pre-sdk versions? I mean - I
don't have an issue with that (of course if it does work fine :)

On Apr 30, 9:14 am, Janani Thanigachalam tjan...@google.com wrote:
 Hello Again Everyone!

 We've posted the pre-release SDKs for Python and Java 
 here:http://code.google.com/p/**googleappengine/downloads/listhttp://code.google.com/p/googleappengine/downloads/list

 Please see the pre-release notes below.

 Regards,
 Janani

 App Engine Python SDK - Pre-Release Notes

 Version 1.7.8
 ===
 - The Mail API now allows attachments with .zip and .gzip extensions as
 long as
   the archives do not contain entries with blacklisted extensions.
  http://code.google.com/p/googleappengine/issues/detail?id=5933
 - New Billing Enabled apps will no longer default to an email quota of
 20,000
   per day. Instead, apps will need to file a request through the admin
 console
   to get email quotas increased.
 - Admin console dashboard charts and reports for all users have been fully
   migrated to the new, more reliable backend announced in 1.7.6.
 - The maximum size of POST requests made through URLfetch has been increased
   from 5MB to 10MB.
 - Fixed an issue with the admin handler of the new dev_appserver failing to
   import appengine_config automatically.

 App Engine Java SDK - Pre-Release Notes

 Version 1.7.8
 =
 - The Mail API now allows attachments with .zip and .gzip extensions as
 long as
   the archives do not contain entries with blacklisted extensions.
  http://code.google.com/p/googleappengine/issues/detail?id=5933
 - New Billing Enabled apps will no longer default to an email quota of
 20,000
   per day. Instead, apps will need to file a request through the admin
 console
   to get email quotas increased.
 - Admin console dashboard charts and reports for all users have been fully
   migrated to the new, more reliable backend announced in 1.7.6.
 - The maximum size of POST requests made through URLfetch has been increased
   from 5MB to 10MB.
 - Fixed an issue that caused Full-Text Search to fail in the Java
 dev_appserver.
    https://code.google.com/p/googleappengine/issues/detail?id=9088
 - Fixed an issue with the Java SDK jar file being too large for Windows 64.
 - Fixed a JAXBPermission.setDatatypeConverter permission issue in Java7
 runtime.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Instance issues

2013-02-26 Thread Tomas
From yesterday I observe that app engine spins new instance which serves 
requests for couple of seconds and then kill it immediately again. Can't 
see anything in logs, the spin up time also raised from usual 5-6sec to 18+ 
secs. That basically means that user faces 20secs timeout on each click. 
And as usually, GAE status all green. What's happening?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: Instance issues

2013-02-26 Thread Tomas
Yeah sorry - I'm using pure java (servlets/jsps) on HR datastore, the user 
facing app is on http://www.librarist.com/ (which is spring mvc deployed on 
appfog talking with app engine backend). All day today I see a lot of app 
instance to be started and killed within few seconds, none of them have 
more than 200 requests processed - usually my dynamic instances serve ~50k 
requests in their live.

And the best part is that google is going to charge me extra for the CPU (I 
know it's few cents but what an irony) which they waste on spining/killing 
those instances while they just could run one dynamic forever which is 
usually able to server whatever my app needs.

On Wednesday, 27 February 2013 14:37:10 UTC+13, Lawrence Mok wrote:

 are you using java / python / go? 

 it seems to me every time when someone reported a problem, it luckily 
 didn't happen to me. So I wonder if usually GAE got problem for some 
 accounts only. Are you a paid user?

 On Wednesday, February 27, 2013 3:30:39 AM UTC+8, Tomas wrote:

 From yesterday I observe that app engine spins new instance which serves 
 requests for couple of seconds and then kill it immediately again. Can't 
 see anything in logs, the spin up time also raised from usual 5-6sec to 18+ 
 secs. That basically means that user faces 20secs timeout on each click. 
 And as usually, GAE status all green. What's happening?



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: giving up with GAE

2013-02-04 Thread Tomas
Hi gafal

I totally understand your frustration - I've done some development on App 
Engine when it started and I still run some of the application there. I was 
moaning about the cold starts issue in couple of threads but I kind of sure 
that if there would be a simple solution the GAE team would probably fix 
that (I'm little bit worried that if they would do the proposed magic 
button never start a new instance for user facing request they will 
probably face some other (for-us external devs unforeseen) issues or maybe 
it just a step against the whole philosophy of the GAE platform - but who 
knows).

However, in last month I've noticed very poor performance of my App (which 
was running on M/S datastore all the time - I was getting a lot of cold 
stars, exceptions from datastore/memcache/tasks) so I've decided to 
redeploy to HR (my data are not important so I didn't need to think about 
db migration and so). And I'm again pretty happy with the performance - I 
didn't change line of the code, I'm using the minimal paid version and I 
keep all the instances on automatic (no resident instance) - I can see that 
the GAE runs two dynamic instances and keeps them alive for tenth of 
thousands request and very occasionally starts a new instance - well last 
time when Google bot visited me (I have a 100k pages in google index now) 
it was quite interesting to watch how the GAE dealt with the traffic, it 
just scaled so beautifully.

I had to say that my app uses pure servlets + jdo so the cold startup time 
is ~5-6 seconds - which is even acceptably for occasional user facing 
requests. I've tried to migrate the app to Spring MVC 
(+velocity+ehcache+rest+bunch of other libraries) and as far as I can tell 
this scenario is not suitable for the GAE atm - cold starts above 45secs 
are too long and the GAE tries to spin up new instances very often.

So the conclusion for myself and maybe something for further discussion 
with other gae devs is (and now I'm talking about java apps only):

1) forget about using Spring MVC and other Spring based frameworks (if you 
don't want to spend money on multiple resident instances) - you can of 
course try to fire up 1 min cron job to keep dynamic instances app but from 
my experience the scheduler starts some new instance even if there are a 
dynamic instances available
2) use pure servlet + jsp's (seems like gae is pretty going to be more and 
more optimized for jsp's - all the precompilation and jar packaging which 
happens on deploy and so on)
3) make your app from smaller independent applications - at the moment I'm 
splitting the app logic into smaller components each running as a separate 
app (so I have a component for displaying images/book covers, another 
component for getting book information, another component for getting book 
prices and so on) - I'm going to use these component apps as REST/JSON 
based backends and call them from the main app (which basically just puts 
all data together) through async requests
4) be prepared to handle all possible exceptions - anything can happen with 
GAE (datastore, memcache/task and so so) - catch everything and handle 
properly (try to set some timeouts as well) or if your request will timeout 
on stuff like this gae will keep spinning new and new instances
5) caching everything - for db use objectify (which caches almost 
automatically)

If you REALLY REALLY would like to use the Spring MVC (or similar DI 
framework) consider to move the frontend app somewhere else - I've put a 
beta version on Appfog (and experimenting with Openshift as well which got 
me on Tomcat7 support + absolutely awesome war deploy through GIT and ssh 
console!) and I test it atm (but I'm still going to keep all the API 
backends on GAE probably) - my MVC app is just presentation logic talking 
through REST template to GAE and some other API's (it doesn't have any 
database)

Just my 2 cents.

Cheers

Tomas

On Tuesday, 5 February 2013 07:03:48 UTC+13, gafal wrote:

 And of course Multithread activated.
 Even with min pending latency of 14.9s, some users hit cold instances and 
 get 20 to 40 s latency depending on GAE performances...

 Le lundi 4 février 2013 18:56:40 UTC+1, gafal a écrit :

 Just to clarify. I've tested all the suggestions offered in the forums. 
 I'm paying around 100 $ per month to GAE.

 I've warmup requests activated,
 I've idle instances,
 I've played with the min and max Pending Latency settings
 I've cron job every minute

 I did not want to quit (I really enjoyed GAE besides this CRITICAL issue) 
 and I'm unhappy to do it when I think about all the work I have to do to 
 free my application from GAE framework. :-(




-- 
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

[google-appengine] Re: Still having issues with my app - no deploys for last couple of moth

2013-01-22 Thread Tomas
I'm still facing tons of different exceptions which seems to be GAE issues 
- as always, GAE status all green. Having these for last three days, I 
haven't done any deploy and the app was running fine for last 6 months.

com.google.apphosting.api.ApiProxy$CancelledException: The API call 
memcache.Set() was explicitly cancelled.
Uncaught exception from servlet 
com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API 
call taskqueue.BulkAdd() took too long
2013-01-23 14:10:07.353 Uncaught exception from servlet 
java.lang.ExceptionInInitializerError at 
org.apache.log4j.Logger.getLogger(Logger.java:117) 

Failed startup of context 
com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@6078e7{/,/base/data/home/apps/ms-librari-st/1.357057244399463191}
com.google.apphosting.api.DeadlineExceededException: This request 
(40848620f31e9ac1) started at 2013/01/23 00:47:14.708 UTC and was still 
executing at 2013/01/23 00:48:14.338 UTC.
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.init(ZipFile.java:143)
at java.util.jar.JarFile.init(JarFile.java:150)
at java.util.jar.JarFile.init(JarFile.java:87)

Uncaught exception from servlet 
com.google.apphosting.api.ApiProxy$CancelledException: The API call 
datastore_v3.Put() was explicitly cancelled. at c

Just a note - I'm running some stack on Openshift and Appfog now due to 
absolute lack of support from the google team here - when I ask for help on 
their public forums I get a response within tenth of minutes/1-2 hours and 
the issue is immediately solved. I would love to continue to work on GAE 
but it's getting more and more frustrating.

Regards.

On Monday, 21 January 2013 19:58:42 UTC+13, Tomas wrote:

 Hi there,

 from the yesterday I started to see a lot of deadline exceptions, memcache 
 writes exceptions, datastore exceptions - I haven't changed the code from 
 last 6 month and I've just tried to fix those errors by playing with 
 idle/automatic instance spinning but its getting just worse (even if I 
 returned those to original setting aka 14-15seconds queue, 1 min instance 
 and 1 automatic instance). I've also noticed that my residence instance is 
 not running anymore, I see some dynamic instances spinning and sometimes 
 dynamic instance serves 5k request but can't see my residence instance at 
 all. Previously my res instance was sitting there and catching all the 
 traffic.

 BTW I've started to use the app as a backend for my frontend Spring app 
 sitting in Appfog - I'm calling GAE through rest template with apache http 
 client set to concurrent connection manager with connection queue and I 
 have a feeling that it doesn't work very well with dynamic instances as the 
 connection managers struggles with dying connections (I guess when dynamic 
 instance stops the connections is not handled to other instance but the 
 connection manager needs to find out the connection is broken and open the 
 new one) - is this correct assumption?

 app name is 
 ms-librari-sthttps://appengine.google.com/dashboard?app_id=ms-librari-st

 cheers


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/E6Y4ZqCgqnEJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Still having issues with my app - no deploys for last couple of moth

2013-01-20 Thread Tomas
Hi there,

from the yesterday I started to see a lot of deadline exceptions, memcache 
writes exceptions, datastore exceptions - I haven't changed the code from 
last 6 month and I've just tried to fix those errors by playing with 
idle/automatic instance spinning but its getting just worse (even if I 
returned those to original setting aka 14-15seconds queue, 1 min instance 
and 1 automatic instance). I've also noticed that my residence instance is 
not running anymore, I see some dynamic instances spinning and sometimes 
dynamic instance serves 5k request but can't see my residence instance at 
all. Previously my res instance was sitting there and catching all the 
traffic.

BTW I've started to use the app as a backend for my frontend Spring app 
sitting in Appfog - I'm calling GAE through rest template with apache http 
client set to concurrent connection manager with connection queue and I 
have a feeling that it doesn't work very well with dynamic instances as the 
connection managers struggles with dying connections (I guess when dynamic 
instance stops the connections is not handled to other instance but the 
connection manager needs to find out the connection is broken and open the 
new one) - is this correct assumption?

app name is 
ms-librari-sthttps://appengine.google.com/dashboard?app_id=ms-librari-st

cheers

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/HzrntJ4i4rAJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Memcache and Datastore call explicitly cancelled

2013-01-18 Thread Tomas
I'm getting a lot of these in my logs for last 10 hours - I'm still on M/S 
datastore (Yeah I know!), no deploays in last 5 months. The app engine 
status shows no disruptions at all - app id ms-librari-st.

om.google.apphosting.api.ApiProxy$CancelledException: The API call 
memcache.Set() was explicitly cancelled.
at 
com.google.apphosting.runtime.ApiProxyImpl$5.get(ApiProxyImpl.java:367)
at 
com.google.apphosting.runtime.ApiProxyImpl$5.get(ApiProxyImpl.java:364)
at 
com.google.appengine.tools.appstats.RecordingFuture.get(RecordingFuture.java:99)
at 
com.google.appengine.tools.appstats.Recorder.processRecordingFuture(Recorder.java:418)
at 
com.google.appengine.tools.appstats.Recorder.processAsyncRpc(Recorder.java:391)
at 
com.google.appengine.tools.appstats.RecordingFuture.maybeRecordStats(RecordingFuture.jav

Uncaught exception from servlet
com.google.apphosting.api.ApiProxy$CancelledException: The API call 
datastore_v3.Put() was explicitly cancelled.
at 
com.google.apphosting.runtime.ApiProxyImpl$5.get(ApiProxyImpl.java:367)
at 
com.google.apphosting.runtime.ApiProxyImpl$5.get(ApiProxyImpl.java:364)
at 
com.google.appengine.tools.appstats.RecordingFuture.get(RecordingFuture.java:99)
at 
com.google.appengine.tools.appstats.Recorder.processRecordingFuture(Recorder.java:418)
at 
com.google.appengine.tools.appstats.Recorder.processAsyncRpc(Recorder.java:391)


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/hhcqeidMsKUJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Understanding Request was aborted after waiting too long

2012-11-08 Thread Tomas
+1

On Thursday, 8 November 2012 17:09:49 UTC+13, ckhan wrote:

 Several requests over the last two days have failed with:

 0.1.0.2 - - [06/Nov/2012:10:26:04 -0800] POST /_ah/queue/deferred 
 HTTP/1.1 500 0 http://myapp.appspot.com/my/url; AppEngine-Google; (+
 http://code.google.com/appengine)
 1:1352226364.645785 Request was aborted after waiting too long to attempt 
 to service your request.

 I know this problem is reported and discussed often here - but I'm still 
 unclear on precisely how to interpret it.

 I'm trying to make sure I understand the relationship between idle 
 instances,
 pending latency, dynamic/resident instances, warmup requests and startup 
 time.
 My configuration:

Idle instances : 4 - Automatic
Pending latency: Autoomatic - Automatic

 My app makes having use of deferred, at the time of the failure several
 dozen tasks were posted to the app from taskqueue.

 1. I'm going to start by assuming that while this request came to my app
from the taskqueue (via the deferred library), this problem has nothing
to do with the taskqueue per se.

 2. The 500 means that this request in the Pending Queue:

   
 https://developers.google.com/appengine/docs/adminconsole/performancesettings

   App Engine's scheduler is responsible for routing incoming
   requests to be served by your app's instances. Sometimes the
   volume of incoming requests exceeds the capacity of the
   instances currently available to your app. When this happens,
   incoming requests may have to wait in the Pending Queue until
   busy instances become available, or until the scheduler starts
   new instances.

 3. So by that definition, there were only 3 ways out of the queue.
After minimum pending latency, but before max, Scheduler does one of 
 these:

1. One of the 4 resident instances becomes idle, and get the request.

2. One of the dynamic instances becomes idle, and gets the request.

3. Scheduler spins up a new dynamic instance.
   
   3a. If the instance comes up in time, the request is sent there.
   
   As the 'inaugural request' to this instance, this request
   is known as a loading request. 

   Your app handles the request, but its noticeably slower.
   You get the warning in the log:

   This request caused a new process to be started for your
   application, and thus caused your application code to be
   loaded for the first time. This request may thus take longer
   and use more CPU than a typical request for your
   application.
   
   3b. If the instance does not come up in time, the request is
   aborted in the Pending Queue before the app ever sees it.

   You get the error in the log: 

   Request was aborted after waiting too long to attempt to
   service your request.

 The big questions I have :

 1. Is my summary above accurate? Are there any other cases
where request was aborted after waiting too long happens?

 2. How long can you sit in the pending queue before you hit case #3b,
and the request is aborted? Do I have any control over this value?

 3. I don't have warmup requests configured. Would this have helped?
If so, why? The scheduler has *real* requests waiting in the
pending queue, why/when would it need to send me warmup ones?

 And most importantly:
 How can I tell the difference between :

my instance took too long to come up because my app isn't optimized 
 properly (ie, my problem)

AND

my instance took too long to come up because of something internal to 
 GAE, entirely outside of my control
(ie, an issue that should be reported GAE prod)

 Thanks so much for any comments/pointers/responses.
 -ckhan



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/gkOeLbaI4l0J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: What are the pros and cons of using Google App engine for my startup?

2012-08-07 Thread Tomas
My two cents (as a Java dev):

Pros:

- it's not complicated, you can do easy things in easy way (well maybe the 
Database can be tricky when you come from SQL world :-)
- very easy and fast start of development (if you use simple stack as 
servlet + jsp + objectify)
- for small projects its basically free
- very easy deployment
- very easy use of messaging as all is basically just async http request
- it scales automatically
- you don't need admin for db/app server and other stuff

Cons:

- you can't use usual frameworks aka Spring - which means you spent a lot 
of time implementing basic features which are included in your framework 
(ie. Authentication, MVC, templating, Caching and so on) - I mean you can 
probably work it around and use some subset of frameworks or libraries but 
my experience tells me you will keep trying to find some hacks and 
workarounds instead focusing on real development and adding features (For 
example with spring you add @Cacheable annotations to method which will 
automatically use in-memory cache + propagate to memcache through ehcache 
(yes one line settings) - on GAE you will need to write it by yourself)
- you don't have control over resources - when GAE a has bad day you can't 
do anything with it and you can just watch how it spins instances or fails 
when talk to db - and you usually don't get a word from google what is 
actually happening
- it doesnt fit all type of projects - for example in my app I have a web 
front and then a backend business which was processing multi-threaded 
requests while was user browsing pages - the backend was done through tasks 
and it was killing the instance so I had to move that logic to AWS where it 
runs on micro instance with 0.1 load all the time very nicely (this was 
before google announced backends) - my frontend client facing app still 
runs on GAE and I haven't touched it for more than year and didn't have 
much issues even if its sits in MS datastore :)
- it can be expensive (you need to optimize sooner) - I was usually 
optimizing after getting more hits and so but on GAE you sometime needs to 
optimize in advance because it just consumes a lot of resources (ie. 
reads/writes/indexes to db)
- something is just not going to work at all and you will need to find 
alternative (ie. reading from local drive etc)

On Friday, 3 August 2012 21:37:36 UTC+12, Levi Campbell wrote:

 I'm building a startup, and I'm considering GAE as the platform, however 
 I've been having a hard time finding information on why a startup might 
 consider GAE instead of the many cloud providers out there. Let me explain 
 what I'm working on.

 I'm a big fan of David Allen's Getting Things Done: The Art of 
 Stress-Free 
 Productivityhttp://www.amazon.com/Getting-Things-Done-Stress-Free-Productivity/dp/0142000280/ref=sr_1_1?ie=UTF8qid=1343984264sr=8-1keywords=Getting+things+done,
  
 and after trying several tools and online services that (claim to) 
 implement the GTD methodology, I couldn't find anything that I loved, so I 
 decided to build my own and make it available as a SaaS offering. This app 
 will allow users to pull in their info_crap from email, facebook, twitter 
 (and yes, I do have plans to add support for more social networks.), and 
 RSS feeds and organize it by relationship to the sender (i.e. family, 
 work colleague, vendor, and the like), project (i.e. planning a family 
 vacation.), and context (Either the when or where something should 
 happen.).\

 Would GAE be a good fit for the application I'm developing? Why?



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/ZEN0vvWzcUQJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Startup time exceeded...on F4?!

2012-07-21 Thread Tomas
Hi guys,

I actually didn't want to reply to this thread originally even I was the 
one who opened the small thread 3 months ago regarding the very slow 
startups on gae with spring + velocity + objectify but after reading the 
email telling me I should write modular apps and don't use frameworks I 
have to write up something.

I'm 10+ years java developer and I'm big fan of Spring as it saves a 
hundred hours of time - I originally developed the www.librarist.com 2 
years ago as a pet project on app engine as a just a prototype using simple 
JSPs + Servlets and it works working fine (startups 3-5 secs).

But when I wanted to add another features like cart, OAuth login, use 
templating, use proper caching - and I decided to go with Spring as this 
the reason why we have frameworks. Plugging in Velocity is just matter of 1 
line of code in XML (plus some tweaks if you need them), the cache is again 
couple of lines in XML and you automatically get in memory + memcache with 
ehcache, authentication is 2 lines of code. And I can continue.

I use spring in work for other projects which runs on full java stack (but 
thats just Tomcat/Jetty) and when I run the new librarist equivalent code 
on Micro instance on AWS (which is like 600MB ram and 1.8Ghz - I might be 
wrong here a little bit), the startup is 2-3 secs and I can serve all my 
traffic with it with load at max 0.5.

When I run the similar code on GAE, I get 45+ secs startup (when I'm lucky, 
sometime it just go over 1 nib and got killed) and then GAE keep spinning 
another instances like crazy but very often use them for three request and 
then dying to get started again. Worth to mention - I do not use the full 
Spring stac, basically its just Spring core + Spring MVC, then objectify + 
Velocity - and I really tried to do all the possible optimizations (packing 
all the stuff into one big jar, used annotations + java confing, used XML, 
disable scanning of annotations) but these changes just save me like 4-5 
secs from 45 secs.

When I tried just Spring code + Spring MVC without any other library (and 
here we talk about ~2MB of jars), use one JSP, my best startup time is 15 
secs.

Okay thats cool, I can understand the  GAE is different and basically it 
could be used just for small projects where you write everything by 
yourself and don't use any normal stuff like Dependency Injection / 
Proxying and similar. But my biggest question for GAE guys would be this - 
why the hell the startup takes so long simply I don't get what is actually 
the issue here:

- is it loading of the jars from the network (virtual drive) when the gae 
loads each class as separate file
- is it the scanning of the classes (annotations etc)
- is it java reflections
- is it creating of proxies (which Spring does for almost everything)
- anything else I can't see

I really REALLY liked the idea of the app engine since I hate to mess up 
with server configuration and it's great to focus on SW alone. But honestly 
speaking, I gave up on GAE for serious projects - it's good platform for 
doing some quick prototype to show to client (easy deploy, no server 
maintenance, you can have a simple app talking with a lot of apis up and 
running in half a day) - but then move the stuff the AWS.

I made this decision 3 months ago and from the app engine google groups I 
can see it was right thing to do as there is more and more emails coming in 
regarding broken live apps, issues with deploys, issues with startups and 
stuff like that (the SSL cert price is just a joke for example).

I really appreciate the work done on the GAE by Google but if I could give 
an advice - please stop adding new features with every release, invest one 
month of time of your team and do a proper maintenance release which will 
fix all that shit around Java apps (this really can't be so hard) or you 
will lose the war and all java devs will run away to AWS/Heroku/Cloud 
Foundry/Own servers.

Cheers.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/ozWj4QUDBDkJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Constant disconnects due to channels going stale for no reason

2012-05-24 Thread Tomas
Hi Steven,

sad to hear that - just one thing. I guess you are talking about Google 
Channel API - I thought the max expiration time for the token is 2 hours 
(https://developers.google.com/appengine/docs/java/channel/overview#Tokens_and_Security)
 
- could you please confirm you've been using 5 hours per token and it was 
actually working fine?

Thanks

On Thursday, 24 May 2012 12:43:35 UTC+12, Steven Sacks wrote:

 Ever since the latest release, our users are constantly being 
 disconnected due to channel tokens going stale with minutes of being 
 created. Our tokens are set to last for 5 hours, but we're lucky if 
 they last for 10 minutes and we cannot even reconnect with a new 
 channel token. 

 In Firefox Firebug, the console gets spammed infinitely with 

 channel name mismatch; message ignored 

 Until a refresh occurs. 

 Our users are angry. They're leaving the site. This is costing us not 
 only goodwill with our user base, but also money. Please fix this or 
 rollback to the previous build immediately. The latest build is BROKEN.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/S2unKpDm5yMJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Spring MVC + GAE = slow startup

2012-04-09 Thread Tomas
Hi, I've done all of those already and nothing helps.

As I said - the simplest MVC with just minimal spring libraries (excluding 
jpa/jdo app engine lib) with one JSP with only htm in it tak 13+ secs to 
startup.

I've spent two days trying to optimize everything (annotations support, 
scanning, repacking to bigger jars) but nothing helps.

1) what version of spring do you use (maybe the 3.1 is causing troubles)
2) how many other libraries did you have in your application

Thanks.

On Monday, 9 April 2012 17:48:35 UTC+12, jon wrote:

 Our app is also Spring-based. We did some optimisation about a year 
 ago. Don't really remember how quickly we got our app to start. I 
 think it was in the ballpark of the 13s result you got. 50s is too 
 long. 

 Here's what we've done: 
 * combine our own classes into one JAR 
 * reduce dependencies as much as possible (exclude unnecessary JPA/JDO 
 dependencies if you're not using them) 
 * turn off Spring autoscan (we list Controllers explicitly, but we do 
 use annotations inside the Controllers) 
 * use static instead of dynamic JSP includes when possible 
 * turn on JSP precompilation 
 * there may be a few other things I'm forgetting 

 On Apr 8, 6:16 pm, Tomas tomas.ada...@gmail.com wrote: 
  Hi guys, 
  
  I've decided to convert my servlet/jdo based app engine app to spring 
 mvc 
  (the current app is starting to limit me on doing quick 
  changes/improvements in the code and as I have quite good experience 
 with 
  spring on standard non cloud platforms I've decided to give it a go). 
  
  So I've put together project including: 
  
  - Spring + Spring MVC + Apache Velocity 
  - ehcache + spring-annotations for ehcache + own decorators/interceptors 
  for appengine memcached 
  - objectify 
  - some other util classes ie jsoup, commons (util, baens, logging, 
 codec), 
  gdata 
  
  The lib directory contains ~42MB of jars (including appengine libraries 
  which makes ~25MB) 
  
  After deploy, the app takes 50+ seconds to start (sometime the first 
  request get killed after 60 seconds and another app is started) - I've 
 read 
  some articles about speeding up the spring on gae and decided to do 
 another 
  little test. I've created testing app containing only spring + spring 
 mvc 
  with one controller (no other beans, but had to keep the annotation scan 
  enabled for mvc mapping - but disabled the component scan). The 
 controller 
  simply forwards to JSP file with text. Deployed and the page got 
 displayed 
  after 13 seconds. 
  
  I knew the Spring with all proxies and scanning is not optimal for GAE 
 but 
  I wasn't expecting this at all - it seems like the app have issues with 
  simple loading the libraries as I can see how the memory of instance is 
  growing by 1 MB per second. I've tried to: 
  
  1) merge jars into 3-4 bigger ones 
  2) disable annotations (just for the test as with new spring mvc its 
 quite 
  hard to do some better mapping only in xml) 
  3) lazy load some spring beans 
  
  And I can save like 5-10 secods from those 50+ seconds of my startup - 
 is 
  it really so bad for everyone or is there some magic setting? 
  
  Whats your normal startup time of your spring based app?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/CvtYpjsNUfgJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Spring MVC + GAE = slow startup

2012-04-08 Thread Tomas
Hi guys,

I've decided to convert my servlet/jdo based app engine app to spring mvc 
(the current app is starting to limit me on doing quick 
changes/improvements in the code and as I have quite good experience with 
spring on standard non cloud platforms I've decided to give it a go).

So I've put together project including:

- Spring + Spring MVC + Apache Velocity
- ehcache + spring-annotations for ehcache + own decorators/interceptors 
for appengine memcached
- objectify
- some other util classes ie jsoup, commons (util, baens, logging, codec), 
gdata

The lib directory contains ~42MB of jars (including appengine libraries 
which makes ~25MB)

After deploy, the app takes 50+ seconds to start (sometime the first 
request get killed after 60 seconds and another app is started) - I've read 
some articles about speeding up the spring on gae and decided to do another 
little test. I've created testing app containing only spring + spring mvc 
with one controller (no other beans, but had to keep the annotation scan 
enabled for mvc mapping - but disabled the component scan). The controller 
simply forwards to JSP file with text. Deployed and the page got displayed 
after 13 seconds.

I knew the Spring with all proxies and scanning is not optimal for GAE but 
I wasn't expecting this at all - it seems like the app have issues with 
simple loading the libraries as I can see how the memory of instance is 
growing by 1 MB per second. I've tried to:

1) merge jars into 3-4 bigger ones
2) disable annotations (just for the test as with new spring mvc its quite 
hard to do some better mapping only in xml)
3) lazy load some spring beans

And I can save like 5-10 secods from those 50+ seconds of my startup - is 
it really so bad for everyone or is there some magic setting?

Whats your normal startup time of your spring based app?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/MwOqz24F9cYJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Convert jsp to PDF

2012-03-31 Thread Tomas
https://developers.google.com/appengine/docs/java/conversion/

On Sunday, 1 April 2012 07:38:12 UTC+12, Deepak Singh wrote:

 Hi Karim,

 Can you pls explain about point no (3) ?

 Thanks
 Deepak

 On Sat, Mar 31, 2012 at 4:21 AM, karim duran karim.du...@gmail.comwrote:

 Hi Deepak,
 *
 *
 Your JSP is rendered as HTML. And you want to provide your user to 
 download
 the same presentation of your JSP, in PDF format.

 So, you need to convert HTML presentation format in PDF presentation 
 format.
 It's what i understand about your wish.

 You have solutions to do that.

 1) There is libraries to convert HTML to PDF ( but the conversion is not 
 always very good)
 2) You can use a specialized framework ( Jasper report, BIRT etc...)
 3) You can clone your JSP presentation in alternative formats (XML XSL 
 and FO ). Have a look to
 Apache FOP.

 What you want to do is possible.

 I hope it helps.

 Regards.

 Karim Duran.

 2012/3/30 Deepak Singh deepaksingh...@gmail.com

  Hi,

 I have a jsp page which renders data based on session objects and it 
 uses jstl.

 I need to give the user an option to save this JSpP page as PDF. So i 
 can give the call to a servlet after users click on the link and generate 
 jsp in a new window. But how can i make this downloadable as PDF or 
 printable as PDF ?



 Thanks 
 Deepak Singh
  
 -- 
 You received this message because you are subscribed to the Google 
 Groups Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.


  -- 
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.




 -- 
 Deepak Singh
  

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/TIoBN8eRZz4J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Datastore update without read

2011-10-12 Thread Tomas
Thanks guys, it really helps!

I didn't know about protobuf - thought that u have massive key/value
map (so it would be possible to just touch one key). Now it all make
sense :)

On Oct 12, 1:22 pm, Ikai Lan (Google) ika...@google.com wrote:
 Thanks Murph. That explanation was dead-on and I couldn't have written a
 better one myself!

 You can't just update one column. You're still thinking in RDBMS mode.
 There is no concept of a column, since to update a property, we need to read
 the entire entity, deserialize it (it's serialized as protobuf; at its
 lowest layer BigTable is a key-value store), change the property,
 reserialize the entire entity and write it.

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine
 plus.ikailan.com | twitter.com/ikai







 On Tue, Oct 11, 2011 at 2:38 PM, Murph paul.j.mu...@googlemail.com wrote:
  You can't update just a single property/attribute of an entity unless you
  already know the values for all of the others.  If it's frequently updated,
  careful use of memcache may allow you to avoid the db.get, but otherwise you
  have to read it first.

  An alternative, if you just have say 1 property/attribute which changes
  often would be to split the entity into two separate entity models, one with
  the relatively static data, and the other with the frequently changing
  data.  The downside there, of course, is that you're going to have 2 db.get
  operations when you need all of it, instead of 1.

  Internally, the datastore is entirely composed of (key, value) pairs, with
  a single (key,value) per entity (not counting indices, metadata, etc), and
  the SDK encodes/decodes those values into your entity models for you.  They
  are actually encoded as protobufs, but there's nothing in the datastore's
  API to modify that data without reading it first.

   --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To view this discussion on the web visit
 https://groups.google.com/d/msg/google-appengine/-/e6JrqffTES4J.

  To post to this group, send email to google-appengine@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] App Engine Status

2011-10-12 Thread Tomas
Hi,

I am experiencing task queue issues in my app (I can't see any error
in my logs but obviously tasks are not being added to my queues) -
after checking http://code.google.com/status/appengine/ I can see
everything is fine just under the column Now x Taskqueue I can see
Elevated. So what that does mean? Is there an issue with tasks or
its not?

Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Datastore update without read

2011-10-11 Thread Tomas
Hello there, this is maybe the most stupid question ever but I am
wondering if it is possible to do an update to the datastore without
reading the entity first.

I am trying to keep my reads/writes operation as low as possible and
after a huge optimization which I have done in memcache I would like
to implement an update to existing entity without reading it first.
Until now I basically just load the entity from the database using its
key (converted from my entity id) and then set the attribute and
persisted back to datastore. I am wondering what would be the best
approach here:

1) I assume there is now alternative to SQL syntax aka update entity
set attribute = :value where id = :id
2) so should I read the entity just by key through small datastore
operation (I assume this is going to load an empty entity with the key
only) and then set my attribute I would like to change and then
normally persist? Is it going to delete all unpopulated attribute in
this entity or just update the one I set? Or is this just totally dumb
and not going to work at all?
3) is there any other way how to do this?

Thank you and sorry again if I missed something really obvious here!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Datastore update without read

2011-10-11 Thread Tomas
Yeah, but I need to UPDATE one attribute of existing entity (not
overwrite the whole entity).

On Oct 12, 9:55 am, Gerald Tan woefulwab...@gmail.com wrote:
 You don't even have to do a key fetch beforehand, you can simply persist a
 new entity with the same key and it will overwrite the existing entity in
 the datastore.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Unindexed Embedded class

2011-10-04 Thread Tomas
I am trying to set my embedded classes to unindexed but seems like it
doesnt work (works for normal/direct attributes though). Similar issue
is here: 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/3a92afabfd2b6ac2

@PersistenceCapable
@EmbeddedOnly
public class Embedded {

@Persistent
@Extension(vendorName=datanucleus, key=gae.unindexed,
value=true)
private String us;

}

@PersistenceCapable
public class Parent
{
@Persistent(defaultFetchGroup = true)
@Embedded(members = {
@Persistent(name=us, columns=@Column(name=us),
extensions=@Extension(vendorName=datanucleus, key=gae.unindexed,
value=true)),
})
private Embedded e;
}

I've also tried:

@PersistenceCapable
public class Parent
{
@Persistent(defaultFetchGroup = true)
@Embedded(members = {
@Persistent(name=us, columns=@Column(name=us))
@Extension(vendorName=datanucleus, key=gae.unindexed,
value=true))
private Embedded e;
}

Bit didn't work neither.

Is this a bug/feature or am I missing something?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] DB Index behaviour

2011-10-04 Thread Tomas
I've got simple JDO entity with two String attributes

1) If I load the entity from database, change one attribute and write
it back - how many writes to indexes I should expect? (2 for the
entity (key + key index) + 2 for changed attribute OR 2 for the entity
+ 4 for all attributes including those I didn't touch)?

2) if I use the entity for long time and then decide to change the
structure and I let say remove one attribute and keep only one, then I
delete/re-update all my entities in db. Can I expect that indexed data
for the removed entity will be deleted and do they stay in datastore
and have to be cleaned by admin/manually?

I could see some strange issues with my app for which I was changing
the db structure pretty regularly - I ended up with almost empty
database (went down from 100k entities to 2k entities) but the
datastore still shown 95% full (so my guess would be lost indexes?). I
had to move the app to different appname as actually my ticket in bug
track for gae is still after 30 days open and not resolved.

Thanks for explanation.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Prerelease SDK 1.5.5 available for download!

2011-10-03 Thread Tomas
That SG transaction is just over multiple DB entities or is it
possible to do king of XA over let say write to db / add task / write
to db / commit?

I'm not complaining at all just checking what's possible to do with
that :)

Also where could I see those new graphs (I usually can't anything like
graph/cpu statistic on my localhost) - can I somehow switch to use
beta administration on real app or something like that ?

Cheers!

On Oct 4, 10:53 am, Ikai Lan (Google) ika...@google.com wrote:
 There's no documentation available (this is a prerelease, after all). It's a
 work in progress.

 The really high level description of XG transactions: they use a two phase
 commit and are slower.

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine
 plus.ikailan.com | twitter.com/ikai







 On Mon, Oct 3, 2011 at 2:22 PM, Greg g.fawc...@gmail.com wrote:
  Please could we have some documentation on python 2.7 and XG
  transactions? A good article on XG transactions would be awesome!

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appengine@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Want to talk to the App Engine team in person?

2011-09-08 Thread Tomas
What about Auckland, New Zealand? :p

Actually, do you guys have some dev in NZ or is it just Assie?

On Sep 8, 6:02 pm, Gregory D'alesandre gr...@google.com wrote:
 Hi Vivek, I'll see what I can do about having one in New York (and other
 cities), I'll post to the list if we can work it out.

 Thanks for the suggestions!

 Greg







 On Wed, Sep 7, 2011 at 6:05 PM, Vivek Puri v...@vivekpuri.com wrote:
  Can we have a similar meetup in NYC?

  On Sep 2, 8:42 pm, Gregory D'alesandre gr...@google.com wrote:
   Hi Everyone, I know that the pricing changes are challenging and in some
   ways hard to understand.  So, we thought it might help to talk to the App
   Engine team about it in person, ask us questions you might have, and
  maybe
   have a beer with us.  If you are interested let us know on the form so we
   can put you on the list:

   SIGNUP:
 https://docs.google.com/spreadsheet/viewform?formkey=dEpzUWdiMU9ZLVlS...

   WHEN: September 8, 2011 6-9PM PDT WHERE: Thirsty Bear (
 http://g.co/maps/rmvt)
   661 Howard Street San Francisco, CA 94103

   Hope to see you there!

   Greg D'Alesandre Senior Product Manager, Google App Engine

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appengine@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] JDO query where column == column

2011-07-11 Thread Tomas
Hi there,

I have an entity with something like mapping (basically each entity
represents a book, the key is isbn). Some of the books are related to
others (they are in the same edition, which means that the book title
and author is the same just the print is different - year/hardback/
paperback etc) - basically each entity represents single book. I've
got to properties which I use for the mapping of the editions. Let say
I;ve got three books from the same edition so I have:

Entity 1:

isbn = 
edition = 

Entity 2:
isbn = 222
edition = 

Entity 3:
isbn = 33
edition = 

So I am able to pick up whole edition in single query (where edition
== 111).

But now I need to do a select for 20 books where each one will
represent one edition. there is no 'group by' in app engine so I've
tried to do something like this:

Query query = pm.newQuery(Book.class);
query.setFilter(edition == isbn);

Which doesnt work as well (I guess it expects a parameter for the isbn
with this syntax but can be wrong) and that for gae is comparing two
columns with the entity in the query the same as a join (?).

I Would be really gratefull to solve my issue somehow - I would like
to display last 20 books on title page (and there will be thousands/
millions of them in db so can't filter in business logic).

Many thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Cannot import name util

2011-03-08 Thread Tomas Rampas
Hello all,
I'm using Python, and Django 1.2 and currently I'm facing problem with 500 
App server error with following log entry:
type 'exceptions.ImportError': cannot import name util Traceback (most 
recent call last): File /base/data/home/apps/jdiakup/1.348854888698905944/

I have only one place where mentioned *util *module is referenced:

*from *google.appengine.ext.webapp *import *util

Does anyone have any idea why this is suddenly happening?

Thanks 

Tomas

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Cannot import name util

2011-03-08 Thread Tomas Rampas
According to this 
posthttp://code.google.com/intl/cs/appengine/forum/?place=msg%2Fgoogle-appengine%2Fr-U4l76NMf4%2FIfA1sZGewdQJit
 seems there are some problem with Python runtime...

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Where can I find commercial successfully websites created using GAE?

2011-01-28 Thread Tomas Alaeus
I'm sorry for continuing this offtopic fest, but I just can't stand
it...

I assume you never go to the toilet during ad-breaks on TV, or never
ever have switched radio channel when ads start. Comon, there are so
many irritating, annoying ads on most websites. You probably make more
ad-money from to the people who have adblock since they most certainly
have a higher chance of recommending it to others and spreading the
word.

I'm not against advertisement on web pages, just the annoying ads, and
I want to be able to control what my browser shows me.

On 28 Jan, 22:13, Brandon Wirtz drak...@digerat.com wrote:
 Now Off topic:

 Technically if you visit a site that's TOS requires you to at least view the
 ads, and you block them you are violating Copyright and committing theft of
 service.

 I didn't put such a clause in my TOS... but one could, and some have.

 As to if you make money even if ads don’t get clicked... Most my ads are
 Adsense and are CPC, but some are CPM, and those I get paid just by being
 viewed.



 -Original Message-
 From: google-appengine@googlegroups.com

 [mailto:google-appengine@googlegroups.com] On Behalf Of Darien Caldwell
 Sent: Friday, January 28, 2011 12:24 PM
 To: Google App Engine
 Subject: [google-appengine] Re: Where can I find commercial successfully
 websites created using GAE?

 On Jan 27, 11:40 am, Brandon Wirtz drak...@digerat.com wrote:
  Ah, so you are one of those people who read websites, but don't want
  the people who make the content to make any money.  I bet you listen
  to NPR and play CD's when they go to pledge breaks..

 I don't have any ad blocking software installed, but I have never, ever,
 ever, clicked on a website ad. Do you still make money then? If he's
 removing from his sight something he has no intent of ever clicking on
 anyway, I don't see you have right to complain.

 I wasn't going to comment on the fact your site looks like a click mill, but
 after that response, I don't feel bad about saying it now.
 Exactly the kind of site I would never use.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[appengine-java] slf4j debug messages not in admin console

2010-12-27 Thread Tomas Vojtech

Hello,

I use SLF4J for logging and if I use logger.debug or logger.trace no 
message is shown in logs in administration console. Higher levels work 
fine and are in the console.


Is problem in my application or where is problem?

blaf

--
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.



[google-appengine] Re: Request for Experimental App Feedback

2010-12-23 Thread Tomas Alaeus
I see the :( enable ads for Wiki-Hop and the ads at the same time.
Probably because the ad itself is transparent (Google Ads). I'm using
Opera 11.00 beta build .

Otherwise, interesting site. :)

On 23 Dec, 05:45, Erik erik.e.wil...@gmail.com wrote:
 Hello everyone,

 Over the past few months I have been getting my feet wet with Google
 App Engine, and have created a site called Wiki-Hop (http://www.wiki-
 hop.org/).  Wiki-Hop is a search engine for finding connections
 between people in Wikipedia, similar to the idea of six degrees of
 Kevin Bacon.  Some example searches are:

 http://www.wiki-hop.org/#!/Larry_Page//Kevin_Bacon
  andhttp://www.wiki-hop.org/#!/Sergey_Brin//Jimmy_Wales

 For more information about wiki-hop please 
 visithttp://blog.wiki-hop.org/2010/12/six-degrees.html.

 Currently I am looking for feedback regarding the site, good and bad.
 This is the 'grand opening', so any feedback you can provide about
 usability will go a long ways.

 Many thanks and happy holidays!
  -Erik

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Instance scaling with problems

2010-12-16 Thread Tomas Alaeus
Due to lack of information about when App Engine starts new instances,
how it affect performance and side effects of scaling up I have here
made a short summary from my own experiences so others won't have to
find it out the hard way.

I still don't have any long experience with App Engine, but I see it
as a very promision product. The problems I see with it are mostly
associated with how the scaling of instances works. Mainly because NO
information exists on how it works. Not even the support (by mail)
seem to know how it works.

I've tried to split this post into three parts for readability. Sorry
for the wall of text.

__

First some basic facts on the non-billing (free) and billing enabled
versions.

The free version can start at most 30 instances, and the billing
enabled one have no hard limit. However, it got a soft limit which
starts at 30 and is incremented by 10 when needed. When the
application reaches its soft cap of instances and stays there for
about 10-15 minutes, and it still lacks performance, then the soft cap
is incremented by 10. If it still needs more it will be incremented by
10 after a few minutes, and so on.

This all looks fine (although it isn't mentioned anywhere, which lead
me to bad decisions). What is worse is some sort of minimum number of
instances, which I will refer to as min instances, which App Engine
will try to start up before activly forwarding the requests to hot
instances.

After a lot of testing, my results say that min instances starts on 1,
and is incremented by 1 for every soft cap increment. That is, this
value will be about a tenth of the soft cap.

__

What is the effect of this min instances more exactly?

If it is set to 4 then if there is/are: 0 instance started: An
instance starts, user feel a cold start 1 instance started: 25% of
user getting an hot instance, 75% of instance startup. 2 instances
started: 50/50% of getting an hot or cold instance. 3 instances
started: 75% of getting an hot... 4+ instances started: Now it behaves
as everyone believes.

Apart from being strange and not documented, there are some mayor
issues with this:

* It is not reverted! Even if the application is idle for a week, the
min instances are not lowered.

* Warmup requests is not triggered for the first min instances
instance startups.

* Always on starts only exactly 3 instance, if you sometime earlier
have boosted your min instance past 3 then users will still notice
cold starts, even if your application have been idle for the past
hours!

__

My story:

I didn't know about the soft cap, and hit the roof pretty quickly with
my stress tests. I aborted the tests then and asked support why it
didn't start more instances. They just said I should have the test run
longer. And so I did. I increased the soft cap to 100 instances or
something and felt that the service would handle anything that was
thrown at it.

Now when my application have gone live the first users will more or
less all be handeled by cold starts. It is always hard to predict the
number of users, but in the worst case the first users will get scared
away because of the performance issues and also warn other users about
it.

If by any means a Google employee knows about this issue, and knows
how to revert the min instances (without interrupting the service)
then please notify me!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Username Already Exists For Application ID?

2010-12-13 Thread Tomas Alaeus
This issue have been posted about earlier. If I remember correctly it
is an issue with the dots in your username. When checking for
availability it will only check for perfect matches, that is, no other
app or Google user with that id. The problem is with Gmail who
reserves ids which are very similar (registering iden.tity on Gmail
will reserve identity, 1dentity, iden.t1ty, etc). In your case, your
Gmail username would be user.name and thus username will be
reserved for you aswell.

Sadly, this reservation will block everyone (including yourself) from
using that identifier for an App Engine application.

On 13 Dec, 06:31, Will Merydith will.meryd...@gmail.com wrote:
 I went to create an Application with my Google username
 (usern...@gmail.com).

 It says the name is available, but then when I click to submit I get
 the message:
 Already Exists
 This application ID or version is already in use.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: memcache time

2010-12-12 Thread Tomas Alaeus
1. The time you specify when putting memcache entities is the maximum
lifetime. There is no guarantee that the memcache will hold its
contents for any period of time, they can be evicted immediately or
after a month, you have no way of knowing that.

2. Not that I know of. Part of the memcache can be flushed, or all of
it, at a time. So I don't think there is an easy way to implement it
either. Besides, since the memcache is stored in volatile memory the
flush can be triggered by a machine shutting down. In that case it
would be hard to know immediately which entities were removed.

You should always make the code work even if the memcache always
return null. Easiest is to populate the memcache when a request
fetches a null entity, so it always have something to fall back on.

On 12 Dec, 14:24, Sharma Anil sharmaanil1...@gmail.com wrote:
 I have implemented the following on GAE.

 1.   Fetch all entities in a Kind and identify the last updated
 entity.
 2.   Set the memcache with a key and a property from the entity from
 step one with specifying 6 hours longevity
 3.   Log the information and status
 4.   Define a cron job handle to do all steps 1, 2 and 3, in every 4
 hours

 Result:       Works fine most of the time.
 Problem:    Memcache entry does not exist for the duration set for
 it.

 Question:   1.   Is there any way to ensure Memcache key-value pair
 for a defined time ?
                  2.   Is there anyway to get a message from GAE on
 forced Memcache flush out ?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: AlwaysOn and WarmUpRequests working poorly?

2010-12-09 Thread Tomas Alaeus
I have a similar issue. After having tested my app with thousands of
users it now fails (performance wise) when serving just a few users.
Even if I just have 1 QPS incoming, it will boot up 10 instances and
all of the loading requests are user facing (note that 1 instance
would be more than enough to handle the traffic). When all those
instances are busy it will boot up new ones, and it will use the
warmup requests only sometimes for that.

It seems to me that the algorithm App Engine uses to determine how
many instances are needed for the current traffic is somewhat
flawed...

On 9 Dec, 18:44, Sergio Lopes slo...@gmail.com wrote:
 That's right, I use GAEJ. In Java, the instance concept and the
 startup momento are all well defined. My problem here is that the
 loading_requests rarely are /_ah/warmup requests. Most loading
 requests are user requests, even with AlwaysOn enabled. It doesn't
 seem right...

 On Dec 9, 3:17 pm, Stephen Johnson onepagewo...@gmail.com wrote:



  My assumption would be and this is for Java (not a python person) that if
  you have an empty handler at the very least you would get the JVM up and
  running and some of the basic libraries that are required. Then, depending
  on what you do in the warmup request and/or your web.xml would load
  additional libraries. For example, if you use the load-on-startup with a
  integer = 0 then the servlet would be loaded when the request handler is
  called regardless of whether or not it is used. Also, if a datastore or
  memcache request were made in the handler that those additional libraries
  would be loaded. I haven't implemented one yet but my intention is to use it
  to load as much of these additional libraries as possible.

  On Thu, Dec 9, 2010 at 9:45 AM, Darien Caldwell
  darien.caldw...@gmail.comwrote:

   It sounds wrong.

   But it brings me back to a question i've been wondering to myself for
   awhile now: what constitutes an Instance, exactly? Is it the bulk of
   all the code uploaded, or just whatever modules were las used?

   For instance, I have several separate sections to my app, and
   depending on which URL a request is received on, different code paths
   are executed, each loading different modules. If I have a warm
   instance, exactly what is being kept warm? All of the modules for all
   of the URLs, or what exactly?

   How does the system decided what to keep warm?

   --
   You received this message because you are subscribed to the Google Groups
   Google App Engine group.
   To post to this group, send email to google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib
e...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to handle user page URLs if usernames are not unique?

2010-12-09 Thread Tomas Alaeus
The usernames are still unique, but the slugs used for URLs (and on
other places where uniqueness is a must) are unique.

But yeah, most people consider usernames unique. If your usernames
aren't unique you might want to call them something else, like display
name as Robert said.

You also could assign every user an id. If you save the data as
entities in the datastore (which you probably do) without any
explicitly defined Key, then you could fetch the entity id and use
that one. That id will definitely be unique.

On 9 Dec, 02:11, Tim Hoffman zutes...@gmail.com wrote:
 Well then usernames are unique ;-) ross, ross1

 T

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Do I have to implement /_ah/warmup

2010-12-05 Thread Tomas Alaeus
Worth noting is that the documentation is wrong. The XML-tag to use to
disable warmup requests in Java is warmup-requests-enabled and _not_
warming-requests-enabled.

Maybe you can fix it Nick? :)

On 6 Dec, 07:28, Nick Johnson (Google) nick.john...@google.com
wrote:
 The purpose of warmup requests is to give your app the opportunity to load
 all the libraries it needs and do any other initialization work required,
 before it serves user-facing requests. If you have a catchall handler, then
 serving a 404 is probably doing that, but having a do-nothing handler is
 probably a better idea, and ensures the request hits the whole app pipeline.

 -Nick Johnson





 On Sun, Dec 5, 2010 at 5:02 PM, Will vocalster@gmail.com wrote:
  Hmm, thanks.

  I can live with the log, as long as doing nothing serves the purpose. I
  prefer less code unless it's absolutely necessary.

  Best,

  Will

  On Sun, Dec 5, 2010 at 10:25 AM, 风笑雪 kea...@gmail.com wrote:

  You'd better implement it if you don't want to see it logged as an
  error in your dashboard.

  However, the implementation can be empty:

  class WarmupHandler(RequestHandler):
         def get(self):
                 pass # or log it by: logging.info('Warmup Request')

  --
  keakon

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

   --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

 --
 Nick Johnson, Developer Programs Engineer, App Engine
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
 368047

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Request hangs when deleting lots of objects

2010-12-03 Thread Tomas Alaeus
I want to purge old entities from the datastore. How I do this at the
moment is having a cron job run a script every 30 seconds. The script
removes entries using deletePersistentAll() via a JDO query object.

Query query = pm.newQuery(Game.class, lastUpdateTime  ageLimit);
query.declareParameters(long ageLimit);
long numRemovedGames = query.deletePersistentAll(ageLimit);

The datastore contains about 2000 or so objects that should be
removed. However, when I run this the request is killed with a
DeadlineExceededException and no objects are removed. The same issue
will happen again, again and again every time the cron job runs since
no objects are removed.

If I try to use setRange() to limit the number of objects being
removed, it will throw another exception saying I'm not allowed to do
that.

Is the only solution to actually get the objects, and then remove them
one by one?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Policy for instance startup

2010-12-03 Thread Tomas Alaeus
I hoped that Warmup Requests could be used to remedy the situation (at
least from a users perspective). Unfortunally, it does not help
anything.

Warmup requests seems to be inactive (or not react) when there are
less than 10 instances active for my live app. The warm up requests
starts to work when 10 instances are started.

It seems to me that my app-id have been marked permanently as a
heavy application, which isn't true yet.

On 26 Nov, 09:32, Tomas Alaeus tala...@gmail.com wrote:
 This problem doesn't seem to happen on the staging server (doesn't
 have billing enabled), but I maybe haven't stressed it enough. Another
 application I have for testing purposes seem to be affected by it too,
 and it doesn't have billing enabled either. That application seems to
 want at least 4 instances before serving hot instances to incoming
 requests.

 This is actually quite bad for everyone. If the load is low the user
 experience will be worse, we have to pay more and Googles servers will
 have to boot up/down instances for no reason. Can any Googler confirm
 this behavior?

 On 24 Nov, 22:18, nickmilon nickmi...@gmail.com wrote:



  While waiting from a Googler to give us some light on this may be you
  do your stress tests in the staging server ? (just an other version
  will do as staging server)
  Also I remember people from App Engine team stating here that the best
  performance comes when load comes in a natural matter.

  Still IMHO that there must be some more transparency into those
  parameters within which our appls have to operate. - It helps both us
  and the platform.

  Regards
  Nick

  On Nov 24, 9:21 am, Tomas Alaeus tala...@gmail.com wrote:

   Probably. With some more thinking I got to this conclusion:

   At first, an application can utilize up to 30 instances. After having
   used all those instances for a few minutes, and it still isn't enough,
   GAE will increase the maximum number of available instances to 40, and
   then to 50 etc. Every time it increases the number of instances it
   will probably also adjust how and when it boots up new instances.

   For my production app it probably tries to keep at least 10 instances
   running since it thinks a huge amount of users can use the site at any
   given time. The staging haven't had any rush of users, and therefore
   thinks it is safe with just 1 instance running.

   I would still like to hear something from a Googler. If this is how it
   works then it means that stress testing the application (with a lot
   more pressure than it will normally get) may lead to worse (!)
   performance permanently.

   On 24 Nov, 00:01, nickmilon nickmi...@gmail.com wrote:

Not been a Googler can't help much with this.
Having said that, I suspect there is a kind of build in algorithm that
does some kind of application profiling taking into acount QPS,
response times, and other parameters which adjusts instance life time,
number of instances to start etc..
This could possibly explain the difference in behaviour between your
staging and production appls.

happy coding;-)

On Nov 23, 11:58 am, Tomas Alaeus tala...@gmail.com wrote:

 I'm curious when exactly instances are started. I have two
 applications running on GAE, one of them have billing enabled. The one
 with billing enabled have been stress tested and have at most started
 100 simultaneous instances. The other is just for testing and staging
 purposes and have never handeled much traffic.

 What I experience is that the staging server never starts more
 instances than needed. If a single person views pages it will never
 load more than a single instance. The other one however seems to start
 about 5 instances before anyone can get hot responses, and it will
 continue to start up to about 10 before realizing that ~1 QPS isn't
 that much traffic (the requests finish in about 100ms each).

 So, why does GAE boot up lots of instances even though 1 instance can
 serve the incoming traffic without a problem (the requests doesn't
 even overlap, so no waiting is needed)?

 I realize that this isn't a very big issue, since when it gets lots of
 traffic it will indeed need all the instances. I'm just curious why it
 happens.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Request hangs when deleting lots of objects

2010-12-03 Thread Tomas Alaeus
Typo... The cron job runs every 30 minutes. It timeouts no matter if
it is the cron job that timeouts (10 minutes) or from the user (30
seconds). The strange thing is that both timeouts utilize the same
amount of CPU. That brings the question, does the cron job stay idle
for the rest of the 9 and a half minutes? :)

On 3 Dec, 13:14, Tomas Alaeus tala...@gmail.com wrote:
 I want to purge old entities from the datastore. How I do this at the
 moment is having a cron job run a script every 30 seconds. The script
 removes entries using deletePersistentAll() via a JDO query object.

 Query query = pm.newQuery(Game.class, lastUpdateTime  ageLimit);
 query.declareParameters(long ageLimit);
 long numRemovedGames = query.deletePersistentAll(ageLimit);

 The datastore contains about 2000 or so objects that should be
 removed. However, when I run this the request is killed with a
 DeadlineExceededException and no objects are removed. The same issue
 will happen again, again and again every time the cron job runs since
 no objects are removed.

 If I try to use setRange() to limit the number of objects being
 removed, it will throw another exception saying I'm not allowed to do
 that.

 Is the only solution to actually get the objects, and then remove them
 one by one?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Policy for instance startup

2010-11-26 Thread Tomas Alaeus
This problem doesn't seem to happen on the staging server (doesn't
have billing enabled), but I maybe haven't stressed it enough. Another
application I have for testing purposes seem to be affected by it too,
and it doesn't have billing enabled either. That application seems to
want at least 4 instances before serving hot instances to incoming
requests.

This is actually quite bad for everyone. If the load is low the user
experience will be worse, we have to pay more and Googles servers will
have to boot up/down instances for no reason. Can any Googler confirm
this behavior?

On 24 Nov, 22:18, nickmilon nickmi...@gmail.com wrote:
 While waiting from a Googler to give us some light on this may be you
 do your stress tests in the staging server ? (just an other version
 will do as staging server)
 Also I remember people from App Engine team stating here that the best
 performance comes when load comes in a natural matter.

 Still IMHO that there must be some more transparency into those
 parameters within which our appls have to operate. - It helps both us
 and the platform.

 Regards
 Nick

 On Nov 24, 9:21 am, Tomas Alaeus tala...@gmail.com wrote:



  Probably. With some more thinking I got to this conclusion:

  At first, an application can utilize up to 30 instances. After having
  used all those instances for a few minutes, and it still isn't enough,
  GAE will increase the maximum number of available instances to 40, and
  then to 50 etc. Every time it increases the number of instances it
  will probably also adjust how and when it boots up new instances.

  For my production app it probably tries to keep at least 10 instances
  running since it thinks a huge amount of users can use the site at any
  given time. The staging haven't had any rush of users, and therefore
  thinks it is safe with just 1 instance running.

  I would still like to hear something from a Googler. If this is how it
  works then it means that stress testing the application (with a lot
  more pressure than it will normally get) may lead to worse (!)
  performance permanently.

  On 24 Nov, 00:01, nickmilon nickmi...@gmail.com wrote:

   Not been a Googler can't help much with this.
   Having said that, I suspect there is a kind of build in algorithm that
   does some kind of application profiling taking into acount QPS,
   response times, and other parameters which adjusts instance life time,
   number of instances to start etc..
   This could possibly explain the difference in behaviour between your
   staging and production appls.

   happy coding;-)

   On Nov 23, 11:58 am, Tomas Alaeus tala...@gmail.com wrote:

I'm curious when exactly instances are started. I have two
applications running on GAE, one of them have billing enabled. The one
with billing enabled have been stress tested and have at most started
100 simultaneous instances. The other is just for testing and staging
purposes and have never handeled much traffic.

What I experience is that the staging server never starts more
instances than needed. If a single person views pages it will never
load more than a single instance. The other one however seems to start
about 5 instances before anyone can get hot responses, and it will
continue to start up to about 10 before realizing that ~1 QPS isn't
that much traffic (the requests finish in about 100ms each).

So, why does GAE boot up lots of instances even though 1 instance can
serve the incoming traffic without a problem (the requests doesn't
even overlap, so no waiting is needed)?

I realize that this isn't a very big issue, since when it gets lots of
traffic it will indeed need all the instances. I'm just curious why it
happens.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Policy for instance startup

2010-11-23 Thread Tomas Alaeus
I'm curious when exactly instances are started. I have two
applications running on GAE, one of them have billing enabled. The one
with billing enabled have been stress tested and have at most started
100 simultaneous instances. The other is just for testing and staging
purposes and have never handeled much traffic.

What I experience is that the staging server never starts more
instances than needed. If a single person views pages it will never
load more than a single instance. The other one however seems to start
about 5 instances before anyone can get hot responses, and it will
continue to start up to about 10 before realizing that ~1 QPS isn't
that much traffic (the requests finish in about 100ms each).

So, why does GAE boot up lots of instances even though 1 instance can
serve the incoming traffic without a problem (the requests doesn't
even overlap, so no waiting is needed)?

I realize that this isn't a very big issue, since when it gets lots of
traffic it will indeed need all the instances. I'm just curious why it
happens.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Policy for instance startup

2010-11-23 Thread Tomas Alaeus
Probably. With some more thinking I got to this conclusion:

At first, an application can utilize up to 30 instances. After having
used all those instances for a few minutes, and it still isn't enough,
GAE will increase the maximum number of available instances to 40, and
then to 50 etc. Every time it increases the number of instances it
will probably also adjust how and when it boots up new instances.

For my production app it probably tries to keep at least 10 instances
running since it thinks a huge amount of users can use the site at any
given time. The staging haven't had any rush of users, and therefore
thinks it is safe with just 1 instance running.

I would still like to hear something from a Googler. If this is how it
works then it means that stress testing the application (with a lot
more pressure than it will normally get) may lead to worse (!)
performance permanently.

On 24 Nov, 00:01, nickmilon nickmi...@gmail.com wrote:
 Not been a Googler can't help much with this.
 Having said that, I suspect there is a kind of build in algorithm that
 does some kind of application profiling taking into acount QPS,
 response times, and other parameters which adjusts instance life time,
 number of instances to start etc..
 This could possibly explain the difference in behaviour between your
 staging and production appls.

 happy coding;-)

 On Nov 23, 11:58 am, Tomas Alaeus tala...@gmail.com wrote:



  I'm curious when exactly instances are started. I have two
  applications running on GAE, one of them have billing enabled. The one
  with billing enabled have been stress tested and have at most started
  100 simultaneous instances. The other is just for testing and staging
  purposes and have never handeled much traffic.

  What I experience is that the staging server never starts more
  instances than needed. If a single person views pages it will never
  load more than a single instance. The other one however seems to start
  about 5 instances before anyone can get hot responses, and it will
  continue to start up to about 10 before realizing that ~1 QPS isn't
  that much traffic (the requests finish in about 100ms each).

  So, why does GAE boot up lots of instances even though 1 instance can
  serve the incoming traffic without a problem (the requests doesn't
  even overlap, so no waiting is needed)?

  I realize that this isn't a very big issue, since when it gets lots of
  traffic it will indeed need all the instances. I'm just curious why it
  happens.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Unable to deploy due to 500 server error

2010-11-21 Thread Tomas Alaeus
I have similar issues. Admin console gave (works now) 500-errors, and
I can't deploy.

On 21 Nov, 12:14, Steve unetright.thebas...@xoxy.net wrote:
 This is happening again to me.  Was the deploy failing fix reverted?

 --Steve

 On Nov 18, 5:38 pm, Ikai Lan (Google) ikai.l+gro...@google.com
 wrote:



  I wish I could take credit for this, but you have the other members of our
  excellent production team to thank. Here are some more details:

 http://groups.google.com/group/google-appengine-downtime-notify/brows...

  --
  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

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: There a limit of reqs/sec? (160reqs/sec)

2010-11-05 Thread Tomas Alaeus
I'm getting conflicted responses here... The documentation says 45,200
QPM max, which translates to a sustained 500 QPS, it also says max 30
instances (or maybe that was just someone who figured it out and
posted on a forum). Now you say there is no QPS cap, and the support
said that there isn't a cap on instances on billing accounts. The
latter doesn't seem to affect my account, since it never grows past 30
instances.

Which values and facts are the correct ones?

On 19 Okt, 16:38, Nick Johnson (Google) nick.john...@google.com
wrote:
 Hi Sahid,

 What you're seeing in your graph there is the transition between historical
 data, which is stored at a lower time resolution, and newer data. The QPS
 isn't capped, it was just roughly flat for that time period.

 -Nick Johnson





 On Mon, Oct 18, 2010 at 9:21 AM, sahid sahid.ferdja...@gmail.com wrote:
  Hello all,

  Just a question,
  this morning i has checked my chart of reqs/sec and I suspect the
  number is blocked at 160reqs/sec

  Just i would like know if it not a problem maybe i'm paranoïde :)

  For informations:
   - The reqs/sec:http://goo.gl/upVZ
   - The errors/sec:http://goo.gl/F43k

  Thanks,
  Sahid

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

 --
 Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
 Registered in Dublin, Ireland, Registration Number: 368047
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
 368047

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Channel API outside browsers

2010-11-03 Thread Tomas Alaeus
I must admit, I haven't looked at the javascript in the SDK, no.
Didn't really think about it. In either case, it would be really nice
if official APIs for other languages were released as well. Maybe not
so likely to happen though.

On 3 Nov, 05:37, Robert Kluin robert.kl...@gmail.com wrote:
 Are the data-exchanges overly complicated?

 I have used XMPP for an app, I was hoping the channel API would let me 
 simplify.

 Robert



 On Wed, Nov 3, 2010 at 00:29, Peter Petrov onest...@gmail.com wrote:
  Forget about emulating it outside of a browser. Your best bet is using a
  separate mechanism for sending messages to non-browser clients - for example
  make a HTTP postback, or send a XMPP message.

  On Wed, Nov 3, 2010 at 6:20 AM, Robert Kluin robert.kl...@gmail.com wrote:

  Have you look at the communications at all?  I the javascript file is
  included in the SDK.  It is a little heavy, but you could probably
  use firebug (or chrome/safari dev console) to figure out what is going
  on.

 http://code.google.com/p/googleappengine/source/browse/trunk/python/g...

  Robert

  On Tue, Nov 2, 2010 at 08:41, Tomas Alaeus tala...@gmail.com wrote:
   I for one thought directly of games when I heard that the Channel API
   were coming to AppEngine. However, all discussions and articles only
   mentions a Javascript client running in a web browser. Will it come
   ports to other languages as well? Maybe the actual communication is so
   simple that it is trivial to do oneself (considering that the API is
   somewhat similar to websockets if I understood it correctly)?

   Thanks, Tomas

   --
   You received this message because you are subscribed to the Google
   Groups Google App Engine group.
   To post to this group, send email to google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.com.
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Channel API outside browsers

2010-11-03 Thread Tomas Alaeus
Yes, there exist other solutions to this already. But those require
(at least to my knowledge) either a server outside AppEngine or the
use of another service. To have everything inside the AppEngine
environment would be really nice for a lot of reasons.

On 3 Nov, 14:15, Peter Petrov onest...@gmail.com wrote:
 It will let you simplify _when_ you run inside a web browser. That's what
 the Channel API is designed for. For pushing data to other types of clients
 (automated services, bots, etc.) there already exist good solutions - XMPP,
 PubSubHubbub, plain HTTP POSTs.

 When you run in a browser, the complexity is hidden in the Channel API
 javascript. Only a simplistic interface similar to WebSockets is exposed to
 you as developer. But the complexity hidden underneath in the Channel API
 client library is pretty big:

 - first, there is HTTP long-polling used to emulate a persistent connection
 - second, an undocumented protocol is used to frame the separate messages;
 it's probably ProtocolBuffers-based
 - third, an invisible Iframe together with a Closure XPC channel is used to
 bypass the same-origin javascript policy

 The last one is not necessary if you create an out-of-browser client. But
 the first two are complex enough (primarily the first one). Considering that
 you have other (good) options, it would be quite crazy to go down that road.



 On Wed, Nov 3, 2010 at 6:37 AM, Robert Kluin robert.kl...@gmail.com wrote:
  Are the data-exchanges overly complicated?

  I have used XMPP for an app, I was hoping the channel API would let me
  simplify.

  Robert

  On Wed, Nov 3, 2010 at 00:29, Peter Petrov onest...@gmail.com wrote:
   Forget about emulating it outside of a browser. Your best bet is using a
   separate mechanism for sending messages to non-browser clients - for
  example
   make a HTTP postback, or send a XMPP message.

   On Wed, Nov 3, 2010 at 6:20 AM, Robert Kluin robert.kl...@gmail.com
  wrote:

   Have you look at the communications at all?  I the javascript file is
   included in the SDK.  It is a little heavy, but you could probably
   use firebug (or chrome/safari dev console) to figure out what is going
   on.

 http://code.google.com/p/googleappengine/source/browse/trunk/python/g...

   Robert

   On Tue, Nov 2, 2010 at 08:41, Tomas Alaeus tala...@gmail.com wrote:
I for one thought directly of games when I heard that the Channel API
were coming to AppEngine. However, all discussions and articles only
mentions a Javascript client running in a web browser. Will it come
ports to other languages as well? Maybe the actual communication is so
simple that it is trivial to do oneself (considering that the API is
somewhat similar to websockets if I understood it correctly)?

Thanks, Tomas

--
You received this message because you are subscribed to the Google
Groups Google App Engine group.
To post to this group, send email to
  google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com
  .
For more options, visit this group at
   http://groups.google.com/group/google-appengine?hl=en.

   --
   You received this message because you are subscribed to the Google
  Groups
   Google App Engine group.
   To post to this group, send email to google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com
  .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.

   --
   You received this message because you are subscribed to the Google Groups
   Google App Engine group.
   To post to this group, send email to google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com
  .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscrib...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Channel API outside browsers

2010-11-02 Thread Tomas Alaeus
I for one thought directly of games when I heard that the Channel API
were coming to AppEngine. However, all discussions and articles only
mentions a Javascript client running in a web browser. Will it come
ports to other languages as well? Maybe the actual communication is so
simple that it is trivial to do oneself (considering that the API is
somewhat similar to websockets if I understood it correctly)?

Thanks, Tomas

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: DB lmitations: how to use multiple criteria on many columns? URGENT!

2010-09-20 Thread Tomas Alaeus
I'm assuming that rooms and floor are integers, that is, you want the
entries which have rooms=3 and 4, and floor = 1 and 2. With this
assumption you one can construct a query which only have one
inequality:

SELECT * FROM house WHERE cost  5 AND cost  15 AND rooms IN
(3, 4) AND floor IN (1, 2)

Worth noting is that this query is actually executed as 4 queries (one
for each combination of IN-parameters). Apart from the additional
performance, AppEngine limits the number of subqueries like this to
25 (if I remember correctly). So you can't scale this to any number of
rooms/floors if you need to.

On 19 Sep, 08:11, GAE-framework.googlecode.com
anton.danilche...@gmail.com wrote:
 Hillo GAE developers!

 I have a serious situation with datastore. I need select data from
 model with multiple criteria. I have a House model, where exists
 fields: cost, rooms, floor. I need filter all houses, where cost 
 5 and  15, and also rooms  = 3 and  5, and also floor = 1
 and  3.

 How can I select this dataset? As I see, the Datastore says that I can
 use filter criteria with , , =, = and != only on one column. But I
 reallly need use this rules on multiple columns.

 Please, help me!!!
 How to implement my task with Datastore limitations?

 Thank you. I really need your help.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] content optimization?

2010-08-08 Thread Tomas
Hi,
I have recently noticed that App Engine optimizes content of my
application by compiling JavaScript (I suppose using Closure Compiler)
and including external CSS and JavaScript into the page. The App
Engine sometimes does this optimization and sometimes not, and I do
not understand under which conditions.

I would like to know how I can control this. Is there any
configuration parameter I can switch on or off?

Thanks,
Tomas

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: content optimization?

2010-08-08 Thread Tomas
Hi,

I am using Java. I am linking css and javascript files from a page and
when I looked at the code, all of that was embedded in the page plus
the javascript was compiled and html had whitespaces removed. Also,
images urls were rewritten and included http://1.2.3.9/bmi;,
sometimes 1.2.3.10 or 1.2.3.12 ...

I noticed that on the 5th August when I looked at the source code.
Actually some of my javascript threw an error when running on the
server while it worked locally. This is how I have found out for the
first time.

If I see it again, I will post the output here.

Tomas

On Aug 8, 1:06 pm, Tim Hoffman zutes...@gmail.com wrote:
 Hi

 I am using python, but to date have not seen any evidence of this sort
 of behaviour.

 Can you provide specific examples?

 T

 On Aug 7, 5:12 pm, Tomas t.vit...@gmail.com wrote:



  Hi,
  I have recently noticed that App Engine optimizes content of my
  application by compiling JavaScript (I suppose using Closure Compiler)
  and including external CSS and JavaScript into the page. The App
  Engine sometimes does this optimization and sometimes not, and I do
  not understand under which conditions.

  I would like to know how I can control this. Is there any
  configuration parameter I can switch on or off?

  Thanks,
  Tomas

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Help Blobstore!

2010-06-21 Thread Tomas Petersson
Hello, I made a simple app to evaluate App Engine and I solved it like this.
Hope it helps.

Cheers, Tomas



*JSP:*
img  src=/blobServe?blobKeyString=%= blobKey().getKeyString() %

*web.xml:*
servlet
servlet-nameblobServe/servlet-name
servlet-classappengine_eval.servlets.BlobServeServlet/servlet-class
/servlet
servlet-mapping
servlet-nameblobServe/servlet-name
url-pattern/blobServe/url-pattern
/servlet-mapping

*BlobServeServlet.java:*
package appengine_eval.servlets;

import java.io.IOException;
import java.util.logging.Logger;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.blobstore.BlobKey;
import com.google.appengine.api.blobstore.BlobstoreService;
import com.google.appengine.api.blobstore.BlobstoreServiceFactory;

public class BlobServeServlet extends HttpServlet {

private static final long serialVersionUID = 1L;

@SuppressWarnings(unused)
private static final Logger log =
Logger.getLogger(BlobServeServlet.class.getName());

private BlobstoreService blobstoreService =
BlobstoreServiceFactory.getBlobstoreService();

/**
 *
 */
@SuppressWarnings(unchecked)
public void doGet(HttpServletRequest request, HttpServletResponse
response) throws IOException {

BlobKey blobKey = new
BlobKey(request.getParameter(blobKeyString));
blobstoreService.serve(blobKey, response);

}

}

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Help Blobstore!

2010-06-21 Thread Tomas Petersson
Ahh, sorry Max , didnt notice it was python at a quick glance. I dont know
Python, but the principle is the same.
You have a class that generates the HTML for your page, you need a new class
similar to my servlet to do the actual serving of blobs.

If you do img src=/serve/{{ img.link }} /, the image (blob) will be
written to the same stream as the html, which wont work.
The html should load first, and when it is parsed the browser will make
another call to your new blob serving class to get the blob.

Hope my explanation makes sense :-)

/Tomas


On Mon, Jun 21, 2010 at 10:07, Massimiliano massimiliano.pietr...@gmail.com
 wrote:

 Hi Tomas,
 thank you very much, but I can't understand Java, as I know just Python.

 Regards

 Massimiliano

 2010/6/21 Tomas Petersson to...@petersson.net

 Hello, I made a simple app to evaluate App Engine and I solved it like
 this.
 Hope it helps.

 Cheers, Tomas



 *JSP:*
 img  src=/blobServe?blobKeyString=%= blobKey().getKeyString() %

 *web.xml:*
 servlet
 servlet-nameblobServe/servlet-name

 servlet-classappengine_eval.servlets.BlobServeServlet/servlet-class
 /servlet
 servlet-mapping
 servlet-nameblobServe/servlet-name
 url-pattern/blobServe/url-pattern
 /servlet-mapping

 *BlobServeServlet.java:*
 package appengine_eval.servlets;

 import java.io.IOException;
 import java.util.logging.Logger;

 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;

 import com.google.appengine.api.blobstore.BlobKey;
 import com.google.appengine.api.blobstore.BlobstoreService;
 import com.google.appengine.api.blobstore.BlobstoreServiceFactory;

 public class BlobServeServlet extends HttpServlet {

 private static final long serialVersionUID = 1L;

 @SuppressWarnings(unused)
 private static final Logger log =
 Logger.getLogger(BlobServeServlet.class.getName());

 private BlobstoreService blobstoreService =
 BlobstoreServiceFactory.getBlobstoreService();

 /**
  *
  */
 @SuppressWarnings(unchecked)
 public void doGet(HttpServletRequest request, HttpServletResponse
 response) throws IOException {

 BlobKey blobKey = new
 BlobKey(request.getParameter(blobKeyString));
 blobstoreService.serve(blobKey, response);


 }

 }

  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




 --

 My email: massimiliano.pietr...@gmail.com
 My Google Wave: massimiliano.pietr...@googlewave.com

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: I can only receiving mail from Gmail

2010-06-18 Thread Tomas Petersson
Thanks, you solved my problem! I was using getSender() instead of getFrom(),
I should have read the javadoc a bit closer...

I changed it to this which works fine:
InternetAddress address = null;
if (this.getFrom() != null) {
address = (InternetAddress) this.getFrom()[0];
} else if (this.getSender() != null) {
address = (InternetAddress) this.getSender();
}

*But I have one question: why does getFrom() return an array, can a
MimeMessage have more than one From header? I mean, an email can only be
sent from one address, right??
*
Cheers, Tomas

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[appengine-java] Re: error 500 from server when starting the guestbook demo app

2009-11-05 Thread Tomas

Yes it was the command search path that needed manual updating. Found
help here:
http://java.sun.com/javase/6/webnotes/install/jdk/install-windows.html

Keep up the good work !!
/Tomas


On Nov 5, 3:23 pm, Tomas tomasep...@gmail.com wrote:
 Hi Jason !
 The java files are there all right, it seems, and I very recently
 downloaded from SUN.
 The javac.exe file is located here on my system: C:\Program\Java
 \jdk1.6.0_16\bin
 However, opening the properties tab for the javac.exe file, and
 reading at 'location' it says: C:\Program Files\Java\jdk1.6.0_16\bin
 Difference is 'Program' versus' Program files'
 I guess it is all about search paths. I just don't know how to update/
 change it. My OS version is Vista SP2

 I ran the dev_appserver.cmd command from the command prompt (awaiting
 getting involved with Eclipse and any hang-ups from there) , and the
 server started up, but javac apparently didn't

 I also ran java commands from the command prompt:

 C:\Users\Tomasjava -version
 java version 1.6.0_16
 Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
 Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)

 C:\Users\Tomasjavac - version
 javac är inte ett internt kommando, externt kommando,
 program eller kommandofil.

 The swedish mumbo-jumbo translates into ~ Javac is not an internal
 command, external command, program, or command file

 Am I on the right track? If so, where do I learn how to fix search
 paths

 /Jumping up and down for an answer...Tomas
 =

 C:\Program Files\Java\jdk1.6.0_16\bin\javac.exe

 On Nov 4, 8:42 pm, Jason (Google) apija...@google.com wrote:



  It looks like your system may not have Java configured correctly or
  otherwise can't invoke the javac compiler needed to compile your
  application.

  java.io.IOException: Cannot run program javac.exe: CreateProcess error=2

  You may want to search the web for similar error messages, which might help
  you determine the source of the issue. Are you using the Eclipse plugin or
  the command line to start your app?

  - Jason

  On Mon, Nov 2, 2009 at 11:18 AM, Tomas tomasep...@gmail.com wrote:

   Hi I'm Tomas  - a newbe.

   I get error 500 from server when trying a demo application to
   according to instructions:
  http://code.google.com/appengine/docs/java/gettingstarted/installing
   Response from localserver:8080 look here:

  http://docs.google.com/Doc?docid=0Afhb3u6SCF24ZGN2cjN2cTNfM2ZwODkyN2Y...

   what' wrong?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[appengine-java] error 500 from server when starting the guestbook demo app

2009-11-02 Thread Tomas

Hi I'm Tomas  - a newbe.

I get error 500 from server when trying a demo application to
according to instructions: 
http://code.google.com/appengine/docs/java/gettingstarted/installing.html
Response from localserver:8080 look here:
http://docs.google.com/Doc?docid=0Afhb3u6SCF24ZGN2cjN2cTNfM2ZwODkyN2Yyhl=en

what' wrong?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[google-appengine] Re: Since 1.1.5 import cgi/urllib/traceback/etc fails (on MacOS)

2008-10-17 Thread Tomas

setting correct PYTHONPATH variable in .bashrc worked for me. I have
python from macports, so it was like this, you path might be
different:
PYTHONPATH=/opt/local/var/macports/software/python25/2.5.1_4+darwin_9/
opt/local/lib/python2.5

On Oct 6, 6:59 pm, Marzia Niccolai [EMAIL PROTECTED] wrote:
 Hi,

 What is the Python Path that you have in your launcher?

 Thanks,
 MarziaOn Sun, Oct 5, 2008 at 2:17 PM, Gijsbert [EMAIL PROTECTED] wrote:

  Hi,

  Since upgrading to GAE 1.1.5 my app stopped working, dev_appserver.py
  can't import cgi, urllib, traceback, etc:

  type 'exceptions.ImportError': No module named cgi
       args = ('No module named cgi',)
       message = 'No module named cgi

  Importing these from python2.5 shell works fine.

  It might be a MacOS (10.5.5) issue, I just ran the same app on my
  linux box and it works there (well, I could not import
  wsgiref.handlers any more, but changing to run_wsgi_app() made that
  import unnecessary).

  A fix would be awesome, since my linux box is old and cranky.

  Best regards,
  Gijsbert

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---