[google-appengine] Re: Why is GAE not popular?

2017-11-04 Thread timh
I would agree with Dave

Its is a very good platform.  I have been using it since 2008.
I think to get the most out of it, you have to invest some effort 
understanding how to use well.

The early adopters had to as there where really few scalable PAAS options 
then.

Now there are a lot more choices, however it still has some unmatched 
features like to autoscaling which is hard with a lot other solutions, but 
for many that isn't a major criteria.

The other big benefit is being a true PAAS and not having to manage 
OS/lower layers.  Again a lot of people don't see the value vs investment 
in knowledge.

T


On Wednesday, November 1, 2017 at 9:12:45 PM UTC+8, Dave Kuhn wrote:
>
> Hey Torsten, it's a great question. We're mystified too!
>
> As others have said, initially it was an odd platform. Major web 
> frameworks (e.g. Django, Spring etc) didn't originally work out of the box 
> for a variety of reasons including the lack of a SQL database, file size 
> limits, slow startup times and the Java class whitelist. That was a pretty 
> big hurdle to overcome for most developers. Thankfully Google's put a ton 
> of investment into the platform recently which has alleviated most, if not 
> all of the pain there.
>
> I work at an agency called 3wks which has built over 200 projects on it 
> over the last five years. In fact we work almost exclusively with GAE these 
> days. I suppose we've learned a little bit about the platform by now – and 
> we love it. It scales like a dream, not to mention it's super reliable. 
> We've built everything from major media sites to payments platforms on it. 
> Better still we haven't had to hire a single devops person in that whole 
> time.
>
> PM if you'd like to chat further.
>
> On Tuesday, October 24, 2017 at 12:03:33 AM UTC+11, Torsten Därr wrote:
>>
>> Hi, I'm not a web developer but I've been running websites for many years 
>> having them created by web development companies. I've been trying to find 
>> a good company that is familiar with Google App Engine because I do believe 
>> that the Google ecosystem is the right choice for my next sites and 
>> projects. Can you give me any idea as to how I can find a web developing 
>> company that has been using Google App Engine for a while successfully? 
>> Many thanks, Torsten
>>
>

-- 
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/75d15029-72c6-4489-bb5f-b86086a946a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Help me mail

2017-10-09 Thread timh
You could set up a relay proxy for SMTP running on a high port that 
connects to your customers SMTP server and connect to that.

T

On Friday, October 6, 2017 at 9:05:36 PM UTC+8, Karl Tinawi wrote:
>
> Hi George/all,
>
> We're a small startup and we've invested in Google Cloud infrastructure 
> for hosting our platform. We offer a B2B service and it is imperative for 
> our customers to send emails to their clients using our platform (thus 
> using their SMTP).
>
> We're at a critical juncture in our early days and this is a showstopper 
> for us. Our users need to be able to send emails from their mail servers 
> using SMTP, whether it be Gmail, Yahoo, FastMail, or whoever. Using 
> SendGrid or MailGun doesn't allow us to fulfil this requirement.
>
> There was a post from Paul Nash, here:
>
> https://googlecloudplatform.uservoice.com/forums/302595-compute-engine/suggestions/10079937-send-and-receive-email-using-tcp-smtp-imap-ports
> that suggested that we could request SMTP and IMAP ports to be unblocked?
>
> I'd be very grateful for any advice as I'm currently looking at all 
> possible alternatives as we need to go live with this pretty soon.
>
> Thank you kindly,
> Karl
>
> On Tuesday, August 8, 2017 at 3:12:20 PM UTC+1, George (Cloud Platform 
> Support) wrote:
>>
>> Google Compute Engine does not allow outbound connections on ports 25, 
>> 465, and 587. By default, these outbound SMTP ports are blocked because of 
>> the large amount of abuse these ports are susceptible to. You can find more 
>> information on how to send email from a VM and what services to use on the 
>> "Sending Email from an Instance" documentation page 
>> . 
>>
>

-- 
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/6aec80ee-e6a6-4a60-9168-b8cc840aabfa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: ? How to implement managed SSL for a pre-existing domain mapping.

2017-09-22 Thread timh
Hi Kamran


I have changed the CNAME to be ghs.googlehosted.com. and that did sort out 
the problem

Thanks for your help.

Regards

Tim Hoffman


On Tuesday, September 19, 2017 at 7:46:08 AM UTC+8, Kamran (Google Cloud 
Support) wrote:
>
>
> Hello Tim,
>
> It looks like that CNAME record of your domain is not correctly 
> configured. Please login to your domain registrar and modify the CNAME 
> record of your domain to point to *ghs.googlehosted.com 
> <http://ghs.googlehosted.com>.  *Right now I can see that it's configured 
> incorrectly pointing to ghs.google.com. 
>
> After updating the CNAME, it would take some time for DNS record to be 
> propagated and the managed security takes place.
>
> Sincerely,
>
>
> On Monday, September 18, 2017 at 7:04:07 PM UTC-4, timh wrote:
>>
>> Hi Lorne
>>
>> Here is the link  https://issuetracker.google.com/issues/65781183
>>
>> The DNS changed in cloud console on reverification, and our site is 
>> accessible using the name.
>>
>> So I don't have any evidence to suggest it didn't . 
>>
>> Regards
>>
>> Tim Hoffman 
>>
>>
>> On Tue, Sep 19, 2017 at 1:00 AM, 'Lorne Kligerman' via Google App Engine 
>> <google-a...@googlegroups.com > wrote:
>>
>>> Tim, are you sure your DNS records have been updated?
>>> Could you send me a link to the public issue you logged with more 
>>> details?
>>> Thanks!
>>>
>>> On Sunday, September 17, 2017 at 8:22:02 AM UTC-7, Mike Hardy wrote:
>>>>
>>>> Likewise. I posted it here 
>>>> <https://issuetracker.google.com/issues/65739097>.
>>>>
>>>> On Saturday, September 16, 2017 at 6:24:25 PM UTC-7, timh wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> Thanks have done so.
>>>>> Other than it not working there isn't much to report, there are no 
>>>>> error messages as such, just the forever spinning circle.
>>>>> The main bit of info will of course be the appid.
>>>>>
>>>>> Cheers
>>>>>
>>>>> T
>>>>>
>>>>>
>>>>> On Sunday, September 17, 2017 at 5:58:40 AM UTC+8, Kamran (Google 
>>>>> Cloud Support) wrote:
>>>>>>
>>>>>>
>>>>>> Hello Tim,
>>>>>>
>>>>>> I'd recommend filing an issue on Google Issue Tracker 
>>>>>> <https://developers.google.com/issue-tracker/> include reproduction 
>>>>>> steps, the error messages that you receive or a redacted screenshot of 
>>>>>> the 
>>>>>> error, your Project ID and any other information that could help us to 
>>>>>> investigate this issue further.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Saturday, September 16, 2017 at 12:47:38 AM UTC-4, timh wrote:
>>>>>>>
>>>>>>> So I re-verified the same domain which appeared to work.
>>>>>>> It's details now look different but everything still working.
>>>>>>>
>>>>>>> I then "Enable Managed Security", and it started to show 
>>>>>>> "Google-managed, 
>>>>>>> auto-renewing " under SSL Security.
>>>>>>> However an hour later the adjacent spinning gif is still spinning, 
>>>>>>> have disabled and tried again to no avail.
>>>>>>>
>>>>>>> Not sure how to progress now.
>>>>>>>
>>>>>>> T 
>>>>>>>
>>>>>>>
>>>>>>> On Saturday, September 16, 2017 at 11:24:31 AM UTC+8, timh wrote:
>>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> Managed SSL - fantastic.
>>>>>>>>
>>>>>>>> However I have an existing domain mapped, (for many years) and you 
>>>>>>>> don't seem to be able to add a certificate to this.
>>>>>>>>
>>>>>>>> Not sure what the strategy would be to resolve this without 
>>>>>>>> potential downtime for the domain.
>>>>>>>>
>>>>>>>> The only thing would be drop the existing domain mapping and 
>>>>>>>> re-add, but that will mean downtime for the service for that domain.
>>>>

Re: [google-appengine] Re: ? How to implement managed SSL for a pre-existing domain mapping.

2017-09-18 Thread timh
Just a bit more background

This site was mapped to a google apps domain back in September 2012, that 
is when the cname record as it currently is was set up.

Thanks

Tim


>

-- 
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/d3bd0f44-cf64-40e9-ba09-f5f354d6fa34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: ? How to implement managed SSL for a pre-existing domain mapping.

2017-09-16 Thread timh
Hi

Thanks have done so.
Other than it not working there isn't much to report, there are no error 
messages as such, just the forever spinning circle.
The main bit of info will of course be the appid.

Cheers

T


On Sunday, September 17, 2017 at 5:58:40 AM UTC+8, Kamran (Google Cloud 
Support) wrote:
>
>
> Hello Tim,
>
> I'd recommend filing an issue on Google Issue Tracker 
> <https://developers.google.com/issue-tracker/> include reproduction 
> steps, the error messages that you receive or a redacted screenshot of the 
> error, your Project ID and any other information that could help us to 
> investigate this issue further.
>
>
>
> On Saturday, September 16, 2017 at 12:47:38 AM UTC-4, timh wrote:
>>
>> So I re-verified the same domain which appeared to work.
>> It's details now look different but everything still working.
>>
>> I then "Enable Managed Security", and it started to show "Google-managed, 
>> auto-renewing " under SSL Security.
>> However an hour later the adjacent spinning gif is still spinning, have 
>> disabled and tried again to no avail.
>>
>> Not sure how to progress now.
>>
>> T 
>>
>>
>> On Saturday, September 16, 2017 at 11:24:31 AM UTC+8, timh wrote:
>>>
>>> Hi
>>>
>>> Managed SSL - fantastic.
>>>
>>> However I have an existing domain mapped, (for many years) and you don't 
>>> seem to be able to add a certificate to this.
>>>
>>> Not sure what the strategy would be to resolve this without potential 
>>> downtime for the domain.
>>>
>>> The only thing would be drop the existing domain mapping and re-add, but 
>>> that will mean downtime for the service for that domain.
>>>
>>> Any ideas on how one might approach this without the potential downtime ?
>>>
>>> Thanks
>>>
>>> Tim
>>>
>>

-- 
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/297fe0d2-fd52-47a1-b5b0-79c7793f36d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: ? How to implement managed SSL for a pre-existing domain mapping.

2017-09-15 Thread timh
So I re-verified the same domain which appeared to work.
It's details now look different but everything still working.

I then "Enable Managed Security", and it started to show "Google-managed, 
auto-renewing " under SSL Security.
However an hour later the adjacent spinning gif is still spinning, have 
disabled and tried again to no avail.

Not sure how to progress now.

T 


On Saturday, September 16, 2017 at 11:24:31 AM UTC+8, timh wrote:
>
> Hi
>
> Managed SSL - fantastic.
>
> However I have an existing domain mapped, (for many years) and you don't 
> seem to be able to add a certificate to this.
>
> Not sure what the strategy would be to resolve this without potential 
> downtime for the domain.
>
> The only thing would be drop the existing domain mapping and re-add, but 
> that will mean downtime for the service for that domain.
>
> Any ideas on how one might approach this without the potential downtime ?
>
> Thanks
>
> Tim
>

-- 
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/e662d942-dc6d-4f24-9025-ae52d9563245%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] ? How to implement managed SSL for a pre-existing domain mapping.

2017-09-15 Thread timh
Hi

Managed SSL - fantastic.

However I have an existing domain mapped, (for many years) and you don't 
seem to be able to add a certificate to this.

Not sure what the strategy would be to resolve this without potential 
downtime for the domain.

The only thing would be drop the existing domain mapping and re-add, but 
that will mean downtime for the service for that domain.

Any ideas on how one might approach this without the potential downtime ?

Thanks

Tim

-- 
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/0d1fc66d-6d7a-4ea4-b65a-ea03a67ed40a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Exceeded soft private memory limit of 128 MB with 128 MB after servicing 238 requests total

2017-07-31 Thread timh
This is generally indicative of a memory leak.  Are you sure something 
isn't hitting that url (for instance a series of redirects)



On Monday, July 31, 2017 at 12:03:22 AM UTC+8, Richard Cheesmar wrote:
>
> I am seeing more of these, these days.
>
> I just got the one above from a simple signup url that does nothing but 
> render a simple template with a form.
>
> How does that end up with 128MB and 238 requests in total? And as 
> described in the error how does 128MB exceed 128MB?
>
> It seems inconsistent to say the least, I don't normally get this from 
> signup urls but have found I'm getting quite a few on other urls but as I 
> said, it is not consistant.
>
> Is there something else I should be looking at?
>
>
>
>
>

-- 
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/e327f640-3813-42aa-af31-72ec399bc527%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] NSA on Python Frameworks ?

2017-04-08 Thread timh
I will chuck in my 2c worth ;-)

I prefer pyramid. (and chameleon)

T

On Thursday, April 6, 2017 at 6:02:36 PM UTC+8, Alex Martelli wrote:
>
>
>
> On Thu, Apr 6, 2017 at 8:10 AM, Johan Mutsaerts  > wrote:
>
>> Thanks Alex, 
>>
>> Great you concur on GAE & Python as good choices for the enterprise web 
>> application developer's toolkit (perhaps a good title for a new book?).
>> You seem to be in favor of a best of breed approach in separating 
>> template engine and framework, which eliminates the need for heavy lifting 
>> of full frameworks (like Django) in favor of leaner (faster) frameworks ? 
>>
>
> Yes, jinja2 (while similar to Django templates) is superior, there's no 
> need to compromise on the templating front.
>  
>
>> I find it difficult to sort candidates in terms of obsolescence, 
>> popularity (community support), feature set, learning curve, GAE 
>> compatibility ... e.g.: pylons, pyramid ? webapp2, wbe2py ? jinja2, mako ? 
>> bottle, flask ? 
>>
>
> Django's by far the most popular Python web framework -- 1.7M web hits for 
> a search [python django]. jinja2's also popular, but just 380k hits; flask, 
> 570k. You can do more searches if you want to base your choice on 
> popularity. Other indications is that there are conferences entirely 
> devoted to Django but not ones entirely about other Python web frameworks.
>  
>
>> Is Django really the only framework for developers 'on a deadline' ? on 
>> GAE ? using NDB ? If I read you right, your preference goes to Flask and 
>> Jinja2 ? Can you elaborate a bit on the why's ? 
>>
>
> jinja2 gives me complete, accurate control of templating -- I'd never 
> downgrade to any other templating system (if I am templating server-side at 
> all -- these days it's often better to write the server side as a REST or 
> other API server, and do all the UI work, templating or otherwise, on the 
> Javascript client side on the browser).
>
> As for the framework (templating apart), I think flask is objectively 
> superior, with a sharp and simple, though powerful, architecture. However 
> personally I'm more used to webapp2, having used it for years, so if I'm 
> doing a simple web app I'm more likely to reach for it -- habit's a 
> powerful force:-). In any case, it will be a lightweight system because I 
> don't have to "buy into" lots of architectural and design choices imbued in 
> a rich/heavy framework, but rather can make my own choices depending on 
> where I'm going to deploy and what (if anything) I need to optimize for. 
> (Often, e.g for an internal dashboard which will have a few dozen users at 
> most, there's no optimization needed at all -- then I can emphasize 
> simplicity and speed of deployment -- just as an example).
>  
>
>>
>> Good luck with the book and the conference. 
>>
>
> Thanks,
>
> Alex
>
>  
>
>> TIA, Johan
>>
>>
>> Op woensdag 5 april 2017 17:48:04 UTC+2 schreef Alex Martelli:
>>>
>>> Of course these questions are quite connected with personal opinion, and 
>>> since I'm the author of "Python in a Nutshell" (3rd edition due out any day 
>>> now), you can guess where my bias lies:-). Still, FWIW, here are my 
>>> opinions (hope others chime in!-)...:
>>>
>>> On Wed, Apr 5, 2017 at 8:21 AM, Johan Mutsaerts  
>>> wrote:
>>>
 Hi, 

 Starting your own company is never easy. A dream and a good idea is 
 needed but not sufficient. In my case, enterprise software development 
 skills for non-web applications need to be brushed up, so careful choices 
 to be made:
 1. GAE PaaS : AFAIK great value for little money, it simply works, 
 always, anywhere, no need for sysops

>>>
>>> I concur (but I'm biased on this one too:-).
>>>  
>>>
 2. Python : AFAIK highest productivity language, modular, functional, 
 object-oriented, popular 

>>>
>>> Ditto (in fact I'm right now in Florence, Italy, about to present a 
>>> keynote at Pycon Italia Otto on Friday:-).
>>>  
>>>
 3. Framework ? web2py, pyramid, django, web2app, jinja2 ? I need high 
 productivity, efficient use of Datastore noSQL, MVC ?, templates, 
 scaffolding, boilerplate code generation ...  

>>>
>>> My bias here is for *lightweight* frameworks, of which Flask is the most 
>>> popular (webapp2, bottle and falcon are fine too) -- I devote an entire 
>>> chapter in the Nutshell 3rd ed to these four frameworks (templating, esp. 
>>> jinjia2 which works well with them all but especially Flask, is another 
>>> chapter -- no sense to have templating as PART of a framework, any more 
>>> than it would to have the kitchen sink in there, IMNSHO:-).
>>>
>>> I've wasted too much time in my life debugging boilerplate code 
>>> resulting from code generation: nowadays I insist on writing the code 
>>> myself in the first place (less likely to need debugging, and if it does at 
>>> least I should know why I coded the way I did, right?-). For Datastore 
>>> access, I use ndb (comes with 

Re: [google-appengine] Re: Is there something like a "back_off" for ndb.transaction's?

2016-10-30 Thread timh
Consider using a roll forward model with tasks ensuring the transactions 
complete.

There is an old article by Nick Johnson covering the approach and I have 
used it to ensure reliable completion of a set of transactions (and that 
was in the day of 1min task deadline)

http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine

T

On Saturday, October 29, 2016 at 11:43:46 PM UTC+8, Kaan Soral wrote:
>
> My initial problem with push queues was that they were using their retries 
> completely internally, so once you get them to do "infinite retries", the 
> losses became 0%
>
> The problem with pull queues was throughput, sadly, pull queues are much 
> better aimed to battle contention, especially when used together with
>
> *Ps. I assume, for my original problem, manual retrying is the simplest 
> solution*
>
> What kind of a method with push queues do you use to solve the contention 
> issue tho?
> I forgot my original method that used only push queues, my current method 
> uses pull queues for tasks, and push queues for processing, there are 
> delays, there are losses (it's always an ongoing battle), that's why with 
> my new project, I just kept it strictly to simple transactions
>
> On Saturday, October 29, 2016 at 6:19:34 PM UTC+3, PK wrote:
>>
>> I have found  push task queues very reliable and use them all the time. 
>>
>> PK
>> http://www.gae123.com
>>
>> On Oct 29, 2016, at 7:29 AM, Kaan Soral  wrote:
>>
>> Thanks for sharing retrying, indeed it's pretty interesting
>>
>> My situation is pretty unique, that's why there are usually 3 consecutive 
>> requests in the worst case and at most 5-6, that's why an architecture 
>> change is an overkill
>>
>> I had a lot of experience with both push queue and pull queue based 
>> solutions in the past, and I can safely say that, "better let them content"
>>
>> In my opinion, both pull queues and push queues are extremely unreliable, 
>> so on this project, I made it so that the occasional contention is safe to 
>> occur
>>
>> However, I hoped with retries=6 the transactions would untangle them on 
>> their own, but they don't
>>
>> -- 
>> 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-appengi...@googlegroups.com.
>> To post to this group, send email to google-a...@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/64683751-e390-4f16-ad0c-ec4a94246256%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>

-- 
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/3d245479-a476-4aba-8fef-d7fc8ebedaf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Is there something like a "back_off" for ndb.transaction's?

2016-10-28 Thread timh
retrying https://pypi.python.org/pypi/retrying/1.3.3 provides decorators 
for different type of backoff retry scenarios.

However I would look at you data model to see why you  have such contention 
and what changes you could make to minimise this.

If you can't may also want to consider using a pull queue and use tasks to 
process the transactions

T


On Saturday, October 29, 2016 at 11:10:34 AM UTC+8, Kaan Soral wrote:
>
> Often, when 3-4 transaction's hit my app at the same time, even with 
> retries=6, they cause a contention exception
>
> My custom solution to the issue would be, use retries=0, but manually 
> implement a retry logic, like, sleep a random amount of time, retry
>
> So basically, when 3-4 transaction's occur consecutively, this solution 
> would un-tangle them under 60 seconds (assumption)
>
> I'm just wondering whether this is a good solution and whether there is an 
> existent solution I'm missing, basically, I want to be able to handle 5 
> consecutive transaction's
>

-- 
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/5e3ac51f-f964-45dd-8477-a795a4e5c640%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: project with python and node services: inconsistent data

2016-06-08 Thread timh
Are you getting that data via a query or via key using get,
If you are using a query then you will need to start reading up on Eventual 
consistancy

T

On Wednesday, June 8, 2016 at 4:33:15 PM UTC+8, Faried Nawaz wrote:
>
> Hello,
>
> I have a Python application deployed as my App Engine project's default 
> service.  I also have a node service deployed in the same project for 
> long-running tasks (uploads of large files to GCS).  After a file is 
> uploaded, the node code updates an existing Datastore object with the path 
> to the file on GCS.
>
> I've noticed that if I fetch the object from the Python service after the 
> update, I don't always get the latest data.  Other than by sprinkling 
> use_cache=False, 
> use_memcache=False in a bunch of places on the Python side (and taking a 
> performance hit), how can I work around this problem?  Is there any way for 
> the node service to flush or update the object in memcache?  I use ndb on 
> the Python side.
>
>
> Faried.
>

-- 
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/c7772174-bfb8-49c3-af36-a75e457a96bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Reading existing entity from DB

2016-01-28 Thread timh
Having a unique id that is only a property and not the key of the entity 
makes it hard.
Are you generating the ID - is it sequential, or just unique (ie an email 
address) if the later, you could reliably use a combination of transactions 
and a child entity with a key of the unique id, and the ancestors key).

You don't even have store any data.

This can be reliable as you are able to use get operations in a transaction.

Anything entity you fetch by a query (unless it's an ancestor query) will 
be liable to eventual consistancy issues.

T

On Wednesday, January 27, 2016 at 7:39:54 PM UTC+8, Louise Elmose Hedegaard 
wrote:
>
>
> Hi,
>
> I have an issue with too many entities being created in my GAE datastore. 
>
> I have an unique id on an entity (which is not the key in this case), and 
> there should thus only be one entity in the datastore per unique id.
> When an entity is updated or created by the user, I check whether the 
> entity already exists in the DB, and only create a new entity, if there is 
> not already an existing entity with a matching id. If there is an existing 
> entity, I update the parameters of the entity.
> This logic should ensure that there is only one entry/entity per unique 
> id, but somehow several entities with the same id are created in the DB - I 
> do not understand how/why!
>
> When I look at this page 
> https://cloud.google.com/appengine/docs/java/datastore/entities#Java_Updating_an_entity
>  
> is says "You can use a transaction 
>  to 
> test whether an entity with a given key exists before creating one.".
>
> Do I really need to use transactions to validate whether there is an 
> existing entity with a given id, or does that only apply when you use the 
> key as primary key??
>
> Thanks,
> -Louise
>

-- 
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/fc9c1861-f446-42fe-8fbb-bbd884ed5be1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Developing with app engine with no internet

2016-01-23 Thread timh
Yes you can develop off line.

I suggest you start by reading the docs, and the getting started section.

However if you really mean off line, then many of the libraries and tools 
you will probably need will need to be downloaded before you go off line.

T

On Sunday, January 24, 2016 at 3:53:58 AM UTC+8, David Williams wrote:
>
> is Google App engine designed in a way that makes offline development easy?
>
> Its usually pretty simple to install mysql and php on a computer.
> develop the app, then transfer.
>
> I do not have internet.
>
> Is there any way to develop for app engine?
>
> Sounds really cool!!!
>
> also what is the story on databases with google app engine??
>
> Thats pretty cool you can run a website with a java program.. thats the 
> idea right?
>

-- 
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/9859f4cf-0138-4500-9605-51eaf0398caa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Having lost all my data

2016-01-11 Thread timh
Any bot could have done crawled /setup on your site.

Such a handler should have at least been protected with admin required 
permission. 

 If the handler has been there for some time then it was always a ticking 
time bomb.

I would say your lucky it hadn't happened earlier.

I didn't read Jeff response as being angry, just stating the facts.

T 

On Monday, January 11, 2016 at 6:31:01 PM UTC+8, Emilio Sanchez wrote:
>
> Schnitzer,
> I did'nt misconfigured anything.
> You don't need to be so angry if you don't read my posts :
> Google killed me as far as Google bot crawled /setup relative link which 
> is pointed by nothing on the net (according to Google itself).
> Google killed me introducing its dagger in a vulnerability of Vosao which 
> was the only CMS working in Java GAE Platform.
>
> and you ? are you a killer too ?
>
> well, Google just killed me ! 
>
>
>
>
>
>
>
>
>
>

-- 
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/49f6cf53-3e76-469d-a85b-f2873e331373%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: unable to use remote_api_shell and bulkloader (all dependent on remote api) with 1.9.30 SDK.

2016-01-03 Thread timh
Hi Adam

I figured the problem had to be something like that, however there current 
docs don't even mention *download_data* at all, and the error you get from 
appcfg if you haven't logged in with gcloud suggests you need to set 
GOOGLE_APPLICATION_CREDENTIALS and refer to the docs for setting up an 
default application service account.  That section does talk about gcloud 
as one of 5 options.  Though reading through this the application service 
account seems on the face of the most appropriate choice.

Historically any account with developer status could download the data 
using appcfg (in because it only required admin access and in the early 
days you even had your own handler), and as you said the owner could only 
download the app. 

Somewhat misleading ';-)

Cheers

Tim

On Monday, January 4, 2016 at 3:24:15 AM UTC+8, Adam (Cloud Platform 
Support) wrote:
>
> The permissions for download_app and download_data are restricted to the 
> uploader of the application and the project owners. This is mentioned in 
> the Python docs 
> <https://cloud.google.com/appengine/docs/python/tools/uploadinganapp?hl=en> 
> but not the Java docs. Also in order to use a service account with with 
> gcloud 
> auth activate-service-account 
> <https://cloud.google.com/sdk/gcloud/reference/auth/activate-service-account>,
>  
> you need to export the key file, but you can only export key files for 
> service accounts you create and not the application's default credentials. 
> These service accounts can only have view or edit permissions, but not 
> owner.
>
> On Sunday, January 3, 2016 at 4:47:27 AM UTC-5, timh wrote:
>>
>> Hi
>>
>> I haven't had to use the remote_api for some time, and now need to use 
>> the bulkloader and remote_api_shell.  (Appengine app was first deployed in 
>> 2012)
>>
>>  However utilising the current SDK 1.9.30 and after creating service 
>> accounts, it seems that there is an ongoing problem with authentication .'
>>
>> I get the following when trying use download_data 
>>
>> [DEBUG   ] [WorkerThread-0] WorkerThread: started
>> 2016-01-03 15:01:19,810 INFO client.py:539 Attempting refresh to obtain 
>> initial access_token 
>> 2016-01-03 15:01:20,118 INFO client.py:797 Refreshing access_token 
>> 2016-01-03 15:01:21,733 INFO client.py:571 Refreshing due to a 401 
>> (attempt 1/2) 
>> 2016-01-03 15:01:22,040 INFO client.py:797 Refreshing access_token 
>> 2016-01-03 15:01:23,101 INFO client.py:571 Refreshing due to a 401 
>> (attempt 2/2) 
>> 2016-01-03 15:01:23,415 INFO client.py:797 Refreshing access_token 
>>
>> repeated infinitely.
>>
>> I have tried multiple variations and using the remote_api_shell, which 
>> eventually times out with to many failed attempts.
>>
>> Following the docs on the Creating an Application Default Credentials and 
>> the only type of account that has a correctly formatted json credential 
>> file is a "Application Service Account"
>>
>> The permissions are "Edit" for the Service Account.
>>
>> (Note the docs are incorrect as far the cloud console sections, for 
>> instance it refers to "APIs & Auth" however that section is called "API 
>> Manager"
>>
>> I am only using the "builtin" remote api definition.
>>
>> Has anyone been able to use the remote_api_shell with recent SDK's ?
>>
>> Any thoughts.
>>  
>>
>> Cheers
>>
>> Tim
>>
>

-- 
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/5cbd9cad-bc88-4007-b30d-fea367bf1419%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] unable to use remote_api_shell and bulkloader (all dependent on remote api) with 1.9.30 SDK.

2016-01-03 Thread timh
Hi

I haven't had to use the remote_api for some time, and now need to use the 
bulkloader and remote_api_shell.  (Appengine app was first deployed in 2012)

 However utilising the current SDK 1.9.30 and after creating service 
accounts, it seems that there is an ongoing problem with authentication .'

I get the following when trying use download_data 

[DEBUG   ] [WorkerThread-0] WorkerThread: started
2016-01-03 15:01:19,810 INFO client.py:539 Attempting refresh to obtain 
initial access_token 
2016-01-03 15:01:20,118 INFO client.py:797 Refreshing access_token 
2016-01-03 15:01:21,733 INFO client.py:571 Refreshing due to a 401 (attempt 
1/2) 
2016-01-03 15:01:22,040 INFO client.py:797 Refreshing access_token 
2016-01-03 15:01:23,101 INFO client.py:571 Refreshing due to a 401 (attempt 
2/2) 
2016-01-03 15:01:23,415 INFO client.py:797 Refreshing access_token 

repeated infinitely.

I have tried multiple variations and using the remote_api_shell, which 
eventually times out with to many failed attempts.

Following the docs on the Creating an Application Default Credentials and 
the only type of account that has a correctly formatted json credential 
file is a "Application Service Account"

The permissions are "Edit" for the Service Account.

(Note the docs are incorrect as far the cloud console sections, for 
instance it refers to "APIs & Auth" however that section is called "API 
Manager"

I am only using the "builtin" remote api definition.

Has anyone been able to use the remote_api_shell with recent SDK's ?

Any thoughts.
 

Cheers

Tim

-- 
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/1ce4508b-c1a5-47d9-b65f-86d782d02505%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: unable to use remote_api_shell and bulkloader (all dependent on remote api) with 1.9.30 SDK.

2016-01-03 Thread timh
Hmm did some searching, and after further testing found that I could get 
both appcfg download_data and remote_api_shell to work by using  gcloud 
login, 
but no amount of effort seems to get an application service account working 
as outlined 
https://developers.google.com/identity/protocols/application-default-credentials
 

T


On Sunday, January 3, 2016 at 5:47:27 PM UTC+8, timh wrote:
>
> Hi
>
> I haven't had to use the remote_api for some time, and now need to use the 
> bulkloader and remote_api_shell.  (Appengine app was first deployed in 2012)
>
>  However utilising the current SDK 1.9.30 and after creating service 
> accounts, it seems that there is an ongoing problem with authentication .'
>
> I get the following when trying use download_data 
>
> [DEBUG   ] [WorkerThread-0] WorkerThread: started
> 2016-01-03 15:01:19,810 INFO client.py:539 Attempting refresh to obtain 
> initial access_token 
> 2016-01-03 15:01:20,118 INFO client.py:797 Refreshing access_token 
> 2016-01-03 15:01:21,733 INFO client.py:571 Refreshing due to a 401 
> (attempt 1/2) 
> 2016-01-03 15:01:22,040 INFO client.py:797 Refreshing access_token 
> 2016-01-03 15:01:23,101 INFO client.py:571 Refreshing due to a 401 
> (attempt 2/2) 
> 2016-01-03 15:01:23,415 INFO client.py:797 Refreshing access_token 
>
> repeated infinitely.
>
> I have tried multiple variations and using the remote_api_shell, which 
> eventually times out with to many failed attempts.
>
> Following the docs on the Creating an Application Default Credentials and 
> the only type of account that has a correctly formatted json credential 
> file is a "Application Service Account"
>
> The permissions are "Edit" for the Service Account.
>
> (Note the docs are incorrect as far the cloud console sections, for 
> instance it refers to "APIs & Auth" however that section is called "API 
> Manager"
>
> I am only using the "builtin" remote api definition.
>
> Has anyone been able to use the remote_api_shell with recent SDK's ?
>
> Any thoughts.
>  
>
> Cheers
>
> Tim
>

-- 
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/226e0c30-2777-418a-9771-036e8f52eea0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Data Modeling help for simple messaging

2015-12-30 Thread timh
I was asking about the x 3.  If you are only updating the hasRead property 
then your only 1 + 4 writes.

hasRead appears to be the only property you are updating, hence modifying 
the index.

T

  

On Thursday, December 31, 2015 at 6:12:43 AM UTC+8, Susan Lin wrote:
>
> To update an entity the costs is 1 write + 4 writes per modified index 
> property.
>
> On Tuesday, December 29, 2015 at 4:30:14 PM UTC-8, timh wrote:
>>
>> From your description "When the message has been seen for the first time 
>> I would go to the message (1 get) and update the entity (1 write + (4 
>> writes x 3) = 13 writes to update the entity)."  I am having trouble 
>> working out where you get the "(4 writes x 3)" when updating a single 
>> message as "hasRead"
>>
>> T
>>
>> On Wednesday, December 30, 2015 at 1:31:31 AM UTC+8, Susan Lin wrote:
>>>
>>> Overall, read/write costs in Google Datastore are completely 
>>> deterministic. I don't believe it would be very efficient for me to 
>>> implement something which I already know would be too expensive. I have 
>>> just outlined some ideas which could meet the requirement, but they are too 
>>> expensive for me.
>>>
>>> Yes, users need to be able to read old messages (in batches of 10 at a 
>>> time). This I think is my biggest issue. How to efficiently model the 
>>> messages to be able to be retrieved and modified (updated to the hasRead 
>>> attribute) efficiently.
>>>
>>> On Monday, December 28, 2015 at 10:04:32 PM UTC-8, timh wrote:
>>>>
>>>> To be honest.
>>>>
>>>> I would try a niave implementation and deal with how you will 
>>>> fetch/send/receive information and how you plan to implement your 
>>>> workflows.
>>>> Then profile the application and then start looking at how you might 
>>>> optimise things.
>>>>
>>>> Doing things like "I then thought of creating an entity to store all 
>>>> the sent/received messages in a string for a user inside of a single 
>>>> entity" means you can't scale the number of messages without dealing with 
>>>> overflows, and will people read old messages.  If not then retrieving that 
>>>> single growing entity may cost you more than the writes (in terms of time, 
>>>> cache hit ratios etc)).  Trying to optimise things before you have working 
>>>> code is possibly not the best way to approach development.
>>>>
>>>>
>>>> T
>>>>
>>>> On Tuesday, December 29, 2015 at 12:29:48 PM UTC+8, Susan Lin wrote:
>>>>>
>>>>> I have a very simple requirement. I have an application where users 
>>>>> log in, add/remove/view friends, and can send/receive (also view the 
>>>>> message you sent and received) a message (message is more like an email, 
>>>>> not a real time chat) from a friend. When they receive the message, the 
>>>>> application needs to mark the message as 'read'. The messages must also 
>>>>> come ordered by newest to oldest.
>>>>>
>>>>> My thoughts:
>>>>>
>>>>> KINDS:
>>>>>
>>>>>
>>>>> USER
>>>>> username  (ID)
>>>>> password 
>>>>> friends  (will contain a max of 
>>>>> 100 friends).
>>>>>
>>>>> MESSAGE
>>>>> msg_id  (ID)
>>>>> from  (indexed)
>>>>> to  (indexed)
>>>>> timestamp (indexed)
>>>>> msg
>>>>> hasRead
>>>>>
>>>>>
>>>>> 1) User would login using their username and password
>>>>> 2) User could get friends by getting their USER entity based on their 
>>>>> username
>>>>> 3) User could add/remove friends by getting the entity of user1 and 
>>>>> user2 and either adding or removing friend via transaction to make sure 
>>>>> they are consistent,
>>>>> 4) User could get all the message they have sent by using indexing the 
>>>>> the 'from' attribute (limit of 10 message per request). The same could be 
>>>>> done to view all the messages they have received by using the 'to' 
>>>>> attribute. When the message has been seen for the first time I would go 
>>>>> to 
>>>>> the message (1 get) and update the entity (1 write + (4 writes x 3) = 13 
>>>>>

[google-appengine] Re: Data Modeling help for simple messaging

2015-12-29 Thread timh
>From your description "When the message has been seen for the first time I 
would go to the message (1 get) and update the entity (1 write + (4 writes 
x 3) = 13 writes to update the entity)."  I am having trouble working out 
where you get the "(4 writes x 3)" when updating a single message as 
"hasRead"

T

On Wednesday, December 30, 2015 at 1:31:31 AM UTC+8, Susan Lin wrote:
>
> Overall, read/write costs in Google Datastore are completely 
> deterministic. I don't believe it would be very efficient for me to 
> implement something which I already know would be too expensive. I have 
> just outlined some ideas which could meet the requirement, but they are too 
> expensive for me.
>
> Yes, users need to be able to read old messages (in batches of 10 at a 
> time). This I think is my biggest issue. How to efficiently model the 
> messages to be able to be retrieved and modified (updated to the hasRead 
> attribute) efficiently.
>
> On Monday, December 28, 2015 at 10:04:32 PM UTC-8, timh wrote:
>>
>> To be honest.
>>
>> I would try a niave implementation and deal with how you will 
>> fetch/send/receive information and how you plan to implement your workflows.
>> Then profile the application and then start looking at how you might 
>> optimise things.
>>
>> Doing things like "I then thought of creating an entity to store all the 
>> sent/received messages in a string for a user inside of a single entity" 
>> means you can't scale the number of messages without dealing with 
>> overflows, and will people read old messages.  If not then retrieving that 
>> single growing entity may cost you more than the writes (in terms of time, 
>> cache hit ratios etc)).  Trying to optimise things before you have working 
>> code is possibly not the best way to approach development.
>>
>>
>> T
>>
>> On Tuesday, December 29, 2015 at 12:29:48 PM UTC+8, Susan Lin wrote:
>>>
>>> I have a very simple requirement. I have an application where users log 
>>> in, add/remove/view friends, and can send/receive (also view the message 
>>> you sent and received) a message (message is more like an email, not a real 
>>> time chat) from a friend. When they receive the message, the application 
>>> needs to mark the message as 'read'. The messages must also come ordered by 
>>> newest to oldest.
>>>
>>> My thoughts:
>>>
>>> KINDS:
>>>
>>>
>>> USER
>>> username  (ID)
>>> password 
>>> friends  (will contain a max of 100 
>>> friends).
>>>
>>> MESSAGE
>>> msg_id  (ID)
>>> from  (indexed)
>>> to  (indexed)
>>> timestamp (indexed)
>>> msg
>>> hasRead
>>>
>>>
>>> 1) User would login using their username and password
>>> 2) User could get friends by getting their USER entity based on their 
>>> username
>>> 3) User could add/remove friends by getting the entity of user1 and 
>>> user2 and either adding or removing friend via transaction to make sure 
>>> they are consistent,
>>> 4) User could get all the message they have sent by using indexing the 
>>> the 'from' attribute (limit of 10 message per request). The same could be 
>>> done to view all the messages they have received by using the 'to' 
>>> attribute. When the message has been seen for the first time I would go to 
>>> the message (1 get) and update the entity (1 write + (4 writes x 3) = 13 
>>> writes to update the entity).
>>>  
>>> My major concern - If a user gets 10 messages, this will require 10 get 
>>> requests plus if all 10 messages are new I will need to update each entity 
>>> and if all of them are new that is (10 x 14) 140 writes. Then if I get 
>>> another 10 message for this user the same process and this could all add up 
>>> very quickly.
>>>
>>>
>>> I then thought of creating an entity to store all the sent/received 
>>> messages in a string for a user inside of a single entity:
>>>
>>> MESSAGE
>>> user_entitynum1  (ID)
>>> messages >> msg2_touser8_read_timestamp, msg3_touser5_unread_timestamp, etc>
>>>
>>> This way I could store all the message (under 1mb) inside of this one 
>>> entity, but I would have to keep track of which entity each user is at (if 
>>> the user exceeds the 1mb limit I will have to create a new entity).  This 
>>> proved to also not be too efficient because if I send a message to perform 
>>> 2 gets t

[google-appengine] Re: Data Modeling help for simple messaging

2015-12-28 Thread timh
To be honest.

I would try a niave implementation and deal with how you will 
fetch/send/receive information and how you plan to implement your workflows.
Then profile the application and then start looking at how you might 
optimise things.

Doing things like "I then thought of creating an entity to store all the 
sent/received messages in a string for a user inside of a single entity" 
means you can't scale the number of messages without dealing with 
overflows, and will people read old messages.  If not then retrieving that 
single growing entity may cost you more than the writes (in terms of time, 
cache hit ratios etc)).  Trying to optimise things before you have working 
code is possibly not the best way to approach development.


T

On Tuesday, December 29, 2015 at 12:29:48 PM UTC+8, Susan Lin wrote:
>
> I have a very simple requirement. I have an application where users log 
> in, add/remove/view friends, and can send/receive (also view the message 
> you sent and received) a message (message is more like an email, not a real 
> time chat) from a friend. When they receive the message, the application 
> needs to mark the message as 'read'. The messages must also come ordered by 
> newest to oldest.
>
> My thoughts:
>
> KINDS:
>
>
> USER
> username  (ID)
> password 
> friends  (will contain a max of 100 
> friends).
>
> MESSAGE
> msg_id  (ID)
> from  (indexed)
> to  (indexed)
> timestamp (indexed)
> msg
> hasRead
>
>
> 1) User would login using their username and password
> 2) User could get friends by getting their USER entity based on their 
> username
> 3) User could add/remove friends by getting the entity of user1 and user2 
> and either adding or removing friend via transaction to make sure they are 
> consistent,
> 4) User could get all the message they have sent by using indexing the the 
> 'from' attribute (limit of 10 message per request). The same could be done 
> to view all the messages they have received by using the 'to' attribute. 
> When the message has been seen for the first time I would go to the message 
> (1 get) and update the entity (1 write + (4 writes x 3) = 13 writes to 
> update the entity).
>  
> My major concern - If a user gets 10 messages, this will require 10 get 
> requests plus if all 10 messages are new I will need to update each entity 
> and if all of them are new that is (10 x 14) 140 writes. Then if I get 
> another 10 message for this user the same process and this could all add up 
> very quickly.
>
>
> I then thought of creating an entity to store all the sent/received 
> messages in a string for a user inside of a single entity:
>
> MESSAGE
> user_entitynum1  (ID)
> messages  msg2_touser8_read_timestamp, msg3_touser5_unread_timestamp, etc>
>
> This way I could store all the message (under 1mb) inside of this one 
> entity, but I would have to keep track of which entity each user is at (if 
> the user exceeds the 1mb limit I will have to create a new entity).  This 
> proved to also not be too efficient because if I send a message to perform 
> 2 gets to see which message entity I am currently at and which message 
> entity they are currently at. From there I must now use another 2 reads to 
> get those entities and another 4 writes to update them both (considering I 
> do not need to create another entity if it is full). 
>
>
> I was looking for any ideas to accomplish what I need in a more efficient 
> way. I have nothing implemented yet so I  am open to ANY ideas. My main 
> concern is for this to be efficient,
>
> Cheers!
>
>
>

-- 
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/e5e1e5f6-3875-4590-b26e-fdfeff728253%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Tweepy Help

2015-12-26 Thread timh
In addition to what @Adam said, you should include what the error is rather 
than " always end up getting errors"  

T

On Friday, December 25, 2015 at 5:34:31 PM UTC+8, Prasanna Mestha wrote:
>
> Hi,
> I am new to app engine and tweepy so as when i created a simple app, i 
> always end up getting errors. How can i search for tweets in app engine?
>
> import tweepy
>
> auth = tweepy.OAuthHandler('kljaYhxWqM2LBqUQdbY1X4H0V', 
> 'ANkoqZx6bx65CSDITfVeFrhSahqst4TsbBrLVZWSlSaMUaJBYQ')
> auth.set_access_token('622919352-nrH1LzNOmdn2VI62M9oZJT6dJA1GMBiZBJaypRrE', 
> 'pxr36RyGuCHaIWluqtWENnB05sNGi0u20GdyH17Xw1fQQ')
>
> api = tweepy.API(auth)
>
> public_tweets = api.home_timeline()
> for tweet in public_tweets:
> print tweet.text
>
>
> 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/8b47b39d-3357-489a-9c1f-6f02548cafb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Visual Basic Programmer - should I use Python, Java, PHP or GO

2015-11-19 Thread timh
python is strongly typed and dynamically typed.



On Wednesday, November 18, 2015 at 5:10:01 AM UTC+8, Alistair Burrowes 
wrote:
>
> Python and VB syntax may look similar but the languages are quite 
> different. VB is strongly typed and python is dynamic. I would say Go is 
> closed to VB than python.
>
> On Tuesday, November 17, 2015 at 4:59:35 PM UTC+11, didinj wrote:
>>
>> Python more human readable that closely to VB.
>>
>>
>> Thanks,
>> Didin
>>
>> 2015-11-17 4:08 GMT+07:00 Alistair Burrowes :
>>
>>> Java is the most similar to vb.net . c# and java are quite similar and 
>>> vb is basically an alternative syntax to c#.
>>>
>>> --
>>> 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-appengi...@googlegroups.com.
>>> To post to this group, send email to google-a...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/google-appengine.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/google-appengine/f7639fed-cef0-480b-aa39-1b55a44ccf78%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/20c8ebab-fb9b-4d68-9c11-10c9001482db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Visual Basic Programmer - should I use Python, Java, PHP or GO

2015-11-19 Thread timh
and if Option Strict Off 

then vb.net i weakly typed.



On Thursday, November 19, 2015 at 7:06:45 PM UTC+8, timh wrote:
>
> python is strongly typed and dynamically typed.
>
>
>
> On Wednesday, November 18, 2015 at 5:10:01 AM UTC+8, Alistair Burrowes 
> wrote:
>>
>> Python and VB syntax may look similar but the languages are quite 
>> different. VB is strongly typed and python is dynamic. I would say Go is 
>> closed to VB than python.
>>
>> On Tuesday, November 17, 2015 at 4:59:35 PM UTC+11, didinj wrote:
>>>
>>> Python more human readable that closely to VB.
>>>
>>>
>>> Thanks,
>>> Didin
>>>
>>> 2015-11-17 4:08 GMT+07:00 Alistair Burrowes <alistair...@gmail.com>:
>>>
>>>> Java is the most similar to vb.net . c# and java are quite similar and 
>>>> vb is basically an alternative syntax to c#.
>>>>
>>>> --
>>>> 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-appengi...@googlegroups.com.
>>>> To post to this group, send email to google-a...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/google-appengine.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/google-appengine/f7639fed-cef0-480b-aa39-1b55a44ccf78%40googlegroups.com
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ae48251d-46ac-43f5-ae89-c16edc22fb38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Visual Basic Programmer - should I use Python, Java, PHP or GO

2015-11-16 Thread timh
Comparison with .Net is probably off the mark as .Net is more an ecosystem 
and can be programmed in a few different languages. It provides are library 
framwork, runtime, clr, bindings etc..
You can write .Net in python for instance.


One thing to note re: appengine, if you want to use the Datastore with PHP 
you are using the Cloud Datastore over http as the there is no native 
Datastore API for PHP on app engine

On Monday, November 16, 2015 at 3:46:17 AM UTC+8, Chris Ketchell wrote:
>
> Thanks very much I'll probably work through the introductions for each
>
> Would you say any are similar to .Net?
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/fe2fd90a-4327-4f7b-8c60-c1ce95e4adad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: How to store open connection to external MongoDB

2015-11-05 Thread timh
This just won't work on a front end request.  Any thread you create will be 
destroyed at the end of the request.

The appengine front end is not designed for this type of capabiltiy.

You could consider running your mongo interface on a managed vm, and then 
use some sort of simple rpc mechanism to talk to this interface.
Alternately find a light weight connection service that only exists for the 
duration of a request.

T

On Thursday, November 5, 2015 at 5:39:20 AM UTC+8, Minie Takalova wrote:
>
> Thank you for your responses. 
>
> Re. Jeff Schnitze:
> Nice mind-shift to change behaviour of driver. This way solution doesn't 
> occured me.  On the other side it is sad. Instead of 5 lines code to 
> rebuild driver. I keep this solution as last chance if I find nothing 
> easier. 
> Maybe it eventually prove, as the simplest solution.
>
> Re. Nick:
> My opinion is, that for connection is open new thread, but GAE frontend 
> want to every opened thread stopped before finaly return result. 
>
>
> --- The timeout mesage is: 
>
> Error: Server Error
> The server encountered an error and could not complete your request.
> Please try again in 30 seconds.
>
> --- Line of code where GAE freeze ---
> It freeze on response. Doesn't matter which type of response it is. It can 
> be simple response:
> return HttpResponse('Done')
>
> ---Logs from development console ---
>.
>
>   File 
> "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/mongo_client.py", 
> line 372, in __init__
> executor.open()
>   File 
> "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/periodic_executor.py",
>  line 64, in open
> thread.start()
>   File 
> "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/threading.py", 
> line 505, in start
> _start_new_thread(self.__bootstrap, ())
>   File 
> "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/runtime.py",
>  line 82, in StartNewThread
> return base_start_new_thread(Run, ())
>
>
> --
>
>  
>
>   File 
> "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/mongo_client.py", 
> line 353, in __init__
> self._topology.open()
>   File "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/topology.py", 
> line 60, in open
> self._ensure_opened()
>   File "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/topology.py", 
> line 273, in _ensure_opened
> self._update_servers()
>   File "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/topology.py", 
> line 341, in _update_servers
> server.open()
>   File "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/server.py", 
> line 35, in open
> self._monitor.open()
>   File "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/monitor.py", 
> line 74, in open
> self._executor.open()
>   File 
> "/base/data/home/apps/MyAPP/1.388269338940512065/pymongo/periodic_executor.py",
>  line 64, in open
> thread.start()
>   File 
> "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/threading.py", 
> line 505, in start
> _start_new_thread(self.__bootstrap, ())
>   File 
> "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/runtime.py",
>  line 82, in StartNewThread
> return base_start_new_thread(Run, ())
>
> 
>
> Threads started by this request continued executing past the hard deadline.
>
>
>
>
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8f23bede-c103-48aa-9f45-ee8116d68e8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Saving Objects in GAE with Python

2015-02-15 Thread timh
Do you mean a custom property ?  As all datastore entities are in fact 
custom objects.

T

On Thursday, February 12, 2015 at 7:40:01 PM UTC+8, Saturnino Mateus wrote:

 Hello!
 Is there any way to save custom objects in datastore instead save basic 
 data types?

 Regards!


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9d058286-3b89-45be-bde9-dd811b22d86c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Datastore: how to design for huge time-series data

2015-01-31 Thread timh
Have a look at nimbits it stores time series in appengine datastore.  It's 
written in java, but the data models used should be straightforward to 
translate into NDB.

T

On Friday, January 30, 2015 at 4:32:52 AM UTC+8, Shailendra Singh wrote:

 Hi Rafael

 It's a old thread, but can you please share some information on how you 
 stored  different rows for hour, day, week, month, year, etc. You can 
 squeeze a lot of data in 1mb :) in GAE? I an new to GAE and i am trying to 
 store some ts data with respect to a entity in NDB. 

 Thanks

 On Wednesday, August 14, 2013 at 4:50:15 AM UTC+5:30, Rafael Sanches wrote:

 i implemented this by having these components: 

 - TimeSeriesIndex - different rows for hour, day, week, month, year, etc. 
 You can squeeze a lot of data in 1mb :)
 - DataPoint - unprocessed data point data. thousands of rows per minute. 
 - cron that process the datapoints inside the indexes
 - the ui read only TimeSeriesIndex that contains the timestamps and the 
 data points. 

 thanks
 rafa


 On Tue, Aug 13, 2013 at 1:42 PM, Jay jbake...@gmail.com wrote:

 In my opinion, your biggest take away from this should be to avoid 
 having a mega entity group and you do this by simply *not* having all 
 the entities in question have the same parent. Or perhaps more pointedly, 
 any parent at all. Unless there is a really strong case to put many 
 thousands of entities in the same entity group, I just wouldn't do it. You 
 can have transactions across entity groups now so if you need a transaction 
 with a few entities you are OK. 
 As you need to relate the entities, do that by some other means instead 
 of a parent entity. For example, you could use a ndb.KeyProperty or 
 possibly just an encoded string or something along those lines. 


 On Tuesday, August 13, 2013 7:59:52 AM UTC-5, Martin Trummer wrote:

 I'm a newbie to the AppEngine datastore and like to know how to best 
 design this use case:
 there may be some time-series with huge amount of data: e.g. 
 terra-bytes for one time-series
 the transacations doc 
 https://developers.google.com/appengine/docs/java/datastore/transactions 
 says about entity groups:

- *Every entity belongs to an entity group, a set of one or more 
entities that can be manipulated in a single transaction.*
- *every entity with a given root entity as an ancestor is in the 
same entity group. All entities in a group are stored in the same 
 Datastore 
node.* 

 so does that mean, that all the terra-bytes of data for the huge 
 time-series would end up *on one computer* somewhere in the AppEngine 
 network?
 if so: 

- that's not a good idea, right?
- how to avoid it? should I split up the data in sections (e.g. per 
month) where each section has it's own kind/entity group?

  -- 
 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-appengi...@googlegroups.com.
 To post to this group, send email to google-a...@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-appengine.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/51bfd5c0-adca-4770-8e69-1b7ae637f04b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Beginner Questions on Authentication

2015-01-01 Thread timh
I have implemented traditional user/pass on top of repoze.who/repoze.what, 
that also supported google auth and could be easily extended.
However it's not my code (wrote it for another organisation), so not in a 
position to share  (currently it is used by somewhere between 2000 and 3000 
users).

I haven't seen a well packaged lib for doing this, (though they might 
exist).

Though did come across this 
- https://github.com/abahgat/webapp2-user-accounts

I would consider looking at something like webapp2-user-accounts and 
pulling the core of it out and making it a provider for authomatic.

Then you can support multiple auth methods.

Cheers

Tim

On Thursday, January 1, 2015 1:23:27 PM UTC+8, Dakota Pitts-Price wrote:

 Thanks lol but its not temping to roll out my own solution at all.
 I am sorta a noob, so I would like to use a vetted and easy to implement 
 solution.
 Automatic looks nice, thanks for the recommendation, but it does not 
 appear to support its own authentication.
 As I move beyond something as dead simple as Parse, I still want to 
 maintain the ability to offer traditional user/pass logins.
 This is a requirement with a majority of my clients as well as with users.

 On Wednesday, December 31, 2014 5:39:56 PM UTC-10, timh wrote:

 I know it's tempting to roll your own, but I would have a look at 
 automatic first.

 http://peterhudec.github.io/authomatic/index.html

 On Thursday, January 1, 2015 11:01:43 AM UTC+8, Dakota Pitts-Price wrote:

 Thanks for your support Les.

 I find it shocking that for all its amazing features the GAE has, it's 
 built in username/password system is such a second class citizen.
 I understand the complexity and ease of getting it wrong, which is why I 
 hoping to find an easier to roll out solution than building it from the 
 ground up.
 Personally I also learn the best that way.

 I see a modified Django is supported on the GAE. I have no experience 
 with this framework, but I would rather spend the time to learn that than 
 roll out my own Auth system on top of end points.
 Are there any caveats to using Django on GAE? I understand I wouldn't be 
 able to use the nifty Cloud End Points.
 I am only currently looking to have 7 REST Apis that deliver JSON plus 
 one or two tasks that run once a day.
 Is Django over kill for that level of requirements? Is there an easier 
 solution?

 Sorry about all the questions and thanks again!
 Dakota


 On Tuesday, December 30, 2014 10:00:27 PM UTC-10, Les Vogel wrote:

 Hi Dakota,

 First off, Identity-Toolkit is separate from Endpoints, so using it 
 would require you rolling your own solution for Endpoints -- similar to 
 what I describe below.

 What I'm about to describe is a very simplified version of what's 
 necessary,  I recommend reading the standard docs for OAuth2 as there are 
 some very subtle and tricky things about security.  (ie. I'm simplifying 
 things to answer the Q using our API's and our accounts is best practices, 
 what I'm describing probably could be improved by a security expert) 
  Because of this, I will not be using specific nomenclature to 
 differentiate this from a good solution.

 Your login mechanism can return a token (like a JWT http://jwt.io/) 
 that should contain at least an identifier of who the user is, an 
 expiration date/time for the token, and be cryptologically signed.  You 
 pass that token as one of the parameters in your Endpoint, you ALWAYS 
 validate the signature then the expiration time.  If either is invalid, 
 you 
 reject the token.

 You can include a refresh method, or just require re-login to get a 
 revised token. My go code 
 https://github.com/GoogleCloudPlatform/abelana-gcp/blob/master/endpoints/tokens.go
  
 has most of this.

 One last disclaimer - This stuff is very hard to get right!

 Below was from a private message I sent about this last week.  It has 
 both the Java and Android (java) changes.  Where you see the word secret 
 send your token.  (This had a constant secret for his application).

 Regards,

 Les

 From:

 https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints

 If you look at the code:

 context = params[0].first;
 String name = params[0].second;

 try {
 return myApiService.sayHi(name).execute().getData();
 } catch (IOException e) {
 return e.getMessage();
 }


 Which came from your java code:

 @ApiMethod(name = sayHi)
 public MyBean sayHi(@Named(name) String name) {
 MyBean response = new MyBean();
 response.setData(Hi,  + name);

 return response;
 }

 You can see the service sayHi(name)  to add the secret, you could do 
 the following

 redefine your service to include secret:

   public MyBean sayHi(@Named(secret) Long secret, @Named(name) 
 name) {
 if(secret != 32753454453456L) return null;
...
   }

 And the code would become:

   return myApiService.sayHi(secret, name).execute

Re: [google-appengine] Beginner Questions on Authentication

2014-12-31 Thread timh
I know it's tempting to roll your own, but I would have a look at automatic 
first.

http://peterhudec.github.io/authomatic/index.html

On Thursday, January 1, 2015 11:01:43 AM UTC+8, Dakota Pitts-Price wrote:

 Thanks for your support Les.

 I find it shocking that for all its amazing features the GAE has, it's 
 built in username/password system is such a second class citizen.
 I understand the complexity and ease of getting it wrong, which is why I 
 hoping to find an easier to roll out solution than building it from the 
 ground up.
 Personally I also learn the best that way.

 I see a modified Django is supported on the GAE. I have no experience with 
 this framework, but I would rather spend the time to learn that than roll 
 out my own Auth system on top of end points.
 Are there any caveats to using Django on GAE? I understand I wouldn't be 
 able to use the nifty Cloud End Points.
 I am only currently looking to have 7 REST Apis that deliver JSON plus one 
 or two tasks that run once a day.
 Is Django over kill for that level of requirements? Is there an easier 
 solution?

 Sorry about all the questions and thanks again!
 Dakota


 On Tuesday, December 30, 2014 10:00:27 PM UTC-10, Les Vogel wrote:

 Hi Dakota,

 First off, Identity-Toolkit is separate from Endpoints, so using it would 
 require you rolling your own solution for Endpoints -- similar to what I 
 describe below.

 What I'm about to describe is a very simplified version of what's 
 necessary,  I recommend reading the standard docs for OAuth2 as there are 
 some very subtle and tricky things about security.  (ie. I'm simplifying 
 things to answer the Q using our API's and our accounts is best practices, 
 what I'm describing probably could be improved by a security expert) 
  Because of this, I will not be using specific nomenclature to 
 differentiate this from a good solution.

 Your login mechanism can return a token (like a JWT http://jwt.io/) 
 that should contain at least an identifier of who the user is, an 
 expiration date/time for the token, and be cryptologically signed.  You 
 pass that token as one of the parameters in your Endpoint, you ALWAYS 
 validate the signature then the expiration time.  If either is invalid, you 
 reject the token.

 You can include a refresh method, or just require re-login to get a 
 revised token. My go code 
 https://github.com/GoogleCloudPlatform/abelana-gcp/blob/master/endpoints/tokens.go
  
 has most of this.

 One last disclaimer - This stuff is very hard to get right!

 Below was from a private message I sent about this last week.  It has 
 both the Java and Android (java) changes.  Where you see the word secret 
 send your token.  (This had a constant secret for his application).

 Regards,

 Les

 From:

 https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints

 If you look at the code:

 context = params[0].first;
 String name = params[0].second;

 try {
 return myApiService.sayHi(name).execute().getData();
 } catch (IOException e) {
 return e.getMessage();
 }


 Which came from your java code:

 @ApiMethod(name = sayHi)
 public MyBean sayHi(@Named(name) String name) {
 MyBean response = new MyBean();
 response.setData(Hi,  + name);

 return response;
 }

 You can see the service sayHi(name)  to add the secret, you could do 
 the following

 redefine your service to include secret:

   public MyBean sayHi(@Named(secret) Long secret, @Named(name) name) {
 if(secret != 32753454453456L) return null;
...
   }

 And the code would become:

   return myApiService.sayHi(secret, name).execute().getData();

 On Tue, Dec 30, 2014 at 3:40 PM, Dakota Pitts-Price fallen...@gmail.com 
 wrote:

 Hey Les,

 If I wanted to have my own login system and still use the Cloud End 
 Points with some form of Auth, how would you advise going about starting 
 this?

 Thanks for your help :)

 On Tuesday, December 30, 2014 1:37:07 PM UTC-10, Les Vogel wrote:

 Hi Dakota,

 You might wish to look at the Identity-Toolkit 
 https://developers.google.com/identity-toolkit/  or Firebase 
 https://www.firebase.com/ for general purpose Auth.  

 For GAE, you can have general gmail or domain specific auth -- ie all 
 Google accounts (Gmail, Google for Work / Education / Business / 
 Government, and anyone who's logged into Google).

 Correct - If you roll your own, you can't use GAE login or Endpoints 
 with Auth enabled. Nor can you roll your own Oauth2 and insert it into 
 Endpoints.  You could issue your own Tokens and pass them as parameters, 
 always requiring HTTPS, however.  I have a few examples of this using 
 Identity-Toolkit, but they are for Go  Android.

 Regards,

 Les


 On Tue, Dec 30, 2014 at 1:10 PM, Dakota Pitts-Price 
 fallen...@gmail.com wrote:

 Hi I am noob looking to expand my knowledge base outside of heavily 
 managed services like Parse.
 I have 

[google-appengine] Re: Mysterious error only appears on GAE server?

2014-12-19 Thread timh
The suggestion at the bottom of the stack trace tells you exactly what you 
need to do.

Add 

- kind: LogsClass
  ancestor: yes
  properties:
  - name: date
direction: desc


To your index.yaml if it is not already there, then update indexes.
If you have a lot of data it will take some time for the index to be built 
the first time.

T

On Thursday, December 18, 2014 11:17:55 PM UTC+8, Rom Levtov wrote:

 So I was making an app in the local server using the 'Google App Engine 
 Launcher' and it was working completely fine. But when I deployed it and 
 looked at in the actual app. It brought back an error and I have no idea 
 what is says and is really confusing since it works in the local server.

 This is the error:

 Traceback (most recent call last):
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  line 1535, in __call__
 rv = self.handle_exception(request, response, e)
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  line 1529, in __call__
 rv = self.router.dispatch(request, response)
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  line 1278, in default_dispatcher
 return route.handler_adapter(request, response)
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  line 1102, in __call__
 return handler.dispatch()
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  line 572, in dispatch
 return self.handle_exception(e, self.app.debug)
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  line 570, in dispatch
 return method(*args, **kwargs)
   File /base/data/home/apps/s~romsecretdiary/3.380887165812496139/logs.py, 
 line 309, in get
 logs = logs_query.fetch()
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/utils.py,
  line 142, in positional_wrapper
 return wrapped(*args, **kwds)
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/query.py,
  line 1187, in fetch
 return self.fetch_async(limit, **q_options).get_result()
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py,
  line 325, in get_result
 self.check_success()
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py,
  line 368, in _help_tasklet_along
 value = gen.throw(exc.__class__, exc, tb)
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/query.py,
  line 964, in _run_to_list
 batch = yield rpc
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py,
  line 454, in _on_rpc_completion
 result = rpc.get_result()
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py,
  line 613, in get_result
 return self.__get_result_hook(self)
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/datastore/datastore_query.py,
  line 2988, in __query_result_hook
 yaml_index=yaml, xml_index=xml)
 NeedIndexError: no matching index found.
 The suggested index for this query is:
 - kind: LogsClass
   ancestor: yes
   properties:
   - name: date
 direction: desc


 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 http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: Bug in ndb with StructuredProperty?

2014-11-16 Thread timh
One possible approach for the inner SecondModel validation would be to call 
_validate explicitly on it, . You could call this from a _pre_put hook 
defined on FirstModel

T


On Monday, November 10, 2014 1:33:17 PM UTC+8, Vinny P wrote:

 On Sat, Nov 8, 2014 at 7:44 AM, Lapteuh lap...@gmail.com javascript:
  wrote:

 I tested this code 
 https://gist.github.com/anonymous/18648c7134f41a6c1b74. First again, 
 *required* parameter ignored, but it must be composable (It is written 
 in the documentation). Second, *validation* in *StructuredProperty* work 
 only on *not None* value and it's second bug, because writing custom 
 property for model useless at this point.




 I think you might be missing Tim's point. FirstModel will be validated, 
 but the inner SecondModel isn't being validated - it's serialized directly 
 as a property. You can see this because the pre-put and post-put hooks you 
 defined for SecondModel aren't being run (at least, I don't see the correct 
 log lines after line 64 in your Github gist).

 If you want SecondModel validated, try to put it directly as Tim attempted 
 to do in his post (and received the correct error messages). 

 Now as for the larger question you asked in the OP, this might be 
 something that should be clarified in documentation, but I don't think it's 
 necessarily a bug. If you need this style of validation to work in your 
 app, you can try explaining your use case and there may be workarounds we 
 can try.


 -
 -Vinny P
 Technology  Media Consultant
 Chicago, IL

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


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


[google-appengine] Re: Bug in ndb with StructuredProperty?

2014-11-04 Thread timh
Not sure I would interpret it as a bug

If you do model2 = SecondModel()

You would get the error you expect..

Setting a property (especiallya StringProperty) explicitly to None, is not 
the same as not setting the value of the property.
The former will define the Property with a value of None, the second won't 
define a value for the property.

You can see this also in the how indexes work, the former will have a value 
in the index, the later won't even have a record in the index for 
some_other_prop

So in my opinion it isn't a bug, but could probably do with more explicit 
documentation.

Just my 2c 

Cheers

T

On Friday, October 24, 2014 9:04:13 PM UTC+8, Lapteuh wrote:

 Hello. Noticed a strange behavior in the library ndb. In my opinion it 
 looks like a bug.

 Example:

 class SecondModel(ndb.Model):
 important_prop = ndb.StringProperty(required=True)


 class FirstModel(ndb.Model):
 some_prop = ndb.StringProperty()

 some_other_prop = ndb.StructuredProperty(SecondModel, required=True)
 
 
 def some_func():

 buggy = None # attention here

 model2 = SecondModel(important_prop=buggy)
 model1 = FirstModel(some_other_prop=model2)
 model1.put()
 return 


 Despite the fact that the code does not need to work, he works. No 
 exception! '*required*' option in property '*important_prop*' from '
 *SecondModel*' just ignored.


-- 
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: Bug in ndb with StructuredProperty?

2014-11-04 Thread timh
Hi 

You are correct, 

s~cash-drawer class SecondModel(ndb.Model):
... important_prop = ndb.StringProperty(required=True)
...
s~cash-drawer class FirstModel(ndb.Model):
... some_prop = ndb.StringProperty()
... some_other_prop = ndb.StructuredProperty(SecondModel, required=True)
...
s~cash-drawer model2 = SecondModel()
s~cash-drawer model2.put()
WARNING:root:initial generator _put_tasklet(context.py:270) raised 
BadValueError(Entity has uninitialized properties: important_prop)
WARNING:root:suspended generator put(context.py:733) raised 
BadValueError(Entity has uninitialized properties: important_prop)
Traceback (most recent call last):
  File console, line 1, in module
  File /home/timh/google_appengine/google/appengine/ext/ndb/model.py, 
line 3187, in _put
return self._put_async(**ctx_options).get_result()
  File /home/timh/google_appengine/google/appengine/ext/ndb/tasklets.py, 
line 325, in get_result
self.check_success()
  File /home/timh/google_appengine/google/appengine/ext/ndb/tasklets.py, 
line 368, in _help_tasklet_along
value = gen.throw(exc.__class__, exc, tb)
  File /home/timh/google_appengine/google/appengine/ext/ndb/context.py, 
line 733, in put
key = yield self._put_batcher.add(entity, options)
  File /home/timh/google_appengine/google/appengine/ext/ndb/tasklets.py, 
line 371, in _help_tasklet_along
value = gen.send(val)
  File /home/timh/google_appengine/google/appengine/ext/ndb/context.py, 
line 280, in _put_tasklet
keys = yield self._conn.async_put(options, datastore_entities)
  File 
/home/timh/google_appengine/google/appengine/datastore/datastore_rpc.py, 
line 1542, in async_put
pbs = [self.__adapter.entity_to_pb(entity) for entity in entities]
  File /home/timh/google_appengine/google/appengine/ext/ndb/model.py, 
line 562, in entity_to_pb
pb = ent._to_pb()
  File /home/timh/google_appengine/google/appengine/ext/ndb/model.py, 
line 2906, in _to_pb
self._check_initialized()
  File /home/timh/google_appengine/google/appengine/ext/ndb/model.py, 
line 2783, in _check_initialized
'Entity has uninitialized properties: %s' % ', '.join(baddies))
BadValueError: Entity has uninitialized properties: important_prop
s~cash-drawer model2 = SecondModel()
s~cash-drawer model1 = FirstModel(some_other_prop=model2)
s~cash-drawer model1.put()
Key('FirstModel', 12001)
s~cash-drawer model1
FirstModel(key=Key('FirstModel', 12001), some_other_prop=SecondModel())
s~cash-drawer


However is it really a bug in NDB or NDB documentation.

Model validation is called at put() time, however a structured property 
components aren't directly written to the datastore as a model in your 
case. It is serialized and stored in a property of the outer model and the 
only model validation that will be performed is on .  You will also find 
that any hooks on that model used in the structured property won't have 
it's hooks called (pre_put, post_put, pre_delete . etc...)

Cheers

Tim



On Tuesday, November 4, 2014 10:43:04 PM UTC+8, Lapteuh wrote:

 I tested SecondModel() without parameters and result is same. Still no 
 error.

 вторник, 4 ноября 2014 г., 19:11:40 UTC+5 пользователь timh написал:

 Not sure I would interpret it as a bug

 If you do model2 = SecondModel()

 You would get the error you expect..

 Setting a property (especiallya StringProperty) explicitly to None, is 
 not the same as not setting the value of the property.
 The former will define the Property with a value of None, the second 
 won't define a value for the property.

 You can see this also in the how indexes work, the former will have a 
 value in the index, the later won't even have a record in the index for 
 some_other_prop

 So in my opinion it isn't a bug, but could probably do with more explicit 
 documentation.

 Just my 2c 

 Cheers

 T

 On Friday, October 24, 2014 9:04:13 PM UTC+8, Lapteuh wrote:

 Hello. Noticed a strange behavior in the library ndb. In my opinion it 
 looks like a bug.

 Example:

 class SecondModel(ndb.Model):
 important_prop = ndb.StringProperty(required=True)


 class FirstModel(ndb.Model):
 some_prop = ndb.StringProperty()

 some_other_prop = ndb.StructuredProperty(SecondModel, required=True)
 
 
 def some_func():

 buggy = None # attention here

 model2 = SecondModel(important_prop=buggy)
 model1 = FirstModel(some_other_prop=model2)
 model1.put()
 return 


 Despite the fact that the code does not need to work, he works. No 
 exception! '*required*' option in property '*important_prop*' from '
 *SecondModel*' just ignored.



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

[google-appengine] Re: A Pure Google App Engine Dev Experience

2014-10-18 Thread timh
I would use what your comfortable, but if you don't have any pre-existing 
preferences then django is probably the least best fit in my opinion.
Django needed the non-rel version to really make sense in appengine which 
suggests to me sufficiently non suitable foundation,

My personal preference is pyramid, but hardly anyone does that so you 
probably shouldn't listen to me ;-)

 if you want something basic use webapp2 as that is where you will get the 
most community support around appengine.

T

On Tuesday, October 14, 2014 2:07:28 AM UTC+8, Todd Thomas wrote:

 Hey guys, I attended a local Python User Group meeting last week; the 
 presentation on GAE was great; during which we walked through an example of 
 pushing a local/dev Django app to GAE - brilliant.

 Now that I'm inspired I'd like to dive in. I use Python to manage the 
 Linux OS but I'm a total newb with web dev so I have questions.

 Assumptions:

1. All aspects will be kept open; ie: HTML5, CSS, JavaScript, Python
2. The project will be started from scratch.
3. A an interest in *an As Pure As Possible App Engine experience*. 
These pieces have been identified to get started:


- App Engine https://cloud.google.com/appengine/ (SDK)
- Google Web Starter Kit 
https://developers.google.com/web/starter-kit/
- Jinja 2 http://www.pocoo.org/projects/jinja2/ (templating)
- JavaScript: AngularJS https://angularjs.org/ with the possible 
inclusion of a Classy http://www.pocoo.org/projects/classy/ backer.
- OAuth2 http://oauth.net/2/ Integration (eventually)
- Vim

 Q: What is the best (supported, documented, *scalable*, most widely-used, 
 etc.) framework to use with GAE?

 Q: Why?

 Q: Are there some other pieces of this puzzle I might be missing?

 webapp2 https://cloud.google.com/appengine/docs/python/tools/webapp2 is 
 highlighted on the GAE  Python  Tools age but Django gets special 
 mention https://cloud.google.com/appengine/docs/python/tools/libraries27 as 
 well; still others are supported 
 https://code.google.com/p/tipfy/wiki/AppEngineFrameworks; it's very 
 confusing.

 I'm jazzed but research has become exhausting. I need to hear from the 
 battle tested souls out there; essentially, those who have already stepped 
 in it. *Just a newb trying to get started on the right foot.*

 Thanks in advance guys,
 TT


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


Re: [google-appengine] Trouble reading a pile of stuff from the datastore

2014-10-08 Thread timh
You haven't said if you running this in a task or front end request,

If it is a frontend request it will never run to completion as you have a 
limit of 60 seconds.
Also look at your default batch size. You may find that a bigger batch size 
will speed things up too.

T


On Wednesday, October 8, 2014 1:50:44 AM UTC+8, Joshua Smith wrote:

 Yup, cursors are a good workaround. Here’s my fix…

 hcur = None
 keepGoing = True
 while keepGoing:
   count = 0
   hall = HitModel.all()
   if hcur:
 hall.with_cursor(start_cursor=hcur)
   keepGoing = False
   for h in hall:
 ...my processing stuff...
 count += 1
 if count == 2:
   hcur = hall.cursor()
   keepGoing = True
   break


 On Oct 7, 2014, at 11:38 AM, PK p...@gae123.com javascript: wrote:

 I have seen this error as well and had to change my code. My situation is 
 python 2.7/HRD/db.Query() in a module with manual scaling.

 q = db.Query(…)
 …
 for ent in q.run():
  do stuff

 The iteration goes well for a large number of entities and then gives up 
 in a similar way. Something seems to timeout for long lived queries. 
 Needless to say it works fine on the dev server but there of course I do 
 not have so much data.

 Breaking it down with cursors or equivalent works fine and this is what I 
 am doing as a work around. I did not even bother to see if there is an 
 issue for it but I would happily star it if there is one.

 PK
 http://www.gae123.com

 On October 7, 2014 at 8:26:11 AM, Joshua Smith (mrjoshu...@gmail.com 
 javascript:) wrote:

 I have an app that once a day does a big data processing task.

 Every now and then it would throw a datastore timeout error. But now it’s 
 throwing them constantly.

 I thought maybe my data had tripped over some limit on how much you can 
 read, but I just added some instrumentation and it’s only reading less than 
 half of the entities. If I was tripping over an undocumented limit, I’d 
 think it would read all most all of them (since only a few get added each 
 day).

 Basically, the code is simply:

 for h in HitModel.all():
 (do collect up info about h)

 and there are about 85K HitModel objects in the database. It’s dying after 
 reading 35,000 of them (which takes about a minute).

 It’s on HR data store. Still on Python 2.5.

 App ID is “kaon-log”

 The error I’m getting is:

 2014-10-07 11:16:46.925

 The datastore operation timed out, or the data was temporarily unavailable.
 Traceback (most recent call last):
   File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py,
  line 714, in __call__
 handler.get(*groups)
   File /base/data/home/apps/s~kaon-log/33.379217403803985923/main.py, line 
 648, in get
 for h in HitModel.all():
   File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/ext/db/__init__.py,
  line 2326, in next
 return self.__model_class.from_entity(self.__iterator.next())
   File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/datastore/datastore_query.py,
  line 3091, in next
 next_batch = self.__batcher.next_batch(Batcher.AT_LEAST_OFFSET)
   File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/datastore/datastore_query.py,
  line 2977, in next_batch
 batch = self.__next_batch.get_result()
   File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py,
  line 612, in get_result
 return self.__get_result_hook(self)
   File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/datastore/datastore_query.py,
  line 2710, in __query_result_hook
 self._batch_shared.conn.check_rpc_success(rpc)
   File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py,
  line 1333, in check_rpc_success
 raise _ToDatastoreError(err)
 Timeout: The datastore operation timed out, or the data was temporarily 
 unavailable.


 Any ideas?

 (Breaking this up into multiple tasks would be really hard.)


 -Joshua

 --
 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 javascript:.
 To post to this group, send email to google-a...@googlegroups.com 
 javascript:.
 Visit this group at http://groups.google.com/group/google-appengine.
 For more options, visit https://groups.google.com/d/optout.




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

[google-appengine] Re: Datastore first public release

2014-10-01 Thread timh
Hi

Not sure of the exact date of announcement, but I got my invite for 
Appengine of the 19/4/2008

Cheers

Tim


On Wednesday, October 1, 2014 8:19:09 PM UTC+8, dele...@gmail.com wrote:

 Hi
 Quick question for my blog post accuracy : What year was the Datastore 
 NoSQL facility introduced to customers?

 I'm guessing around 2008 but could not find the answer on the web.
 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 http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Appengine ecosystem?

2014-06-27 Thread timh
Unfortunately it seems all the good appengine discussions went away with 
the SO introduction
however SO is no good for discussions about approach, idea's etc...  it 
also seems like a lot of input etc
disappeared when people like Nick Johnson and Ikai went elsewhere.

Just my 2c worth.

T

On Friday, June 27, 2014 11:13:29 AM UTC+8, Emlyn wrote:

 What are the good communities for appengine / google cloud? 

 Where are the good online resources for appengine / google cloud? 

 What are the good third party tools for appengine / google cloud? 

 I've been cranking away on commercial appengine work, really busy, so 
 I've not been paying much attention to the outside world. Reflecting 
 for a minute, I think I'm probably doing a lot of things the hard way 
 (and probably crappy way). However, I've never really identified much 
 in the way of good communities, resources, tools for appengine. 

 I currently subscribe to the google group 
 http://groups.google.com/group/google-appengine 

 And of course I use the docs  StackOverflow extensively. 

 What cool things are you using that you think everyone else should 
 also be using? 

 btw, I'm asking this question elsewhere, and will try to compile and 
 repost a useful list of feedback. 

 -- 
 Emlyn 

 http://point7.wordpress.com - My blog 
 https://plus.google.com/u/0/100281903174934656260 - Google+ 


-- 
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: Intermittent Google 502 error pages

2014-06-25 Thread timh
There is a google group for Appengine Downtime Notifications.  Some 
problems will not show on the service dashboard as they may not be testing 
your problem
or be in the same set of machines.  The service dashboard isn't all that 
useful.

https://groups.google.com/forum/#!topic/google-appengine-downtime-notify/l81O9JzXrvw


On Wednesday, June 25, 2014 3:38:34 PM UTC+8, notreadbyhumans wrote:

 Downtime notifications? There's nothing showing on the App Engine Service 
 dashboard:

 https://code.google.com/status/appengine
  

 On Wednesday, June 25, 2014 1:04:16 AM UTC+1, timh wrote:

 Have a look at downtime notifications. This problem was experienced by a 
 number of apps.

 On Tuesday, June 24, 2014 3:55:43 PM UTC+8, notreadbyhumans wrote:

 Just to add the logging in through the appspot.com address doesn't seem 
 to present the same issues.



-- 
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: Intermittent Google 502 error pages

2014-06-24 Thread timh
Have a look at downtime notifications. This problem was experienced by a 
number of apps.

On Tuesday, June 24, 2014 3:55:43 PM UTC+8, notreadbyhumans wrote:

 Just to add the logging in through the appspot.com address doesn't seem 
 to present the same issues.



-- 
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: What does the Docker updates bring?

2014-06-11 Thread timh
Though the various presentations/update on the subject suggest that Docker 
will be used for the Appengine Managed VM's

So there may well be an impact somewhere a long the line.

T

On Thursday, June 12, 2014 3:00:38 AM UTC+8, Jim wrote:

 At this point it doesn't Docker images are compatible with Compute 
 Engine instances, not App Engine



 On Wednesday, June 11, 2014 11:04:00 AM UTC-5, Kaan Soral wrote:

 I'm wondering how the Docker integration affect AppEngine/usage



-- 
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: Experiencing timeouts on my Java app frontend today

2014-05-21 Thread timh
I am not seeing anything.  Only the usual chinese sources probing for PHP 
and aps problems ;-)

T

On Wednesday, May 21, 2014 4:19:22 PM UTC+8, Tomas wrote:

 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] Re: Experiencing timeouts on my Java app frontend today

2014-05-21 Thread timh
But I am on python

On Wednesday, May 21, 2014 5:23:21 PM UTC+8, timh wrote:

 I am not seeing anything.  Only the usual chinese sources probing for PHP 
 and aps problems ;-)

 T

 On Wednesday, May 21, 2014 4:19:22 PM UTC+8, Tomas wrote:

 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] Re: Problems with the Google Directions Widget

2014-05-21 Thread timh
The original answer from Robert still stands.  This group is for 
google-app-engine and has nothing to do with widgets or maps.



On Tuesday, May 20, 2014 6:39:50 PM UTC+8, Mehul Prajapati wrote:

 Hello App Team,
 we have same problem
 we have used google gadget For the map : by Js 
 for example 
 script src=
 http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/11428391296844949/driving-directions.xmlamp;up_fromLocation=amp;up_myLocations=120http://www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/11428391296844949/driving-directions.xmlup_fromLocation=up_myLocations=120E.
  Gloucester 
 Pike%20Barrington,%20NJ%2008007|amp;up_defaultDirectionsType=amp;synd=openamp;w=480amp;h=55amp;lang=enamp;country=USamp;output=js/script
 Till before several days Its Working Fine , But Its giving 404 error ..
 can you suggest ?

 On Thursday, 2 June 2011 18:34:49 UTC+5:30, Kim wrote:

 Hello Google App Engine, 

 Hope that you are well. 

 The Google Directions Widget is no longer working correctly on my 
 church's Web site at: 

 http://triumphantchurch.org/contactus.html 

 It worked fined initially, but for some reason it is not working now. 

 To make sure, I cut-and-pasted the the example code provided on your 
 Web site at 

 http://aht7hjsu8d8du5dgd917aohtlkinfcj7.ig.gmodules.com/ig/creator?url=http://hosting.gmodules.com/ig/gadgets/file/11428391296844949/driving-directions.xml
  
 into a test page at http://triumphantchurch.org/test.html . 

 I entered my address, clicked Go and nothing happens. 

 Is this widget still supported? 

 Thanks  blessings! 
 Kim 
 Kim



-- 
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: Upload images-Call to a member function getClientOriginalExtension() on a non-object

2014-05-21 Thread timh
It has nothing to do with app.yaml/

You can not write the the filesystem in appengine.  Please read the docs on 
restrictions in the PHP runtime.
You will need to write these files to GCS.  

See this 
document 
https://developers.google.com/appengine/docs/php/googlestorage/user_upload

On Tuesday, May 20, 2014 8:13:21 PM UTC+8, laureta xhaferaj wrote:

 I am developing my application with google app engine. I have a form which 
 uploads images and saves path in database. I am deploying app with google 
 app engine and upload of image doesn't works. Here is app.yaml
 application: national-test
 version: 1
 runtime: php
 api_version: 1

 handlers:
 - url: /favicon\.ico
   static_files: favicon.ico
   upload: favicon\.ico

 - url: /(.+.(css|js|less|ico|png|jpg|woff|ttf|gif))$ 
   static_files: \1 
   upload: .+.(css|js|less|ico|png|jpg|woff|ttf|gif)$ 
   application_readable: true

 - url: /.*
   script: public/index.php

 and here is my laravel code which localy works well
   public function upload_image($id) {
 $file = Input::file('image');
 $destinationPath = 'uploads';
 $extension = $file-getClientOriginalExtension();
 
 $filename = time() . '' . str_random(6) . '.' . $extension;

 $file-move($destinationPath, $filename);
 $car = Car::find($id);
 $car-Pic = $destinationPath.$filename;
 $car-save();
 }
 Uploaded images are saved inside publicuploads
 Is the problem with file read? Or I am missing something in app.yaml 
 config?


-- 
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: Adwords API Python library does not compatible with App Engine

2014-05-18 Thread timh
Hi István

I am curious what sort of errors are you getting from the api  or in what 
way it is not compatible with appengine ?
Can you elaborate ?

Cheers

Tim

On Tuesday, May 13, 2014 4:09:34 PM UTC+8, István Maczkó wrote:

 Hi

 This is a Complaint (bitter one).
 We have devoted ourself to App Engine development, started to develop for 
 Adwords API, with Adwords API Python library.
 The last version (v201402) python libraries are not compatible with App 
 Engine. No warning, no announcement,  just simply does not work.
 Wo got a useless answer on Adwords API Forum from the API team (
 https://groups.google.com/forum/#!searchin/adwords-api/migrating$20appengine/adwords-api/vRlFWKcZhv4/Bhy5azEPWUMJ
 ):

 The Python libraries are not currently compatible with AppEngine.  We're 
 aware of this and are working on it, but I don't have a specific date for 
 when AppEngine support will be available.

 Our company is a advertisin agency, our customer use Adwords so we use it, 
 manage their account. I write on this forum as App Engine could lose us as 
 customer, so you will have less revenue not Adwords team.

 I expected more care and more harmonization from Google.

 Regards,

 István


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


Re: [google-appengine] Stange log (twice start with two successive requests)

2014-05-17 Thread timh
Tasks need to be written so that they are idempotent (ie can be run again 
at any point without changing the result).  I don't know why you task is 
being run twice,
but this is always a possible but unlikely outcome so they need to be able 
to deal with this possibility.

T

On Saturday, May 17, 2014 8:23:56 PM UTC+8, Malleswari Srinivasarao wrote:

 Hi, 
 May I know the reason for running same process in multiple 
 instances. I too faced this in my application, but it was not happened at 
 the time of loading the application instead, it happened while task queue 
 was serving one request. The same request handled twice with different 
 instances at approximately same time (milliseconds difference is there). 
 The task which my task queue processing was, very sensitive information, 
 because of this happened, it resulted me great loss as duplication 
 happened. 

Kindly tell me what was the *reason *to run the same request with 
 two different instances and *how to avoid* this. I can say, it was not 
 happening all the time, but when it happens, so much duplication of data 
 occurred in my case.

  One thing I have observed is, one request was running say, 
  /tasks/procesInfo , after sometime, the same process, 
  /tasks/procesInfo was running in different instance and these two are 
 parallelly running.  Please help me. 

 Thanks,
 Malleswari.






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


Re: [google-appengine] Re: Python Google App Engine Shopping Cart

2014-05-15 Thread timh
I am not aware of any.  Foxycart would be easy integrate as it is a 
seperate service you use, rather than run in your own server.

T

On Thursday, May 15, 2014 6:41:26 AM UTC+8, Garry Keneth Garcia wrote:

 I know there are a lot. What I want specifically is Webapp2 + GAE + 
 Datastore = Shopping Cart. Do you know anything like this?

 On Thursday, 27 February 2014 01:54:02 UTC+8, Vinny P wrote:

 On Tue, Feb 25, 2014 at 2:49 PM, Garry Keneth Garcia gkmg...@gmail.com
  wrote:

 This is cool! I am actually planning to build one. 



 You don't necessarily have to build a shopping cart, there are already a 
 handful out there: 
 https://www.djangopackages.com/grids/g/ecommerce/https://www.google.com/url?q=https%3A%2F%2Fwww.djangopackages.com%2Fgrids%2Fg%2Fecommerce%2Fsa=Dsntz=1usg=AFQjCNEwNfS97fgCO60x2uIJPngQurmDXQ

 Do you have a specific issue that isn't addressed by currently-available 
 carts?
  
  
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

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


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


[google-appengine] Re: Finding the source of datastore reads

2014-05-12 Thread timh
appstats is still the tool you need to use

On Tuesday, May 13, 2014 4:15:38 AM UTC+8, Joshua Smith wrote:

 One of my apps has a lot more datastore “read” operations than I would 
 expect. 

 This particular app is still on Python 2.5 but he is using the High 
 Replication datastore. 

 What’s the best way for me to find the datastore read hotspot? 

 Is it still appstats, or is there something new that’s replaced that? 

 -Joshua 



-- 
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: too many appengine frontend instances

2014-05-09 Thread timh
I am still on 1.9.4 and not seeing this.

Is everyone experiencing this rolled over to 1.9.5 ?

T

On Friday, May 9, 2014 11:40:19 AM UTC+8, blackdew wrote:

 my server make too many Frontend instances

 may be it make instance per request

 from 2 hours ago

 and my last deploy was yesterday may be 24 hours ago

 so, help and give me any advice

 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 http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Very low performance in appengine endpoints

2014-05-05 Thread timh
You images are too small to see detail. However just looking at the graph 
and number of steps it looks like when you fetch entities
you are doing it one entity at a time which means a lot of round trips 
(rpcs).  Which can slow things down enourmously.

You probably need to look at the code that retrieves entities.  Look at 
using larger batch sizes.  You haven't mentioned what language or 
datastore access mechanism (ie on python, db or ndb) etc.

T

On Monday, May 5, 2014 5:19:25 AM UTC+8, DiTieM wrote:

 Hello Vinni,

 Thank you for the quick reply. 

 I did install appstats and try to find out if there were the bottle necks. 
 The chart was basically reading from the datastore and then there was a 5 
 seconds without any information. Now it behaves different because it 
 reads all from memcache (as you will see, there is no big improvement). I 
 am going to make an screenshot without the memcache, it will take some time.


 I also measured the time (using time.time( )) between different moments of 
 the answer. Here is the log:

  22:31:54.677 GETTING KEYS 0.182710
  22:31:58.785 GETTING TRIPS 4.290660
  22:31:58.785 FILTERING 0.000270
  22:31:58.794 GETtING TA PROFILE 0.008220
  22:32:04.771 COMPOSING ANSWER 5.977440
  22:32:04.854 GETTING RATES 0.083230

 If there is any other information you can consider useful just let me know.



 https://lh3.googleusercontent.com/-tP-3QzK6AYI/U2auD4TlV4I/EmE/Z7K3TzmZhtk/s1600/appstats.png



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


Re: [google-appengine] Very low performance in appengine endpoints

2014-05-05 Thread timh
Hi

Completely missed the tag (can't say I ever look at them)

Looking at the graph you are doing an awful lot of memcache gets and sets 
one after another and each rpc costs time (round trip etc)
Just looking at the graph it tells me you code is behaving inefficiently. 
 You want as few steps in the graph as possible  as each one has a fairly 
fixed overhead in terms of roundtrip.
For instance if there is 30ms base overhead for each round trip excluding 
any work, and you do 100 rpcs then thats an immediate 3000ms added to you 
processing time.

These means start batching operations,  for instance you can do get_multi 
and set_multi when using memcache.  

I am having trouble working out what you code is trying to do (hard to read 
here and incomplete), but basically you need to try and batch all 
operations.
Its not clear why you have so many memcache.set's interleaved with all the 
gets.  Again try and do it all at the end in a few operations.

The evidence as to where all you time is going is in the graph.

T


On Monday, May 5, 2014 6:37:36 PM UTC+8, DiTieM wrote:

 You images are too small to see detail



 https://lh6.googleusercontent.com/-e3uAabHttKI/U2dpnjlQe_I/EmU/aYWYkuuQs3A/s1600/appstats.png
 Apologies, Google Groups resized. I did not notice till you mentioned. 
 The image is 1.7 mg and it was 1400 pixels wide. I cropped it, hope this 
 time it will be more visible.
  

 You probably need to look at the code that retrieves entities.  Look at 
 using larger batch sizes.  You haven't mentioned what language or 
 datastore access mechanism (ie on python, db or ndb) etc.


 the tag of the message: python27, I thought people used that for saying 
 the language, I guess not easy to read. I am using ndb, as db is 
 deprecated.
  
 Removing some if-then-else, the code is like this:

 query = TATripDB.query( TATripDB.draft == 0 )

  if request.offset:
  cursor = Cursor( urlsafe = request.offset )
  else:
  cursor = None

 # limit = request.limit
 rows, next_cursor, more  = query.fetch_page( 200, start_cursor = 
 cursor )

 ret = [ ]
 com_cache = { }
 cur_cache = { }

 if rows:
 unique_temporal_user = self.get_ta_profile( rows[ 0 
 ].from_agency )

 for r in rows:
 ret.append( get_tatrip_answer( unique_temporal_user
 # user_set[ r.key.parent( 
 ).id( ) ]
   , r
   , vlc_of_trip_key( 
 userID_key, r.key )
   , cur_cache
   , com_cache ) )

  return ExploreTATripA( trips  = ret
  , next_token = next_token 
  , cur_rates  = cur_rates  )


 The version of the memcache introduce some changes:

 tatrips_keys = memcache.get( 'TATRIPS_KEYS' )

 if tatrips_keys:
 rows = map( lambda x: self.get_tatrip_from_key( x 
 ), tatrips_keys )

 I thought of using this method to avoid putting big object in memcache. 
 This is maybe what you refer as getting in larger batch size? Later I am 
 going to do some more experiments. Thank you for the suggestion!


-- 
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: [JAVA] How to join two entity with app engine into the server ?

2014-04-22 Thread timh
Something I truly do not understand, is why so many people persist in 
talking about tables (and all that tables implies) when when designing
applications using the datastore especially with so much documentation 
available covering what the datastore does and how it works. 
The datastore has been around since 2008, (and similiar datastores since 
2000 and even earlier) this isn't new stuff.

It's just not a relational model and there is no SQL.  If people don't sit 
back and try and understand how it works
and what features it does have, they can't exploit its model and will 
invariably make bad design decisions.

Is this because no one reads/understands documentation anbd won't explore, 
or is a particular mindset so ingrained that any other way
becomes difficult ?

T

On Sunday, April 6, 2014 10:46:04 PM UTC+8, Julien De Almeida wrote:

 Hello,

 I want to create a Map object with key a Party and value a Player.
 But I don't know how to join this two entity.
 My entity Party have three fields (id, player1_id and player2_id).
 My entity Player have three fiedls (id, email and surname)

 I want to join like that :
 SELECT * FROM Party, Player WHERE Party.player1_id = Player.id AND 
 Party.player2_id IS NULL;

 Someone can help me?

 Thx


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


Re: [google-appengine] High latencies over the last 12 or so hours

2014-04-10 Thread timh
Yes, performance has been much better today.

Just the usual spate of chinese (or russian, ukraine or US ;-) sites trying 
to probe the app for PHP and asp vulnerabilities ;-)

Cheers

Tim 

On Thursday, April 10, 2014 4:12:48 PM UTC+8, Vinny P wrote:

 On Wed, Apr 9, 2014 at 4:23 AM, timh zute...@gmail.com javascript:wrote:

 Has anyone noticed higher than normal latencies over the last 12 hours or 
 so.
 I normally see 1000ms mostly around 300-400ms,. but most requests today 
 are int he 3000-4000ms territory



 Same, but now the latency seems to be settling down quite a bit.
  
  
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

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



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


[google-appengine] High latencies over the last 12 or so hours

2014-04-09 Thread timh
Hi

Has anyone noticed higher than normal latencies over the last 12 hours or 
so.
I normally see 1000ms mostly around 300-400ms,. but most requests today 
are int he 3000-4000ms territory

Cheers

Tim

-- 
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: there may be something wrong with put_async

2014-04-09 Thread timh
You should read the docs a bit more.  

In the intro to async operations it even says

In this example, it's a little silly to call future.get_result: the 
application never *uses* the result from NDB. That code is just in there to 
make sure that the request handler doesn't exit before the NDB put finishes; 
if the request handler exits too early, the put might never happen. As a 
convenience, you can decorate the request handler with@ndb.toplevel. This 
tells the handler not to exit until its asynchronous requests have 
finished. This in turn lets you send off the request and not worry about 
the result.


https://developers.google.com/appengine/docs/python/ndb/async

On Wednesday, April 9, 2014 11:26:07 PM UTC+8, saintthor wrote:

 model.put_async()

 then return. without calling Future.get_result(). shouldn't the model be 
 written to datastore?


-- 
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: puzzle about Ancestor Queries

2014-04-07 Thread timh
They will mean write (create),  there are through put limits on writes for 
entity groups.
There aren't limits on read/queries

T

On Monday, April 7, 2014 1:55:16 PM UTC+8, saintthor wrote:

 https://developers.google.com/appengine/docs/python/ndb/queries

 in sector  Ancestor Queries, the last line:

 Remember, this is limited to one purchase per second. 

 what is 'one purchase per second' mean? i can create only 1 purchase 
 instance per second, or can do 1 query per second?



-- 
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: what may cause this and how to avoid? This request caused a new process to be started for your application...

2014-04-07 Thread timh
This is normal if you are not using warmup requests. Instances need to 
start to service increasing load, and if you don't have warmup requests 
enabled then a user facing request can start an instance.

T

On Monday, April 7, 2014 12:03:31 PM UTC+8, saintthor wrote:

 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.

 i see some of requests log these words. i wonder how to avoid it. i am using 
 python2.7 and webapp2.



-- 
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: what may cause this and how to avoid? This request caused a new process to be started for your application...

2014-04-07 Thread timh
This isn't a widespread problem.

I have a low traffic (billing enabled) with the following settings 

1 resident, typically 1  or 2 dynamic instances all the time

Idle Instances: ( 1 – 2 )
Pending Latency: ( 900ms – 4.6s )

The dynamic instance age 1 day, 15 hours at the moment.

The only time I see instance startup  messges This request caused a new 
process to be started  
is when I get hit by some really bad behaved SEO bot. That walks the entire 
site in the space of a minute or twp.
In fact this is the only time I have seen a DEE in about 2 months.

This is all python.

You may be stuck in a a bit of appengine infrastructure with poorly 
performing scheduler.
It might be worth logging a fault.

T





On Tuesday, April 8, 2014 4:54:05 AM UTC+8, Iron Mountain Foundry wrote:

 I am seeing the same thing.  It seems to have really increased since April 
 1 to the point that every single request causes a new process.  I posted 
 this on another thread titled Processes are expiring way too soon.  I 
 will follow this thread instead.

 My application already allows warmup requests and uses webapp2 request 
 handlers for fast URI routing.

 Vinny suggested increasing the Min Pending Latency slider on the 
 Application Settings page.  It seems to help on AJAX requests within a page 
 but every separate page still starts a new request.  This behavior is new 
 and really hurts a low volume single-instance application.

 AppEngine team, please allow applications to stay around for more than one 
 second (like they used to).  Thank you!



 On Sunday, April 6, 2014 9:03:31 PM UTC-7, saintthor wrote:

 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.

 i see some of requests log these words. i wonder how to avoid it. i am using 
 python2.7 and webapp2.



-- 
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: how to prevent tasks to retry?

2014-04-05 Thread timh
For starters trap any exception, and make sure you return a 200 exit code. 
 This includes trapping things like DeadlineExceededError.

T

On Saturday, April 5, 2014 5:41:36 PM UTC+8, saintthor wrote:

 sevral years before, i used the taskqueue like:

 taskqueue.add( url='/zzz', method = GET, countdown = 6 )


 now, i want to make the task do not retry for exception. i want to add 
 some keywords in the 'add' function. but i can not find it in the document.


 in document, there is only: add(task, transactional=False)


 where is the style i used before?


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


Re: [google-appengine] When does new pricing come into effect?

2014-04-01 Thread timh
It's the 2nd here (GMT+8) and my dashboard now shows new pricing.

Cheers

Tim

On Tuesday, April 1, 2014 3:43:09 PM UTC+8, Luca de Alfaro wrote:

 It's April 1 and there is no new pricing yet on the appengine console.  
 Perhaps this is just the delay in the update propagating? 
 Luca

 On Wednesday, March 26, 2014 11:44:33 PM UTC-7, PK wrote:

 Pricing

 Prices are effective April 1, 2014
 --Panos

 On Mar 26, 2014, at 11:38 PM, timh zute...@gmail.com wrote:

 Hi

 Has anyone seen the new pricing showing up in their console.  Mine still 
 shows instance hours at $0.08/ Hour
 though the docs now officially say $0.05/ Hour.

 Cheers

 Tim

 -- 
 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-appengi...@googlegroups.com.
 To post to this group, send email to google-a...@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-appengine.
 For more options, visit https://groups.google.com/d/optout.



-- 
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: What to do with a bad instance?

2014-03-28 Thread timh
Hi Alex

It could.  What we did was wrap the entire handler in a try: block, then in 
the except section set a instance/module level variable to signal a failed 
startup (error in the handler)

Then if there was time we would try and allocate enough memory to kill the 
process.  After DEE you might have a grace period of just under second 
before the instance is killed.

If the instance didn't get killed then when n the second request hit the 
server it would see the instance defined flag then immediately allocate 
enough memory to kill the instance

So it wouldn't really matter what type of request (warmup or normal) that 
hit the instance

Cheers

Tim


On Saturday, March 29, 2014 12:18:03 AM UTC+8, Alex Burgel wrote:

 Thanks Tim. That was the problem.

 I have warmup requests on, but the first request was a non-warmup loading 
 request which got a DeadlineExceededError. Your fix probably wouldn't work 
 since its not a warmup request.

 I found this bug report, marked as Won't Fix. It provides some background 
 in case anyone else runs into it. Looks like there's no good answer.

 https://code.google.com/p/googleappengine/issues/detail?id=1409

 --Alex

 On Thursday, March 27, 2014 2:27:15 AM UTC-4, timh wrote:

 Go back through the logs for the instance, and see if it had a 
 DeadlineExceeded Error during startup.  

 My guess is you are not using warmup requests, and the instance hasn't 
 started properly leaving imports in a bad state.

 This used to happen a lot in the early days when startup times in python 
 could be unreliable on M/S.

 The only way to deal with it at the time (because you couldn't kill 
 instances) was to wrap the entire handler in a try block, and if you got an 
 import error inside the handler
 I would allocate enough memory to kill the instance.

 Cheers

 Tim

 On Thursday, March 27, 2014 9:42:27 AM UTC+8, Alex Burgel wrote:

 Every so often (once a month or less), I get an instance that just 
 doesn't work. Every request fails with some error in library code that 
 indicates something is profoundly screwed up, like an import fails or some 
 line of obviously correct code throws an exception.

 When this has happened in the past, I would get a bunch of error emails 
 and I would just shutdown the instance and hope that it was a fluke. Today 
 it happened while I was on a flight, so for about 3 hours, this broken 
 instance was returning errors for most of the requests hitting my app.

 This is the exception (app named changed to protect the innocent):

 Traceback (most recent call last):

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/core/handlers/base.py,
  
 line 101, in get_response
 resolver_match = resolver.resolve(request.path_info)

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/core/urlresolvers.py,
  
 line 318, in resolve
 for pattern in self.url_patterns:

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/core/urlresolvers.py,
  
 line 346, in url_patterns
 patterns = getattr(self.urlconf_module, urlpatterns, 
 self.urlconf_module)

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/core/urlresolvers.py,
  
 line 341, in urlconf_module
 self._urlconf_module = import_module(self.urlconf_name)

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/utils/importlib.py,
  
 line 40, in import_module
 __import__(name)

   File /base/data/home/apps/s~xxx/8.374612775992938880/urls.py, line 
 4, in module
 from swaagit import admin as swaag_admin, sites

   File /base/data/home/apps/s~xx/8.374612775992938880/xxx/admin.py, 
 line 12, in module
 from mapreduce.site import site as mapreduce_site

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/xxx/mapreduce/site.py, 
 line 5, in module
 from mapreduce import base_handler

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/mapreduce/base_handler.py,
  
 line 44, in module
 from mapreduce import model

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/mapreduce/model.py, 
 line 61, in module
 from mapreduce import context

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/mapreduce/context.py, 
 line 40, in module
 from google.appengine.ext import ndb

   File /base/data/home/runtimes/python27/python27_lib/versions/1/
 google/appengine/ext/ndb/__init__.py, line 8, in module
 __all__ += tasklets.__all__

 NameError: name 'tasklets' is not defined

 Clearly a NameError in SDK code means that something is very wrong. Yet, 
 this instance happily continued serving traffic for hours.

 Are there not some smoke tests or verification tests that are run before 
 an instance is put into production? How does everybody else deal with this 
 problem?

 --Alex



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

[google-appengine] Re: What to do with a bad instance?

2014-03-27 Thread timh
Go back through the logs for the instance, and see if it had a 
DeadlineExceeded Error during startup.  

My guess is you are not using warmup requests, and the instance hasn't 
started properly leaving imports in a bad state.

This used to happen a lot in the early days when startup times in python 
could be unreliable on M/S.

The only way to deal with it at the time (because you couldn't kill 
instances) was to wrap the entire handler in a try block, and if you got an 
import error inside the handler
I would allocate enough memory to kill the instance.

Cheers

Tim

On Thursday, March 27, 2014 9:42:27 AM UTC+8, Alex Burgel wrote:

 Every so often (once a month or less), I get an instance that just doesn't 
 work. Every request fails with some error in library code that indicates 
 something is profoundly screwed up, like an import fails or some line of 
 obviously correct code throws an exception.

 When this has happened in the past, I would get a bunch of error emails 
 and I would just shutdown the instance and hope that it was a fluke. Today 
 it happened while I was on a flight, so for about 3 hours, this broken 
 instance was returning errors for most of the requests hitting my app.

 This is the exception (app named changed to protect the innocent):

 Traceback (most recent call last):

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/core/handlers/base.py,
  
 line 101, in get_response
 resolver_match = resolver.resolve(request.path_info)

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/core/urlresolvers.py,
  
 line 318, in resolve
 for pattern in self.url_patterns:

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/core/urlresolvers.py,
  
 line 346, in url_patterns
 patterns = getattr(self.urlconf_module, urlpatterns, 
 self.urlconf_module)

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/core/urlresolvers.py,
  
 line 341, in urlconf_module
 self._urlconf_module = import_module(self.urlconf_name)

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/django/utils/importlib.py, 
 line 40, in import_module
 __import__(name)

   File /base/data/home/apps/s~xxx/8.374612775992938880/urls.py, line 4, 
 in module
 from swaagit import admin as swaag_admin, sites

   File /base/data/home/apps/s~xx/8.374612775992938880/xxx/admin.py, 
 line 12, in module
 from mapreduce.site import site as mapreduce_site

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/xxx/mapreduce/site.py, 
 line 5, in module
 from mapreduce import base_handler

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/mapreduce/base_handler.py, 
 line 44, in module
 from mapreduce import model

   File /base/data/home/apps/s~xxx/8.374612775992938880/mapreduce/model.py, 
 line 61, in module
 from mapreduce import context

   File 
 /base/data/home/apps/s~xxx/8.374612775992938880/mapreduce/context.py, 
 line 40, in module
 from google.appengine.ext import ndb

   File /base/data/home/runtimes/python27/python27_lib/versions/1/
 google/appengine/ext/ndb/__init__.py, line 8, in module
 __all__ += tasklets.__all__

 NameError: name 'tasklets' is not defined

 Clearly a NameError in SDK code means that something is very wrong. Yet, 
 this instance happily continued serving traffic for hours.

 Are there not some smoke tests or verification tests that are run before 
 an instance is put into production? How does everybody else deal with this 
 problem?

 --Alex


-- 
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] When does new pricing come into effect?

2014-03-27 Thread timh
Hi

Has anyone seen the new pricing showing up in their console.  Mine still 
shows instance hours at $0.08/ Hour
though the docs now officially say $0.05/ Hour.

Cheers

Tim

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


Re: [google-appengine] Requests and Instances

2014-03-17 Thread timh
I agree with Barry.  

instance level caching should really be kept for data that won't change for 
the life of the instance.  ie static data that will only be changed with a 
new deployment. due to all the issues
of cache invalidation.

However there is one other level of cache often overlooked and that is 
request level caching.  (not sure how that can be performed in java :-)

If you have entities that your code base may refer to multiple times during 
the life of the request, then caching these entities at the request level 
can be 
a big win. the cache layers then look likedatastore - memcache - 
request cache

applicability obviously depends on the use case.

Cheers

Tim


On Monday, March 17, 2014 8:56:12 PM UTC+8, barryhunter wrote:

 You could perhaps do it in a very crude fashion using traffic splitting. 

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

 ie users can be directed to a consistent(ish) version. And each version 
 has its own instances. 


 But you can't stop each version spawning multiple instances, and hence 
 invalidating and instance cache. 


 As noted, use Memcache!




-- 
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: Property corrupt in the datastore

2014-03-11 Thread timh
Did you change it's type.  It looks like you have just added some value to 
the property and the Datastore viewer can't deal with the encoding.

Have you tried retrieving the property directly in code or via the 
remote_api_shell.

I don't believe appengine is corrupting data.

T

On Wednesday, March 12, 2014 4:04:27 AM UTC+8, Arthur Wiebe wrote:

 I just recently started seeing problems in my app where a specific 
 property just seemed to disappear.

 And if I use the Datastore Viewer under 
 https://appengine.google.com/datastore/explorer I see the following 
 error: (I renamed the actual property name to my_property_name)

  Error fetching entities: Property my_property_name is corrupt in the 
 datastore: Traceback (most recent call last): File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/datastore.py
 , line 1145, in _FromPb value = datastore_types.FromPropertyPb(prop) File 
 /base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/datastore_types.py
 , line 1850, in FromPropertyPb value = unicode(value, 'utf-8') 
 UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 0: 
 unexpected code byte

 This has happened with 2 separate Kinds, all the others seem to be OK.

 I'm really concerned about this which seems to be data corruption on 
 Google's end. If it was my fault that would be one thing but during the 
 time this happened I didn't make any major changes.

 Also I'm using Python with the NBD Datastore.


-- 
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: Efficient way to store lists of smallish integers

2014-03-06 Thread timh
A repeated IntegerProperty is not that inefficient, and explicitly turn off 
the index if you don't need it.

Alternately you options are a BlobProperty (pickle the list first) or as 
you say store it as json.

T

On Thursday, March 6, 2014 4:50:56 PM UTC+8, Pertti Kellomäki wrote:

 I need to store lists of smallish integers. The lists consist of a few 
 tens of integers, and the integers are in the triple digit range.

 I could obviously use IntegerProperty(repeated=True), but since the lists 
 are basically only used at client side, this feels a bit overkill. There is 
 no need to search or index the lists.

 What would be the most efficient way to store these lists? I'm thinking of 
 simply storing them as json strings, but is there something else that I 
 could use?
 -- 
 Pertti Kellomäki, Kesanto Enterprises
 Your training in the cloud: http://www.trainingcommons.com 


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


Re: [google-appengine] Python27 + new dev_appservery.py + debugging

2014-03-03 Thread timh
+1  I have worked on numersous projects with very large code bases on 
appengine, and I prefer pdb, and don't use Eclipse.

On Tuesday, March 4, 2014 5:53:06 AM UTC+8, D X wrote:

 From my experience, stepping through code is much slower on eclipse than 
 pdb.

 I disagree with your other comments; pdb is fine for professional use on 
 huge projects.





 On Sunday, March 2, 2014 3:57:22 PM UTC-8, Cezary Wagner wrote:

 I found some combo like Pydev 3.3.3 + Eclipse 3.8.x (but no Django 
 templates support or Aptana!).

 It allow fast debugging with little slower coding.

 W dniu poniedziałek, 3 marca 2014 00:49:14 UTC+1 użytkownik Cezary Wagner 
 napisał:

 Thanks for hints - it is not helpful.

 Discussion is very old and there is not clear conclusion

 In my opinion pdb is good for hobbists - placing break points by editing 
 code it is good for 100 lines programs or amateurs - sadomacho :)

 It looks that I can not use dart, endpoints because there is no usable 
 debugger for it :)

 W dniu niedziela, 2 marca 2014 17:50:44 UTC+1 użytkownik Vinny P napisał:

 On Sat, Mar 1, 2014 at 9:59 AM, Cezary Wagner cezary...@gmail.com
  wrote:

 What is the best tools to use dev_appserver.py with breakpoint and 
 debugging - what is the best choice.




 Hi Cezary,

 You might want to read this forums discussion here: 
 https://groups.google.com/forum/#!topic/google-appengine/ep5BWYKpQpU - 
 there's an interesting discussion on Python debugging with the 
 dev_appserver.

 If you're OK with debugging using pdb, you'll want to read this message 
 in particular: 
 https://groups.google.com/d/msg/google-appengine/ep5BWYKpQpU/41asdxKhuycJ
   
  
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

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


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


Re: [google-appengine] Re: Show and Tell: Plexi Voice a Windows Phone 8 App with AppEngine backend.

2014-03-02 Thread timh
HI Brandon

I agree, moving a groups self support to stackoverflow seems to be a 
detriment to the building of a supportive community.

Cheers

Tim



On Monday, March 3, 2014 3:34:01 AM UTC+8, Brandon Wirtz wrote:

 Kaan, 

  

 Before most of the questions and answers moved to Stack Overflow, there 
 was a lot more show and tell on this forum. 

 I don’t hang out here as much as I used to because the group lost a lot of 
 community after them move.

 I hope people will share more about what they are doing, and why they made 
 the decisions they did. We have more choices than we used to, and it is 
 hard to keep up with everything, so a good “why I did X” can often help us 
 all decide if we did the right thing or not.

 -Brandon

  


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


Re: [google-appengine] Re: 1.8.8 Pre-Release SDKs are now available.

2014-02-28 Thread timh
I have successfully used SOAP as a client on appengine  using python.

I use SUDs, and  pre-process the WSDL files effectively pre-loading the 
file cache.
Had to patch SUDS for this to work.

This is used to get dynamic shipping quotes from Temando via their SOAP 
service.

T


On Saturday, March 1, 2014 7:53:14 AM UTC+8, cr...@portical.com.au wrote:

 Hi Vinny,

 I am simply trying to setup and use a soap client and am having the issues 
 posted https://code.google.com/p/googleappengine/issues/detail?id=9858

 If we have socket support now, any ideas as to why this does not work?

 As far as I am aware no one has been able to successfully use soap with 
 GAE.

 On Wednesday, February 12, 2014 2:59:53 PM UTC+10, Vinny P wrote:

 On Sat, Feb 8, 2014 at 1:01 AM, cr...@portical.com.au wrote:

 Where do I find the Sockets API? I do not see it listed under APIs in 
 the Developers Console.
 I have billing enabled.



 The Sockets API isn't a service like the other Google Cloud Platform APIs 
 are (i.e. images, task queue, etc). Having the Sockets API merely means 
 that you can now use low level sockets to connect to external servers 
 rather than using URL Fetch.

 Since you said you have billing enabled, there's nothing left for you to 
 do. Just start writing socket-using code into your application and it'll 
 work. 
   
  
 -
 -Vinny P
 Technology  Media Advisor
 Chicago, IL

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


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


[google-appengine] Re: Appengine Python seems to be slow after the general release of 1.9

2014-02-27 Thread timh
Things seem to have settled back down to more normal response times and 
scheduler behaviour.

T

On Thursday, February 27, 2014 9:10:24 AM UTC+8, timh wrote:

 Scheduler behavior seems to be all over the shop as well.
 Hopefully this will settle down soon :-)

 T

 On Thursday, February 27, 2014 8:22:13 AM UTC+8, timh wrote:

 Hi

 I hope this is just an artifact of the roll out of 1.9 and things settle 
 down.
  At the moment appengine seems very slow, actions that are normally sub 
 200ms is up above 800ms, and things that might take 800ms are somewhere 
 between 1300ms and 4000ms.

 In the last 6 hours loading latency has also gone from sub 4000ms to 
 around nearly 6000ms.

 Cheers

 Tim



-- 
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] Appengine Python seems to be slow after the general release of 1.9

2014-02-26 Thread timh
Hi

I hope this is just an artifact of the roll out of 1.9 and things settle 
down.
 At the moment appengine seems very slow, actions that are normally sub 
200ms is up above 800ms, and things that might take 800ms are somewhere 
between 1300ms and 4000ms.

In the last 6 hours loading latency has also gone from sub 4000ms to around 
nearly 6000ms.

Cheers

Tim

-- 
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: Appengine Python seems to be slow after the general release of 1.9

2014-02-26 Thread timh
Scheduler behavior seems to be all over the shop as well.
Hopefully this will settle down soon :-)

T

On Thursday, February 27, 2014 8:22:13 AM UTC+8, timh wrote:

 Hi

 I hope this is just an artifact of the roll out of 1.9 and things settle 
 down.
  At the moment appengine seems very slow, actions that are normally sub 
 200ms is up above 800ms, and things that might take 800ms are somewhere 
 between 1300ms and 4000ms.

 In the last 6 hours loading latency has also gone from sub 4000ms to 
 around nearly 6000ms.

 Cheers

 Tim


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


Re: [google-appengine] Re: Snapchat

2014-02-21 Thread timh
Hi

Even at $5 a day it is cheap, so lets work with that nice round number. 
 There is no other infrastructure cost, there are no devops support people 
involved.

So I have been looking at other PAAS, (not interested in anything less 
thant that)  if nothing else than to broaden my understanding of what is 
out there.

Heroku, (just to add auto scaling which it doesn't have out of the box, so 
you need adept-scale (min $18 per month) or HireFire ($10) on top of what 
you your paying to Heroku.

Openshift does have autoscaling, so you are up for $20 per month, plus 
usage costs for 3 small gears. So this might be cheaper, but I haven't run 
anything on it yet to know.

There are others obviously but a lot don't seem to provide auto scaling.

The App I talked about has a very peaky use, no one uses it over the 
weekend, big peaks in the morning and afternoon.  It's an evidence tracking 
systems (evidence of work/course material done) and has to be used.  There 
are millions of entities in the datastore and growing.  It is a big python 
application with full role based access control. There is audit trail 
records created for everything performed in the system.

A large part of the system uses AJAX, and it is not really a multipage 
application, so pageviews are somewhat meaningless form of measurement.  

There historically has been some unreliability and since moving off M/S to 
HRD that's pretty well gone away.
 
Any way you cut it $5 a day is a reasonable price for an application that 
is not relying on advertising for it's revenue.

Just my 2c worth

T

On Saturday, February 22, 2014 12:54:54 AM UTC+8, Tapir wrote:



 On Tuesday, January 21, 2014 7:52:40 PM UTC+8, timh wrote:

 Just for the record, the app I was talking about might only have 2000 
 users, but it is by no means a simple application.

 I has approximateley 30 different models.  Fully defined with RBAC 
 security model scoped down to parts of models.   
 reporting, audit trail records for every change to data, (when and what 
 was changed, by who), etc  

 The entire system is modeled in UML, python models, views, URL paths, 
 security declarations, form schemas all directly generated from the model.
 What elements of a view appear for the combination of user, context, and 
 view control page layout, so the application is intensely dynamic and most 
 cached data's scope is only effective for a single user.

 So even complex applications can be run in a cost effective manner on 
 appengine.


 2000 users? how many pageviews per day?

 costs only $2-$3 a day? Only? 
 If there is no the free hours, it would be $5, right?

 $5 per day for 2000 users? and it is cost effective? Really!!!

  


 But no point trying to stick a square peg in a round whole.  If you data 
 model, or processing requirements don't suit appengine and you can't start 
 instances quickly then 
 you may well be on the wrong platform.

 Now more than my 2c worth ;-)

 T



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


Re: [google-appengine] Re: Snapchat

2014-02-21 Thread timh



 All you above said has nothing related to proving GAE is cheap or not!


Sorry I don't understand what you mean by cheap.  What is cheap, compared 
with what ?  Unless there is some basis for comparison then 
how do you prove/disprove cheapness. 

By any measure for me $5 a day is cheap for the service provided.  Tell me 
how you want to measure cheap!

T



 


 Just my 2c worth

 T

 On Saturday, February 22, 2014 12:54:54 AM UTC+8, Tapir wrote:



 On Tuesday, January 21, 2014 7:52:40 PM UTC+8, timh wrote:

 Just for the record, the app I was talking about might only have 2000 
 users, but it is by no means a simple application.

 I has approximateley 30 different models.  Fully defined with RBAC 
 security model scoped down to parts of models.   
 reporting, audit trail records for every change to data, (when and what 
 was changed, by who), etc  

 The entire system is modeled in UML, python models, views, URL paths, 
 security declarations, form schemas all directly generated from the model.
 What elements of a view appear for the combination of user, context, 
 and view control page layout, so the application is intensely dynamic and 
 most cached data's scope is only effective for a single user.

 So even complex applications can be run in a cost effective manner on 
 appengine.


 2000 users? how many pageviews per day?

 costs only $2-$3 a day? Only? 
 If there is no the free hours, it would be $5, right?

 $5 per day for 2000 users? and it is cost effective? Really!!!

  


 But no point trying to stick a square peg in a round whole.  If you 
 data model, or processing requirements don't suit appengine and you can't 
 start instances quickly then 
 you may well be on the wrong platform.

 Now more than my 2c worth ;-)

 T



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


Re: [google-appengine] Re: Snapchat

2014-02-21 Thread timh
So based on a running cost less than 3% of revenue, then this app is REALLY 
REALLY REALLY cheap.

I don't have true pageviews because as I said its 80% ajax transactions, so 
new template rendering etc so not a comparable measure.  But just to 
please you on a typical day there is around 2200 pageviews , but between 5 
and 10 times that in terms of ajax transactions (which aren't monitored by 
analytics), but to be honest it's not something I really monitor closely as 
it not particularly important. 

Unless you compare features of a service, meeting a minimal base line for 
comparison any comparison is meaningless. You know apples and oranges.

I run another site that derives absolutely no direct revenue, it is their 
solely to get get people to visit a bricks and motor shop, and the $2 a day 
that is costing
is very cheap as all the advertising we run is Adwords (adwords is 
expensive) and the site running costs.  Yes I could run it on Digital Ocean 
or AWS small instance for probably cheaper, but then I have to look after 
infrastructure webstack/database, I do not have the time or inclination to 
do that.  So my measure of cheap is completely different to yours. 
I certainly don't measure the cost or quality of the service or the value 
of the outcomes in terms of pageviews per dollar  (at least not directly)

So I am not really going to bother with this discussion any more, in your 
opinion GAE  is not cheap, in my opinion by all the metrics that I am 
interested and the applications I run/develop on appengine it is. Does this 
mean I would run all new projects on appengine - absolutely not, I would 
pick the best (as much as I could) tool for the job.




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


Re: [google-appengine] Re: Snapchat

2014-02-21 Thread timh



 What the data all you provide exactly prove GAE is expensive!
 Your sense is not a typical common sense.
 Bill Gates will still think GAE is cheap if the F1 instance is charged 
 with $1000 per day.


What on earth are you smoking.  How does anything I said support your 
argument that GAE is expensive.

At no point do you EVER compare like for like.  So give us all a break.

I said the cost of the service is far below the 3% revenue.  Did you not 
see the REALLY REALLY cheap bit.
I am not made of money, but people derive their revenue from other sources 
not advertising. 

If you don't like it and it doesn't suit your revenue model then get off 
GAE. 



 


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


Re: [google-appengine] A comparison between Digital Ocean $5 plan and App Engine B$ instance type.

2014-02-18 Thread timh
Prove for your case and in your opinion, and different environments and 
application load will affect the cost structure.

I watch my applications carefully and I can say that I am not nor ever have 
been overcharged for the service provided.

But I use python, I rarely see scheduler problems, I don't have 
particularly high startup times, the last time I had an Error 500 was back 
in December when I got 3 in the space of 1 sec, when someone hit my site 
with an out of control crawler (tried to suck down the whole site in about 
5 secs).s  The other day someone hit my site with a about 5000 requests for 
PHP based urls, probing for PHP exploits, the traffic rate was about 10 
times normal for over half an hour and I sailed through with no problems at 
all.

So any problems/issues are not necessarily widespread or affect many people 
especially on other language runtimes.

T

On Tuesday, February 18, 2014 1:50:59 PM UTC+8, Tapir wrote:

 I don't care about if you are happy with GAE or not.
 I just want to prove the GAE compute part is much more too expensive than 
 it should be.

 On Tuesday, February 18, 2014 10:26:20 AM UTC+8, Damith C Rajapakse wrote:

 Our app https://teammatesv4.appspot.com has 100k entries in the 
 datastore, 8000+ users, and a traffic rate about 1 hit every 10 seconds, 
 plus bursts of traffic at certain times. My cost is less than $1 per day. 
 So GAE fits rather nicely with my use case.


 btw, not relative to this thread, how many active users of your app? 
 pageviews per day? Average front hours per day? what language do you use, 
 java/python/go?


-- 
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: Are auto generated Keys guessable?

2014-02-16 Thread timh
The numeric id's are sparsely generated unless you preallocate ranges, but 
they are in a finite range, so in theory some one can guess them.

Maybe you should hash them (along with some other data) and provide that 
instead, then store the hash and use that to lookup the id.

Alternately implement security (which is most cases is a better solution), 
such that no one can use other id's unless they have permission to. 

T

On Monday, February 17, 2014 9:23:39 AM UTC+8, Pok wrote:

 I can't seem to find any documentations about auto generated numeric keys 
 on whether the values are guessable or not.  I want to use the key as an 
 order number to give to the user, so I need something that is not 
 guessable.  

 I'm using JDO with these annotations in the primary key field


 @PrimaryKey
 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 private Long id;

 On the development server, it seems like the keys are sequential, while on 
 the live server, it looks like the key is base on the timestamp of the 
 transaction.  Is there somewhere I can find more information on how these 
 keys are generated?  Or is there a better way to generate ids that are safe 
 to give out as order numbers?  


-- 
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: type object 'datetime.datetime' has no attribute 'datetime' even with import datetime

2014-02-12 Thread timh
From the small snippets you have supplied what you are showing isn't 
possible.

e..g 

 import datetime
 class MyHandler(object):
... def get(self):
... print datetime
... 
 datetime
module 'datetime' (built-in)
 x = MyHandler()
 x.get()
module 'datetime' (built-in)

So other things are at work here.  You need to show a full set of working 
code that exhibits this problem.
You may have monkey patching going on. 

T



On Wednesday, February 12, 2014 3:44:21 PM UTC+8, John Del Rosario wrote:

 I'm getting `type object 'datetime.datetime' has no attribute 'datetime'` 
 errors on AppEngine, complaining about the datetime type, but my import is 
 `import datetime`. There *are* `from datetime import datetime` in *other* 
 files, but I don't think that should affect this file? 

 There's no 'accidental' re-imports, I've checked. I've checked my 
 AppEngine logs, and it only started happening 2 days ago. 

 I'm using 2.7 runtime. 

 Here's the line that's causing the error (note that I'm using `import 
 datetime`, NOT `from datetime import datetime`)

 task.due_at = datetime.datetime.strptime(date, '%Y-%m-%d %I:%M%p')

 Stack trace

 type object 'datetime.datetime' has no attribute 'datetime'
 Traceback (most recent call last):
   File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.1/webapp2.py,
  
 line 570, in dispatch
 return method(*args, **kwargs)
   File 
 /base/data/home/apps/s~wmphighrise/1.373696587983821954/myapp/handler/decorators.py,
  
 line 22, in wrapper
 return fn(*args, **kwargs)
   File 
 /base/data/home/apps/s~wmphighrise/1.373696587983821954/myapp/handler/api/main.py,
  
 line 1343, in post
 task.due_at = datetime.datetime.strptime(date, '%Y-%m-%d %I:%M%p')
 AttributeError: type object 'datetime.datetime' has no attribute 
 'datetime'

 Some debugging

 *Note*: `import datetime` is at the top

 #1st attempt
 import datetime
 class MyHandler():
   def get(self):
 logging.info(datetime) # = type 'datetime.datetime'
 
 #2nd attempt
 import datetime
 class MyHandler():
   def get(self):
 import datetime  # explicitly re-import the module
 logging.info(datetime) # = module 'datetime' (built-in)
 
 #3rd attempt
 import datetime
 class MyHandler():
   def get(self):
 logging.info(datetime) # = Throws UnboundLocalError: local 
 variable 'datetime' referenced before assignment
# Is this normal? This is new to me.
 import datetime
 logging.info(datetime)

 #4th attempt
 import datetime
 logging.info(datetime) # = module 'datetime' (built-in)
 class MyHandler():
   def get(self):
 logging.info(datetime) # = type 'datetime.datetime'
   
 Is there a way for a variable to be redefined *outside* the current file 
 or module? Because I've looked and looked at this file and there's no 
 redefining at all.

 See Stackoverflow 
 discussionhttp://stackoverflow.com/questions/21720678/type-object-datetime-datetime-has-no-attribute-datetime-even-with-import/21720833?noredirect=1#comment32847011_21720833for
  more info.


-- 
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: type object 'datetime.datetime' has no attribute 'datetime' even with import datetime

2014-02-12 Thread timh
For instance you are not supplying what the base class for MyHandler is. 
 Maybe some shenanigans are going on at the class level.

T

-- 
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: App engine import multiprocessing error

2014-02-10 Thread timh
You can't use multiprocessing on appengine.  Multiprocessing is for 
creating and coordinating sub processes for parallelism.
That is not an option on appengine.  Appengine has other facilities like 
async methods, task queues and backends (which can use traditional 
threading).

You will need to rethink your plans in terms of the facilities that 
appengine provides.

T


On Tuesday, February 11, 2014 4:20:53 AM UTC+8, tao hong wrote:

 I would like to use `multiprocessing` library for my site. However, I ran 
 into some import error in the local test environment. Can I have any 
 suggestions on how to fix this issue? or I have to use `threading` library 
  instead of `multiprocessing`. Thanks!

 Below is the traceback information.

 ERROR2014-02-10 19:34:52,315 cgi.py:121] Traceback (most recent 
 call last):
 
   File D:\Dropbox\ubertool_src\przm/przm_batchoutput.py, line 23, in 
 module
 
 import multiprocessing
 
   File C:\Python27\Lib\multiprocessing\__init__.py, line 65, in 
 module
 
 from multiprocessing.util import SUBDEBUG, SUBWARNING
 
   File C:\Python27\Lib\multiprocessing\util.py, line 40, in module
 
 from subprocess import _args_from_interpreter_flags
 
 ImportError: cannot import name _args_from_interpreter_flags


-- 
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: Google rdbms server error

2014-02-09 Thread timh
What is in your appengine logs?

On Monday, February 10, 2014 3:44:35 AM UTC+8, Dinakar Sandeep wrote:

 I have given Instance and database name . There is no errors in the 
 program . I am getting 500 error . I checked the database name and table 
 name It is correct .


-- 
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: Frontend Instance Hours running high.

2014-02-08 Thread timh
Yeah I had an elevated instance count today.

T

On Saturday, February 8, 2014 12:39:10 PM UTC+8, Nijin Narayanan wrote:

 I have notice that google appengine frontend instance hours running from 
 this week onwards anyone have facing same issue ?

 -Nijin Narayanan 


  

-- 
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: %20 is not interpreted as space on prodution server now? I remember old GAE SDKs did this.

2014-02-06 Thread timh
That behaviour depends entirely on what URL routing/traversing scheme you 
use and what stack you are using.

On Thursday, February 6, 2014 7:11:57 PM UTC+8, Tapir wrote:

 For example, http://www.example.com/profile/John%20Smith
 will not viewed as http://www.example.com/profile/John Smith

 But on dev server, it is still ok.


-- 
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: User facing requests going into the warm up instances and getting served

2014-01-29 Thread timh
You should look at your timestamps, some of your warmup requests are 
failing (DEE) and then you have activity that can't be served by a running 
instance, so another instance is being started to serve that request.

Can you do anything to speed up your startup times ?  Does it make sense to 
increase your pending latency ?





1. 
   1. 2014-01-29 15:34:46.267 /AccountingReports/accountingreports 200 
   49647ms 
   2. 
2. 
   1. 2014-01-29 15:34:45.359 /_ah/warmup 200 27303ms 0kb 
   module=default version=main
   2. 
3. 
   1. 2014-01-29 15:34:18.112 
   /multiValueSuggestBoxMgr/journalsuggestbox?tenantId=
   CP%20Real%20Estate%20Pvt%20ltd:26april1...@gmail.com javascript:
   branchId=5001q=l 200 395ms 2k
   2. 
4. 
   1. 2014-01-29 15:34:12.081 
   /multiValueSuggestBoxMgr/journalsuggestbox?tenantId=
   CP%20Real%20Estate%20Pvt%20ltd:26april1...@gmail.com javascript:
   branchId=5001q=7 200 404ms 0k
   2. 
5. 
   1. 2014-01-29 15:33:29.668 /AllVouchers/journal 500 61575ms 0kb 
 Mozilla/5.0 
   (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) 
   Chrome/31.0.1650.63 Safari/537.36 module=default v
   2. 
6. 
   1. 2014-01-29 15:33:05.084 /AccountingReports/accountingreports 200 
   22921ms 



-- 
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: Difference between Google App Engine SDK 1.7.5 and 1.8.9

2014-01-29 Thread timh
There are lots of chnages, you should read the release 
notes https://code.google.com/p/googleappengine/wiki/SdkReleaseNotes

On Wednesday, January 29, 2014 6:38:13 PM UTC+8, Raghu rao wrote:

 Hi All,

 Currently i am using App Engine Version 1.7.5 and i have no issues using 
 that. But Recently i updated SDK version to 1.8.9. i would like to know the 
 difference between 1.7.5 and 1.8.9 versions. Pls share the views on 1.8.9

 Thanks in Advance!!!





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


Re: [google-appengine] Re: Difference between Google App Engine SDK 1.7.5 and 1.8.9

2014-01-29 Thread timh
If your using python, then you are always running whatever google currently 
deploys (see the console).  This means if you are using an old SDK
you are basically missing features (not the end of the world) or possibly 
using something that may be deprecated but you will not be aware of it,(not 
a good idea)

If you are using python there is no reason not to be always using the 
latest released SDK (unless you are using python 2.5, in which case you 
probably need to be using 1.7.x as much later versions won't let you deploy)

T

On Wednesday, January 29, 2014 8:45:06 PM UTC+8, gops wrote:

 Also, app engine do not stick to all the version simultaneously, and only 
 latest version is likely to work on the server, so one should update as 
 soon as it releases. 


 On Wed, Jan 29, 2014 at 4:56 PM, timh zute...@gmail.com javascript:wrote:

 There are lots of chnages, you should read the release notes 
 https://code.google.com/p/googleappengine/wiki/SdkReleaseNotes


 On Wednesday, January 29, 2014 6:38:13 PM UTC+8, Raghu rao wrote:

 Hi All,

 Currently i am using App Engine Version 1.7.5 and i have no issues using 
 that. But Recently i updated SDK version to 1.8.9. i would like to know the 
 difference between 1.7.5 and 1.8.9 versions. Pls share the views on 1.8.9

 Thanks in Advance!!!



  -- 
 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-appengi...@googlegroups.com javascript:.
 To post to this group, send email to 
 google-a...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/google-appengine.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
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: Google app engine local unit test with python

2014-01-28 Thread timh
Running the tests like that won't setup all the paths to the various 
modules provided by the appengine SDK. (including webapp2)

I would have a read of the this article on local unit testing, towards the 
bottom it tells you how to set up your environment,

https://developers.google.com/appengine/docs/python/tools/localunittesting

On Friday, January 17, 2014 7:38:39 PM UTC+8, Pedro Miguel wrote:


 Hi guys,

 I'm fairly new to google app engine and python so please bear with me.

 I would like to start running some python unit tests and I've been 
 following the guide at Webapp2

 But when I run the test I keep getting the following error :
 Traceback (most recent call last):
   File test.py, line 2, in module
 import webapp2
 ImportError: No module named webapp2


 *This is my test.py file:*
 import unittest
 import webapp2



 # from the app main.py
 import main

 class TestHandlers(unittest.TestCase):
def test_hello(self):
# Build a request object passing the URI path to be tested.
# You can also pass headers, query arguments etc.
request = webapp2.Request.blank('/')
# Get a response for that request.
response = request.get_response(main.app)

# Let's check if the response is correct.
self.assertEqual(response.status_int, 200)
self.assertEqual(response.body, 'Hello, world!')


 if __name__ == '__main__':
 unittest.main()


 *This is my main.py file:*
 import webapp2



 class HelloHandler(webapp2.RequestHandler):
 def get(self):
 self.response.write('Hello, world!')

 app = webapp2.WSGIApplication([('/', HelloHandler)])

 def main():
 app.run()

 if __name__ == '__main__':
 main()



 *This is my app.yaml file:*
 application: test-app
 version: 1
 runtime: python27
 api_version: 1
 threadsafe: true



 - url: /.*
   script: main.app

 libraries:
 - name: jinja2
   version: latest

 builtins:
 - remote_api: on



 My current folder structure is:
 test-app
  app.yaml
  main.py 
  test.py

 And to run the test I do:
 $ cd test-app
 $ python test.py

 Answer that's when I get the error showed above.  Could anyone tell me 
 what am I doing wrong.


 Regards,

 Pedro


-- 
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: Front-End instances shutting down

2014-01-25 Thread timh
Unfortunately in many cases these issues are note widespread - to clarify 
doesn't affect all instances.

None of my applications have had any errors at all over the last week or 
so.  Whilst a number of people are reporting problems.

From my own personal experience since 2008 , it does seem to happen from 
time to time, where pockets of appengine infrastructure is affected
without it appearing on googles radar (or it is on their radar but not 
reported).

Of late it seems to be people using java that have the problems.  

T

On Sunday, January 26, 2014 6:41:54 AM UTC+8, o...@haitov.com wrote:

 Hi,
 All my front end instances are shutting down after a few requests or a few 
 seconds after they handle one, causing every new request to spin up a new 
 instance and responding very slow !!!
 Is anyone experiencing this as well ?? 

 @Google 
 How can we as developers put our apps in gae if things like that happens 
 so often ?  Why is it not mentioned in the app engine downtime notify ? 


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


Re: [google-appengine] Confirmed! GAE scheduler is stealing computing hours/money.

2014-01-24 Thread timh
Irrespective of what your view of the definition of an idle instance and a 
resident instance is, thats not how google see's it.
Resident and Dynamic instances are different.

In addition

A resident instance may or may not service a request.
An idle (dynamic) instance (not resident) is most likely to service a new 
request. 
You may have extra idle (dynamic) instances that are created (due to a 
perceived demand) and never service a request.
You are not charged for idle (dynamic) instances above max idle.

Idle (dynamic) instances are in addition to any resident instance.

Here is a list of instances from a low traffic site

*Instances *[image: 
help]https://developers.google.com/appengine/docs/adminconsole/instances
QPS*Latency*RequestsErrorsAgeMemoryApp Engine ReleaseLogsAvailability
Shutdown0..0 ms29502 days, 5:44:0869.8 MBytes1.8.9
[image: Resident Icon]Resident
0.050350.7 ms1546016:34:2155.3 MBytes1.8.9
[image: Dynamic Icon]Dynamic
0..0 ms5302:37:2470.6 MBytes1.8.9
[image: Dynamic Icon]Dynamic

Look at your instances chart to see what you aggregate instance time you 
are being billed for.

If you really want to keep under the 28 hours (I have done it in the past) 
(you probably shouldn't use java ;-).  


   - Don't have a reserved instance, set idle instances to one, and run a 
   external wget every minute or so to keep a single instance alive.
   - If new instances take too long to start and another request comes in 
   during startup, then you will probably find you get another dynamic 
   instance started.

T

T

On Saturday, January 25, 2014 8:54:52 AM UTC+8, Tapir wrote:



 On Saturday, January 25, 2014 2:06:31 AM UTC+8, Rafael Sanches wrote:

 that seems correct, 

 You have one idle instance because of this: max-idle-instances1/max-
 idle-instances

 You have one resident instance because of this: 
 min-idle-instances1/min-idle-instances


 You have one other instance because that's the one that is actually 
 serving. 



 What is the difference between idle instance and resident instance in 
 your view? They are different concepts? or the same?
 You think there are only one dynamic instance running?
 (In my view, idle instance and resident instance are the same concept. 
 There is only one resident/idle instance there. And there are 2 dynamic 
 instances running)

 Do you think a dynamic instances opened for hours to handler just 2 
 requests (one is /_ah/warnup) is normal?


  



 On Fri, Jan 24, 2014 at 8:20 AM, Tapir tapi...@gmail.com wrote:

 Evidence: http://imgur.com/VNHdkpU

 Following is the config.

 ?xml version=1.0 encoding=utf-8?
 appengine-web-app xmlns=http://appengine.google.com/ns/1.0;
 application{{app_id}}/application
moduledefault/module
 version{{app_version}}/version
 
 !-- loading faster --
   precompilation-enabledtrue/precompilation-enabled
   
 !-- warmup --
   warmup-requests-enabledtrue/warmup-requests-enabled
   
   !-- concurrentcy --
   threadsafetrue/threadsafe
   
   !-- concurrentcy --
   sessions-enabledtrue/sessions-enabled

   inbound-services
 servicechannel_presence/service
   /inbound-services
   
   !-- scale settings --
   
   instance-classF1/instance-class

   automatic-scaling
 min-idle-instances1/min-idle-instances
 max-idle-instances1/max-idle-instances
 min-pending-latency2730ms/min-pending-latency
 max-pending-latencyautomatic/max-pending-latency
 max-concurrent-requests50/max-concurrent-requests
   /automatic-scaling
 
   !-- Configure java.util.logging --
   system-properties
 property name=java.util.logging.config.file 
 value=WEB-INF/logging.properties/
   /system-properties
 
 static-files
 include path=/favicon.ico /
 include path=/crossdomain.xml /
 include path=/css/**.* expiration=1d/
 include path=/swfs/**.swf expiration=365d /
 include path=/js/**.js expiration=1d /
 include path=/images/**.ico expiration=1d /
 include path=/images/**.png expiration=1d /
 include path=/images/**.gif expiration=1d /
 include path=/images/**.jpg expiration=1d /
 include path=/htmls/**.i* expiration=1d /
 /static-files
 
 /appengine-web-app


  -- 
 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-appengi...@googlegroups.com.
 To post to this group, send email to google-a...@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-appengine.
 For more options, visit https://groups.google.com/groups/opt_out.




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

[google-appengine] Re: Lag with google datastore

2014-01-24 Thread timh
This is due to eventual consistancy.  Have a read of the 
article Structuring Data for Strong Consistency 
https://developers.google.com/appengine/docs/python/datastore/structuring_for_strong_consistency

You may either have to live with it, or make some changes, such as using 
get() or performing ancestor queries, or caching the data on a put, so that 
they
instant refresh can show the data.

T

On Friday, January 17, 2014 11:47:02 PM UTC+8, jonathan pedoeem wrote:

 Hello all, 
 I am working on making an extremely simple blog for a udacity class I am 
 taking, one problem I have ran into is that whenever I submit a new post 
 and redirect to the front page of the website the post does not appear. I 
 have to refresh the page and only then it does appear (only shows the old 
 ones). That lag though
 I am thinking it has something to do with the fact that I am loading all 
 the posts in the the GET  of the main page should I be doing it in the 
 POST? ( I am still kind of confused when to use each)
 Here is a copy of my code.

 (I think the problem is under mainhandler)

 http://pastebin.com/jj3H3yrs

 I submit the entries object to the html and use a for loop with Jinja2 to 
 post each title and text.





-- 
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: How to Insert row values for header with duplicate column name.

2014-01-23 Thread timh
I think you may have the wrong forum.

This question doesn't seem to be related to google appengine in anyway.



On Thursday, January 23, 2014 6:50:11 PM UTC+8, Pravanjan Niranjan wrote:

 Hi ,
 We have a spreadsheet to header like this 

 SingleLine Text Company Name Decision Intersection City Name Address 
 2SingleLine Text
  
 Every time i set the key value for  SingleLineText it just override one 
 column

 The key string singlelinetext value pravanjan
 The key string singlelinetext value  Niranjan

 I have used multimap to hold the duplicate key values. and it does print 
 correctly on my logger .

 Have used this code push the value but it does overwrite in google sheet.
  
 for(EntryString, String key : myMultimap.entries()){

 String thekeyString = key.getKey().toLowerCase().trim().replaceAll( 
 +, );

   thekeyString =thekeyString.replaceAll([^\\w\\s],);

 logger.info(The key string   +thekeyString+   value 
 +key.getValue());


  row.getCustomElements().setValueLocal(thekeyString, key.getValue());

  }

  row = service.insert(listFeedUrl, row);


 -- 
 Thanks,
 Pravanjan
 Dev *formcreator http://alpha.formcreator.a-cti.com/pages/logInForm.jsp*
  

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


Re: [google-appengine] Re: How to Insert row values for header with duplicate column name.

2014-01-23 Thread timh
Try stackoverflow and google-spreadsheet tag

http://stackoverflow.com/questions/tagged/google-spreadsheet

T

On Thursday, January 23, 2014 8:22:01 PM UTC+8, Pravanjan Niranjan wrote:

 Thank you  timh,

 I could not find a group or forum related to google spreadsheet 
 integration . Please let me know if there is a separate Group for this  .


 Thanks,
 Pravanjan



 On Thu, Jan 23, 2014 at 5:46 PM, timh zute...@gmail.com javascript:wrote:

 I think you may have the wrong forum.

 This question doesn't seem to be related to google appengine in anyway.



 On Thursday, January 23, 2014 6:50:11 PM UTC+8, Pravanjan Niranjan wrote:

 Hi ,
 We have a spreadsheet to header like this 

 SingleLine Text Company Name Decision Intersection City Name Address 
 2SingleLine Text
  
 Every time i set the key value for  SingleLineText it just override one 
 column

 The key string singlelinetext value pravanjan
 The key string singlelinetext value  Niranjan

 I have used multimap to hold the duplicate key values. and it does print 
 correctly on my logger .

 Have used this code push the value but it does overwrite in google sheet.
  
 for(EntryString, String key : myMultimap.entries()){

 String thekeyString = key.getKey().toLowerCase().trim().replaceAll( 
 +, );

   thekeyString =thekeyString.replaceAll([^\\w\\s],);

 logger.info(The key string   +thekeyString+   value 
 +key.getValue());


  row.getCustomElements().setValueLocal(thekeyString, 
 key.getValue());

  }

  row = service.insert(listFeedUrl, row);


 -- 
 Thanks,
 Pravanjan
 Dev *formcreator 
 http://alpha.formcreator.a-cti.com/pages/logInForm.jsp*
  
  -- 
 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-appengi...@googlegroups.com javascript:.
 To post to this group, send email to 
 google-a...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/google-appengine.
 For more options, visit https://groups.google.com/groups/opt_out.




 -- 
 Thanks,
 Pravanjan
 Dev *formcreator http://alpha.formcreator.a-cti.com/pages/logInForm.jsp*
  

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


Re: [google-appengine] Re: Snapchat

2014-01-21 Thread timh
Honestly, every one will have different experiences, to make blanket 
statements about how it is expensive just doesn't fly.

I can argue and with figures to back my statement up.  Maybe you 
application doesn't suit the appengine model.

I have a system with around 2000 daily users (they must use the system for 
certification, so it is compulsory for 3-5 years. Numbers will be twice 
that within 6 months). This system went live in July 2010.

It costs only $2-$3 a day, we generally don't have problems with 
'hiccoughs' and the amount we save in not having to manage any 
infrastructure at all
is worth a great deal more than $2 a day.

Ultimately it's horses for courses.  Maybe you picked the wrong platform 
for you application, maybe you made bad architectural choices, but to 
suggest 
you experience holds for all other use cases is quite ridiculous.

T

On Tuesday, January 21, 2014 3:55:26 PM UTC+8, Rafael Sanches wrote:

 alex, 

 I keep using appengine because my service is too big for a migration. I'm 
 the founder of the company. 

 We chose appengine when it launched. At the time the costs we more than 3 
 times less. They changed the price and our service was already built, so 
 we've got locked in. 

 Do the calculations. I would rather hire a $300k/year engineer that can 
 scale the service with $5k a month, rather than hiring a $120k that would 
 scale at $60k month. 

 Again, we're not in the 70's anymore. It's not that difficult to do what 
 you're describing. 

 I'm not arguing. This is not a discussion. Nobody can argue that appengine 
 is a good choice costs wise. 

 There are plenty of wonderful things about appengine, but cost is 
 certainly not one of them, so please stop fake-ing :)

 bye
 rafa


 On Mon, Jan 20, 2014 at 11:43 PM, alex al...@cloudware.it 
 javascript:wrote:

 Totally agree with Jim and Tim.
 But, I think it's a waste of time trying to reason with guys like
 Rafael and coto.

 They keep forgetting the cost of software and hardware maintainance,
 monitoring, load balancing, scaling, intrastructure stack,
 reliability, etc, no matter how many times you try to explain it.
 Sometimes, I wonder why they keep using App Engine. Maybe it's just
 because their companies actually did proper ROI/TCO calculations.

 On 21 January 2014 07:35, Rafael mufu...@gmail.com javascript: wrote:
  Guys,
 
  Please, we're not in 1970 anymore. There is no argue that appengine is 
 the
  most expensive hosting on earth and possibly the universe.
 
  My company spend $4000 a month with appengine. We could host the same
  service with $50 in a more powerful environment:
  
 http://www.hetzner.de/en/hosting/produktmatrix/rootserver-produktmatrix-ex
 
  With $300 we could make it redundant and more reliable and faster than
  appengine.
  A dedicated server is also more reliable, because of appengine infamous
  hicupps due to its scheduling system and instance boot time.
  In one of my services I rent a rack with 20 spaces and it's filled with 
 only
  10 severs. It means I can scale my servers with 10 more. That 
 configuration
  costs $1000.
  Please, pay attention for 10 dedicated quad-core with 32GB of ram. How 
 much
  would you pay in appengine for that type of throughput? I did the
  calculations: $60k.
 
  Please, it's incomparable price wise. There's no argue and let's not go
  there :)
 
  thanks
  rafa
 
 
  On Mon, Jan 20, 2014 at 1:44 PM, Jim jeb6...@gmail.com javascript: 
 wrote:
 
  I've seen many variations of this statement, Google App Engine is
  expensive!, and it always strikes me as a bit off.  I supppose it 
 depends
  on your perspective and your requirements.
 
  For the past three years I've been running a small start-up building a
  SaaS analytics application.  For the prior 25 years or so I built 
 enterprise
  apps for some well-known software houses.  The last 12 years I was 
 building
  SaaS-based software products serving top-tier global financial 
 institutions.
  During that time I worked on projects where we built, from the ground 
 up, 2
  different web-based solutions which wound up serving tens-of-thousands 
 of
  end-users and very large volumes of system-to-system (B2B type) 
 transaction
  volumes.
 
  When we created our infrastructure for these systems we needed multiple
  geographically dispersed data centers, high levels of fault-tolerance 
 within
  any given data center, n-tier architecture, secure systems, scalable
  databases and front-end servers, system, security and network 
 monitoring and
  administration, etc.  When you spec that all out from scratch, you 
 will have
  a hard time doing it for less than several hundred thousand dollars 
 capex
  with big ongoing opex expense.  Any growth beyond your initial 
 headroom will
  require additional capex expenditure and incremental ongoing opex.
 
  Depending on the profile of your application and the system load, at 
 some
  point you will pass the threshold of it being cheaper to build and 
 maintain
 

Re: [google-appengine] Re: Snapchat

2014-01-21 Thread timh
Yes the thread title might say that,  but you keep saying it is too 
expensive in all cases.. without any qualification.  Other than it costs 
you a lot to do what you do.

T



On Tuesday, January 21, 2014 4:34:40 PM UTC+8, Rafael Sanches wrote:

 Hi timh,

 Please, read the title of this thread. The use case is clear: snapchat

 If my bill is quite expensive with a couple million uniques a month, 
 imagine theirs with a couple hundred million? 

 Best,
 Rafa


 On Tue, Jan 21, 2014 at 12:16 AM, timh zute...@gmail.com javascript:wrote:

 Honestly, every one will have different experiences, to make blanket 
 statements about how it is expensive just doesn't fly.

 I can argue and with figures to back my statement up.  Maybe you 
 application doesn't suit the appengine model.

 I have a system with around 2000 daily users (they must use the system 
 for certification, so it is compulsory for 3-5 years. Numbers will be twice 
 that within 6 months). This system went live in July 2010.

 It costs only $2-$3 a day, we generally don't have problems with 
 'hiccoughs' and the amount we save in not having to manage any 
 infrastructure at all
 is worth a great deal more than $2 a day.

 Ultimately it's horses for courses.  Maybe you picked the wrong platform 
 for you application, maybe you made bad architectural choices, but to 
 suggest 
 you experience holds for all other use cases is quite ridiculous.

 T

 On Tuesday, January 21, 2014 3:55:26 PM UTC+8, Rafael Sanches wrote:

 alex, 

 I keep using appengine because my service is too big for a migration. 
 I'm the founder of the company. 

 We chose appengine when it launched. At the time the costs we more than 
 3 times less. They changed the price and our service was already built, so 
 we've got locked in. 

 Do the calculations. I would rather hire a $300k/year engineer that can 
 scale the service with $5k a month, rather than hiring a $120k that would 
 scale at $60k month. 

 Again, we're not in the 70's anymore. It's not that difficult to do what 
 you're describing. 

 I'm not arguing. This is not a discussion. Nobody can argue that 
 appengine is a good choice costs wise. 

 There are plenty of wonderful things about appengine, but cost is 
 certainly not one of them, so please stop fake-ing :)

 bye
 rafa


 On Mon, Jan 20, 2014 at 11:43 PM, alex al...@cloudware.it wrote:

 Totally agree with Jim and Tim.
 But, I think it's a waste of time trying to reason with guys like
 Rafael and coto.

 They keep forgetting the cost of software and hardware maintainance,
 monitoring, load balancing, scaling, intrastructure stack,
 reliability, etc, no matter how many times you try to explain it.
 Sometimes, I wonder why they keep using App Engine. Maybe it's just
 because their companies actually did proper ROI/TCO calculations.

 On 21 January 2014 07:35, Rafael mufu...@gmail.com wrote:
  Guys,
 
  Please, we're not in 1970 anymore. There is no argue that appengine 
 is the
  most expensive hosting on earth and possibly the universe.
 
  My company spend $4000 a month with appengine. We could host the same
  service with $50 in a more powerful environment:
  http://www.hetzner.de/en/hosting/produktmatrix/
 rootserver-produktmatrix-ex
 
  With $300 we could make it redundant and more reliable and faster than
  appengine.
  A dedicated server is also more reliable, because of appengine 
 infamous
  hicupps due to its scheduling system and instance boot time.
  In one of my services I rent a rack with 20 spaces and it's filled 
 with only
  10 severs. It means I can scale my servers with 10 more. That 
 configuration
  costs $1000.
  Please, pay attention for 10 dedicated quad-core with 32GB of ram. 
 How much
  would you pay in appengine for that type of throughput? I did the
  calculations: $60k.
 
  Please, it's incomparable price wise. There's no argue and let's not 
 go
  there :)
 
  thanks
  rafa
 
 
  On Mon, Jan 20, 2014 at 1:44 PM, Jim jeb6...@gmail.com wrote:
 
  I've seen many variations of this statement, Google App Engine is
  expensive!, and it always strikes me as a bit off.  I supppose it 
 depends
  on your perspective and your requirements.
 
  For the past three years I've been running a small start-up building 
 a
  SaaS analytics application.  For the prior 25 years or so I built 
 enterprise
  apps for some well-known software houses.  The last 12 years I was 
 building
  SaaS-based software products serving top-tier global financial 
 institutions.
  During that time I worked on projects where we built, from the 
 ground up, 2
  different web-based solutions which wound up serving 
 tens-of-thousands of
  end-users and very large volumes of system-to-system (B2B type) 
 transaction
  volumes.
 
  When we created our infrastructure for these systems we needed 
 multiple
  geographically dispersed data centers, high levels of 
 fault-tolerance within
  any given data center, n-tier architecture, secure systems, scalable
  databases

Re: [google-appengine] Re: Snapchat

2014-01-21 Thread timh


On Tuesday, January 21, 2014 5:21:43 PM UTC+8, Rafael Sanches wrote:

 timh,

 you pay $60 a month for running a service for 2000 daily users. 


Yes.  it really is very cost effective.  No full stack, no OS to worry 
about.  etc.

I said it was ridiculous to suggest it is too expensive for everyone 
without qualification, which is what you are saying.

Scaling on other services takes more effort, than appengine.

 


 that's quite expensive don't you think?

  
Not at all.  If I had to factor in all the support people, that would be 
required and the effort to keep OS, dbms, apache etc... up to date, patched 
etc that alone would be more expensive than the hosting by a 
considerable margin.  For many business the cost factor of the hosting is 
not the concern, the support cost is.

you're the one telling i'm ridiculous, when the only thing I am saying is 
 that no one can argue that appengine is a good choice when it comes to 
 costs.

 I will restate - to suggest that it is too expensive for everyone without 
qualification is ridiculous.  I accept it is too expensive for you., and 
maybe snapchat - who knows !
But for all of the projects I have been involved with appengine has been 
worth every penny/$

I am not trying to defend appengine as a fan boy.  It just makes sense as a 
PAAS for me and I for one have no time to manage even IAAS based systems.
Let alone my own hardware

T
 

 best,
 rafa


 On Tue, Jan 21, 2014 at 12:50 AM, timh zute...@gmail.com javascript:wrote:

 Yes the thread title might say that,  but you keep saying it is too 
 expensive in all cases.. without any qualification.  Other than it costs 
 you a lot to do what you do.

 T



 On Tuesday, January 21, 2014 4:34:40 PM UTC+8, Rafael Sanches wrote:

 Hi timh,

 Please, read the title of this thread. The use case is clear: snapchat

 If my bill is quite expensive with a couple million uniques a month, 
 imagine theirs with a couple hundred million? 

 Best,
 Rafa


 On Tue, Jan 21, 2014 at 12:16 AM, timh zute...@gmail.com wrote:

 Honestly, every one will have different experiences, to make blanket 
 statements about how it is expensive just doesn't fly.

 I can argue and with figures to back my statement up.  Maybe you 
 application doesn't suit the appengine model.

 I have a system with around 2000 daily users (they must use the system 
 for certification, so it is compulsory for 3-5 years. Numbers will be 
 twice 
 that within 6 months). This system went live in July 2010.

 It costs only $2-$3 a day, we generally don't have problems with 
 'hiccoughs' and the amount we save in not having to manage any 
 infrastructure at all
 is worth a great deal more than $2 a day.

 Ultimately it's horses for courses.  Maybe you picked the wrong 
 platform for you application, maybe you made bad architectural choices, 
 but 
 to suggest 
 you experience holds for all other use cases is quite ridiculous.

 T

 On Tuesday, January 21, 2014 3:55:26 PM UTC+8, Rafael Sanches wrote:

 alex, 

 I keep using appengine because my service is too big for a migration. 
 I'm the founder of the company. 

 We chose appengine when it launched. At the time the costs we more 
 than 3 times less. They changed the price and our service was already 
 built, so we've got locked in. 

 Do the calculations. I would rather hire a $300k/year engineer that 
 can scale the service with $5k a month, rather than hiring a $120k that 
 would scale at $60k month. 

 Again, we're not in the 70's anymore. It's not that difficult to do 
 what you're describing. 

 I'm not arguing. This is not a discussion. Nobody can argue that 
 appengine is a good choice costs wise. 

 There are plenty of wonderful things about appengine, but cost is 
 certainly not one of them, so please stop fake-ing :)

 bye
 rafa


 On Mon, Jan 20, 2014 at 11:43 PM, alex al...@cloudware.it wrote:

 Totally agree with Jim and Tim.
 But, I think it's a waste of time trying to reason with guys like
 Rafael and coto.

 They keep forgetting the cost of software and hardware maintainance,
 monitoring, load balancing, scaling, intrastructure stack,
 reliability, etc, no matter how many times you try to explain it.
 Sometimes, I wonder why they keep using App Engine. Maybe it's just
 because their companies actually did proper ROI/TCO calculations.

 On 21 January 2014 07:35, Rafael mufu...@gmail.com wrote:
  Guys,
 
  Please, we're not in 1970 anymore. There is no argue that appengine 
 is the
  most expensive hosting on earth and possibly the universe.
 
  My company spend $4000 a month with appengine. We could host the 
 same
  service with $50 in a more powerful environment:
  http://www.hetzner.de/en/hosting/produktmatrix/rootserver-
 produktmatrix-ex
 
  With $300 we could make it redundant and more reliable and faster 
 than
  appengine.
  A dedicated server is also more reliable, because of appengine 
 infamous
  hicupps due to its scheduling system and instance boot time.
  In one of my

Re: [google-appengine] Re: Snapchat

2014-01-21 Thread timh
Just for the record, the app I was talking about might only have 2000 
users, but it is by no means a simple application.

I has approximateley 30 different models.  Fully defined with RBAC security 
model scoped down to parts of models.   
reporting, audit trail records for every change to data, (when and what was 
changed, by who), etc  

The entire system is modeled in UML, python models, views, URL paths, 
security declarations, form schemas all directly generated from the model.
What elements of a view appear for the combination of user, context, and 
view control page layout, so the application is intensely dynamic and most 
cached data's scope is only effective for a single user.

So even complex applications can be run in a cost effective manner on 
appengine.

But no point trying to stick a square peg in a round whole.  If you data 
model, or processing requirements don't suit appengine and you can't start 
instances quickly then 
you may well be on the wrong platform.

Now more than my 2c worth ;-)

T

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

2014-01-20 Thread timh
I agree with Jim here.  I have been developing applications and delivering 
solutions on appengine since 2008.   And for everything project I have been 
involved with 
appengine has been anything but expensive.  When you factor in what the 
real cost operating system/stack  support, etc, on AWS or... additional 
scaling on Heroku, or full stack availability 
on your own hardware, then it seems very inexpensive.

I am sure the are specific use cases where appengine is really expensive, 
but then maybe that application is not appengines sweet spot.

Just my 2c worth

T

On Tuesday, January 21, 2014 5:44:02 AM UTC+8, Jim wrote:

 I've seen many variations of this statement, Google App Engine is 
 expensive!, and it always strikes me as a bit off.  I supppose it depends 
 on your perspective and your requirements.

 For the past three years I've been running a small start-up building a 
 SaaS analytics application.  For the prior 25 years or so I built 
 enterprise apps for some well-known software houses.  The last 12 years I 
 was building SaaS-based software products serving top-tier global financial 
 institutions.  During that time I worked on projects where we built, from 
 the ground up, 2 different web-based solutions which wound up serving 
 tens-of-thousands of end-users and very large volumes of system-to-system 
 (B2B type) transaction volumes.

 When we created our infrastructure for these systems we needed multiple 
 geographically dispersed data centers, high levels of fault-tolerance 
 within any given data center, n-tier architecture, secure systems, scalable 
 databases and front-end servers, system, security and network monitoring 
 and administration, etc.  When you spec that all out from scratch, you will 
 have a hard time doing it for less than several hundred thousand dollars 
 capex with big ongoing opex expense.  Any growth beyond your initial 
 headroom will require additional capex expenditure and incremental ongoing 
 opex.

 Depending on the profile of your application and the system load, at some 
 point you will pass the threshold of it being cheaper to build and maintain 
 your own equivalent infrastructure, but that threshold is very, very high. 
  So it makes me think people who say GAE is 'expensive' are not making a 
 comparison such as this.  Maybe they don't really need everything that GAE 
 offers.

 Or perhaps they are comparing GAE to other cloud offerings such as AWS? 
  Amazon's pricing doesn't seem to be radically different than Google's to 
 me, for similar services.  And given that Amazon's PaaS solution is not yet 
 as complete at GAE, I think that any complete appliation built on AWS is 
 going to require some level of system-engineering.  System engineers are 
 not cheap. One of the things we like about GAE is that, at this point in 
 our corporate evolution, we can focus entirely on our Customers and our 
 Software and not spend money or time configuring hardware, OS and other 
 low level stuff that we (as application software guys) don't want to mess 
 with.  There are very real hard and soft monetary benefits to this. 

 Or maybe when people say expensive they mean as compared to other 
 cloud offerings that are more along the lines of rented physical or 
 virtual machines.  Yes, some of these can be cheap compared to GAE.  But 
 these are really apples-to-oranges comparisons when you consider all the 
 things you need to provision a global, utility-grade (aspirationally, 
 anyway) SaaS offering.  

 So I guess this post is a long-winded way of me saying GAE Expensive? 
  Really?  What exactly do you mean by that?  Compared to what?

 On Monday, January 20, 2014 4:19:54 AM UTC-6, coto wrote:

 We all should be surprised, because Google App Engine is very expensive!!

 On Sunday, January 19, 2014 5:23:13 AM UTC-3, alex wrote:

 Why were you surprised?



-- 
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: Error caused by webapp2.uri_for

2014-01-16 Thread timh
Check and see if you have had a deadline exceeded error during instance 
startup, prior to the instance exhibiting this problem.

T

On Wednesday, January 15, 2014 11:06:55 PM UTC+8, Jeff Potter wrote:

 I am having this problem with coto-boilerplate right now. Stacktrace for 
 the problem below. Stopping and starting a new instance fixes the problem.

 Traceback (most recent call last): 
 File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  
 line 1529, in __call__ rv = self.router.dispatch(request, response) 
 File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  
 line 1278, in default_dispatcher return route.handler_adapter(request, 
 response) 
 File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  
 line 1102, in __call__ return handler.dispatch() 
 File 
 /base/data/home/apps/s~site/1-1.373006929445588669/boilerplate/lib/basehandler.py,
  
 line 88, in dispatch webapp2.RequestHandler.dispatch(self) 
 File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  
 line 572, in dispatch return self.handle_exception(e, self.app.debug) 
 File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py,
  
 line 570, in dispatch return method(*args, **kwargs) 
 File 
 /base/data/home/apps/s~site/1-1.373006929445588669/boilerplate/handlers.py,
  
 line 1526, in get return self.render_template('home.html', **params) 
 File 
 /base/data/home/apps/s~site/1-1.373006929445588669/boilerplate/lib/basehandler.py,
  
 line 320, in render_template 
 self.response.write(self.jinja2.render_template(filename, **kwargs)) 
 File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2_extras/jinja2.py,
  
 line 158, in render_template return 
 self.environment.get_template(_filename).render(**context) 
 File 
 /base/data/home/runtimes/python27/python27_lib/versions/third_party/jinja2-2.6/jinja2/environment.py,
  
 line 894, in render return self.environment.handle_exception(exc_info, 
 True) 
 File boilerplate/templates/home.html, line 1, in top-level template 
 code {% extends base_layout %} 
 File boilerplate/templates/base.html, line 40, in top-level template 
 code 
 File boilerplate/templates/home.html, line 6, in block canonical {% 
 block canonical %}{{ uri_for(home) }}{% endblock %} 
 UndefinedError: 'uri_for' is undefined

 uri_for is defined in basehandler.py like so
 def jinja2_factory(app):
 j = jinja2.Jinja2(app)
 j.environment.filters.update({
 # Set filters.
 # ...
 })
 j.environment.globals.update({
 # Set global variables.
 'csrf_token': generate_csrf_token,
 'uri_for': webapp2.uri_for,
 'getattr': getattr,
 })
 j.environment.tests.update({
 # Set test.
 # ...
 })
 return j

 All the routes work perfectly fine until the instance gets into a funky 
 state where no uri_for call works (seen it for other uris as well).

 any ideas?

 On Monday, July 16, 2012 12:34:35 AM UTC-7, Thomas Marban wrote:


 Ever since including webapp2.uri_for in my webapp2_extras.jinja2 config 
 via

 'globals': {
 'uri_for' : webapp2.uri_for
 }, 

  I'm getting an undefined error every time I change a python file and 
 load the app for the first time. It won't come up on subsequent requests. 
 Also tried to inject it into globals via a Jinja2 factory but same result. 
 Any hints?

 UndefinedError: 'uri_for' is undefined



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


  1   2   3   >