Memcache?
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
At this point all I can think of is to use something external to GAE
to queue the submissions. A simple custom in-memory server using
technology that handles concurrency well (eg Java) would work. For
something more off-the-shelf, a Redis instance fronted by a couple web
frontends to handle the submit() and reap() requests.
I don't know. Do you? If not, I think it is at least worth a consideration.
-- alex
On Tue, Jul 31, 2012 at 3:48 PM, alex <al...@cloudware.it> wrote:
>> At this point I think the GAE toolbox is empty.
>
> How about Cloud SQL?
Can it handle a thousand inserts in a 2s period?
Jeff
>> To post to this group, send email to google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscribe@googlegroups.com.
>> >> To post to this group, send email to google-appengine@googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> google-appengine+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/_oBjwMMsOiAJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
Yep... got that. However, a query() will still return stale data between the put() and the (internal) commit(). Which is where I believe I am sitting...
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/r4yYvSgNJFwJ.
>>> >> >> google-appengine@googlegroups.com.
>>> >> >> To unsubscribe from this group, send email to
>>> >> >> google-appengine+unsubscribe@googlegroups.com.
>>> >> >> For more options, visit this group at
>>> >> >> http://groups.google.com/group/google-appengine?hl=en.
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Takashi Matsuo
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Takashi Matsuo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/v9XP85rmNM8J.
>
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscribe@googlegroups.com.
>> >>> >> >> google-appengine@googlegroups.com.
>> >>> >> >> To unsubscribe from this group, send email to
>> >>> >> >> google-appengine+unsubscribe@googlegroups.com.
>> >>> >> >> For more options, visit this group at
>> >>> >> >> http://groups.google.com/group/google-appengine?hl=en.
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > --
>> >>> >> > Takashi Matsuo
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> --
>> >>> >> Takashi Matsuo
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Google App Engine" group.
>> > To view this discussion on the web visit
>> > https://groups.google.com/d/msg/google-appengine/-/v9XP85rmNM8J.
>> >
>> > To post to this group, send email to google-appengine@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-appengine+unsubscribe@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/google-appengine?hl=en.
>>
>>
>>
>> --
>> Takashi Matsuo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/iJA7RSzgG0oJ.
>
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscribe@googlegroups.com.
This is for all you guys who know app engine really well:
I want to be able to move data RELIABLY and with low latency from many front end instances to a backend within 5 seconds.
I am currently getting the F1's to do a db.put() on a lightweight object. The data comes from web clients. Around 10 seconds later, the backend reaps them. This should work nicely in theory.
However, it is just unreliable. Sometimes it will handle a load of 600 db put()'s in that 10 second window.... and other times (in the same day!), it won't even have completed 100 put()'s in 10 seconds.... so when I do the reap... I get nothing! It seems put() has some problems... 'eventually consistent' is useless if it is several minutes later!
How can I do this reliably in a 10 second window ? I have had using a PULL queue suggested, but I don't want to do all the work of converting the app over if it will be just as unreliable (I remember posts about tasksqueue's getting "stuck")....
This definitely sounds like a good strategy... especially with memory
tables and no indexes.
Back when cloud sql was in beta, there was a restriction of 5 queries
per second, so I "wrote it off" for doing any kind of heavy lifting.
Presumably that restriction has been lifted.
Jeff
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
Well, I tried to save Score() objects with a key name equal to the username (guaranteed unique) last night. GAE had the same problem in the wee hours of the morning when (most) of my users are not playing (only around 100-150 people playing). So, apparently it is not a tablet issue.
Time to play with Cloud SQL maybe ?
On Thursday, August 2, 2012 12:36:04 AM UTC-4, Richard Watson wrote:If you reverse the user id on saving the score, it'll be random and you'll avoid the tablet issue.
On Wednesday, August 1, 2012 9:52:24 PM UTC+2, Richard wrote:Hi Takashi,
Yeah, the first few characters would probably be very similar. I am not sure if that would be a problem ?
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/BBYrAdRDF0EJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
On Fri, Aug 3, 2012 at 12:46 AM, Richard <stev...@gmail.com> wrote:
Well, I tried to save Score() objects with a key name equal to the username (guaranteed unique) last night. GAE had the same problem in the wee hours of the morning when (most) of my users are not playing (only around 100-150 people playing). So, apparently it is not a tablet issue.
Time to play with Cloud SQL maybe ?That's a good idea. Certainly 1k QPS is something Cloud SQL can handle theoretically, and Cloud SQL has a strong consistency which is important for your use case. I should have came to this conclusion earlier. Sorry about that. I'll try to experiment with Cloud SQL tomorrow and get back to you.BTW, I have dome some experiment withs in-memory score server using backend instances, and it constantly marked around 200QPS with 20 B4 backends. So it might not be a good fit for your need this time.-- Takashi
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/BBYrAdRDF0EJ.
On Thursday, August 2, 2012 12:36:04 AM UTC-4, Richard Watson wrote:If you reverse the user id on saving the score, it'll be random and you'll avoid the tablet issue.--
On Wednesday, August 1, 2012 9:52:24 PM UTC+2, Richard wrote:Hi Takashi,
Yeah, the first few characters would probably be very similar. I am not sure if that would be a problem ?
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
--
Takashi Matsuo
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/eIvPq4dCXqAJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
They also say a per-hour-usage db instance gets inactive after 15 min idle, and12 hours (if I remember correctly) forthe other plan (you pay flat per day). I've seen high latencies only on first connect to a "cold" db instance. You'll find more in the official docs.
I liked it. Works better than I expected.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/usXB3qS55KcJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
--
Takashi Matsuo
--
Takashi Matsuo
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/m6NgLswZ5gcJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
I should have mentioned that if you move to the in-memory implementation, the number of datastore read/write will be drastically decreased, and so the cost will be smaller too.
What are the performance characteristics of connecting to Google Compute Engine? Maybe slap the in-memory app onto that.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/pTFagZqQkx4J.
Takashi, is there some more detailed information on why Google doesn't encourage using a connection pool? Is it simply to encourage allowing the db instance to wind down instead of being kept alive only by pool connection health checks? If so I'm sure it could be configured to avoid this.It does seem to me that it could reduce Richard's costs drastically, by 2/3 just on the writes to the db by his own numbers.I've been using pooling without issue for several months now, though admittedly with very little traffic so far, so if you think this is going to get me in trouble later I'm very eager to hear why.
On Fri, Aug 3, 2012 at 12:28 AM, Richard Watson <richard...@gmail.com> wrote:
What are the performance characteristics of connecting to Google Compute Engine? Maybe slap the in-memory app onto that.To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/pTFagZqQkx4J.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
Connection pooling might be a good idea. Since there are people in every game round and each round is 3 minutes, the SQL db will always be up. I did try it, but I think my connection from home was limited.
RE: SQL solution: Can some of you with LOTS of bandwidth (from a *nix machine), please AB the following URL:
http://sven-anagramhero.appspot.com/client/loadtest
Try at least 1000 connections with 250-500 concurrent and report back here please.
WRT costs: DB read/writes are around $3/day. Whereas 10 B1 backends would be almost $20/day.
In addition, the B1 solution does not scale. Lets say the app suddenly gets a lot of new users. Now I need to update the backend. Additionally, peak load is approximately 4x the lowest value. Now, for part of each day, I need to have enough instances to handle the peak load just doing minimal work. This is not scaling automatically. I always need to pay the maximum of whatever is needed to handle peak load.... or else update the backends every few hours to add/remove B1's. Not exactly fulfilling the automatic scaling promise!
On Friday, August 3, 2012 3:49:24 AM UTC-4, Mauricio Aristizabal wrote:Takashi, is there some more detailed information on why Google doesn't encourage using a connection pool? Is it simply to encourage allowing the db instance to wind down instead of being kept alive only by pool connection health checks? If so I'm sure it could be configured to avoid this.--It does seem to me that it could reduce Richard's costs drastically, by 2/3 just on the writes to the db by his own numbers.I've been using pooling without issue for several months now, though admittedly with very little traffic so far, so if you think this is going to get me in trouble later I'm very eager to hear why.On Fri, Aug 3, 2012 at 12:28 AM, Richard Watson <richard...@gmail.com> wrote:
What are the performance characteristics of connecting to Google Compute Engine? Maybe slap the in-memory app onto that.To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/pTFagZqQkx4J.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/-NIqVbhGPw4J.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> >>>> To post to this group, send email to google-appengine@googlegroups.com.
> >>>> To unsubscribe from this group, send email to
> >>>> google-appengine+unsubscribe@googlegroups.com.
522 577 575 602 623 653 259 <----- WTF ? 684
Number of users in a game:522 577 575 602 623 653 259 <----- WTF ? 684So, queries are still slow/lazy/bad/don't work properly..... Grrrr.The fail list:- use a synchronised cron job to reap Score() ..... had to build my own NTP query engine because cron is unreliable under load- save object in a put() and query for it later .... fails to get all objects- push objects into a PULL queue and get them using a backend .... 4-10 second delay before things can be seen in the PULL queue- Cloud SQL ... client submission tops out around 500 entries.... then the backend cannot connect to reap the results!- keep Score objects in the DB and just update them ..... they dont get found in a query- in memory backend .... requires MANY back end instances and does not scale automatically
Anyone have any other possibilities to try ?-R
On Friday, August 3, 2012 5:08:31 PM UTC-4, Richard wrote:Currently moved to the following:Lightweight Score() db object has a timestamp with the following:timestamp = db.DateTimeProperty(auto_now=True)B1 backend reaps all Score()'s with a timestamp < 1 min old.20 secs after the reap, the B1 deletes all Score()'s with timestamp at least 10 min old.My theory is:- When the DB is playing up and creating a Score() is VERY slow and so they don't show up in queries... having an 'old' Score() already there will make the put() strongly consistent and force an instant update.- Queries based on a timestamp diff will then return the Score- It may take 1 round for a player to get into the leaderboard, since the first put() will take some time for things to settle.Coments/thoughts ?Any
On Friday, August 3, 2012 4:34:02 PM UTC-4, Richard wrote:Ditched Cloud SQL. Went back to the old system of savign lightweight DB objects. I have no idea what to do tonight when DB queries stop working again (like they do every night for the last week!)
On Friday, August 3, 2012 3:55:01 PM UTC-4, Richard wrote:Well, Cloud SQL is NOT the answer.... it is topping out around 500 users. The extra's don't make it into the DB within the 10 second window. Then they get shown in the next window.
I can 'fix' this by silently deleting the extra's and doing a client update that will insert the user into the results leaderboard if they are not there. HOWEVER, the user's stats will then possibly be wrong (best game/etc).
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/Jmu7SkNGZxQJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
Dynamic backend instances automatically scale up/down.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/9Z77HBrZDEYJ.
Dynamic backend instances automatically scale up/down.
On Aug 4, 2012 9:21 AM, "Richard" <stev...@gmail.com> wrote:
Hi Takashi,
Yes, I read your post with a theoretical model, but unfortunately, I don't really know how to tell it to scale up/down ?
-R
On Friday, August 3, 2012 6:07:10 PM UTC-4, Takashi Matsuo (Google) wrote:--Just wanted to make sure...Have you seen my post about auto-scaling in-memory backends?
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/9Z77HBrZDEYJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
Great to hear that and congrats to your success on Google Play!
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/W707lh8eSDwJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
Takashi Matsuo