Re: [google-appengine] android application communicating with google app engine

2011-01-14 Thread Fabrizio Accatino
Discussed a couple of days ago on GAE Java group.

   fabrizio


On Fri, Jan 14, 2011 at 7:28 AM, Joseph Fonseka wrote:

> I am looking to extend my android application to sync data back to a server
> and also display that information on a web application is google app engine
> the best choice for this job?
>
> What is the best way for my android application to communicate or push data
> down to google app engine? Is there a tutorial or article someone can point
> me to?
>

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



[google-appengine] App Engine for Business Roadmap Out of Date

2011-01-14 Thread PandaSuit
Is there a more up to date roadmap for App Engine for Business than the 
official one posted here: 
http://code.google.com/appengine/business/roadmap.html? I am very interested 
in this but have not seen any new info in quite a while.

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



[google-appengine] Re: Update about the App Engine issues tracker

2011-01-14 Thread PK
I did notice that lately you have been going through the bugs and
assigning components and priorities. I am very glad to see this and to
read your post and the commitment to quality. And yes fixing the bugs
is not exciting but is necessary.

In addition, the last release has done amazing things. All the
spurious errors have disappeared from my app, it feels much faster and
uploads are a breeze.

Keep up the good work,
PK
http://www.gae123.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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] error when trying to register for app engine

2011-01-14 Thread frdako
not sure this forum is the right place, but I get the following error when 
trying to register for app engine:

Error: Server Error

The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error 
message and the query that caused it.

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



[google-appengine] Channel API - suggested socket initialization tweak

2011-01-14 Thread Itzy
Thanks for the Channel API - it's makes it quite simple to build powerful 
functionality.

I came up against a use case which IMHO should "just work" but does not seem 
to. I have a class that creates a channel. According to the docs, I can do 
the following:

socket = goog.appengine.Channel.open(myInstance); // as long as myInstance 
has onopen, onmessage etc. methods.


However, when the onmessage method is called on myInstance, the meaning of "
this" does not apply to myInstance, and it causes errors in onmessage if 
there is any reference to this -- the goog.appengine.Channel code seems to 
just copy the function pointer with no regard for its scope. Since 
goog.appengine.Channel is rather opaque and does not expose much 
functionality, there seems to be no benefit for the channel consumer of 
making this refer to something within goog.appengine.Channel. I would 
suggest modifying goog.appengine.Channel so that this automatically refers 
to the object  argument passed to .open().

I'm currently using the following workaround, which does the job meanwhile:

socket = channel.open({onopen:goog.bind(this.onOpen, this), 

   onmessage: goog.bind(this.onMessage, this), 

   onerror:   goog.bind(this.onError, this), 

   onclose:   goog.bind(this.onClose, this)}); 

--
Itzy

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



[google-appengine] Re: Channel API - suggested socket initialization tweak

2011-01-14 Thread Itzy
Obviously, my first example should read:

channel = new goog.appengine.Channel(token);

socket = channel.open(this); // where 'this' has onopen, onmessage etc. 
methods

--
Itzy 

 

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



Re: [google-appengine] Re: Update about the App Engine issues tracker

2011-01-14 Thread djidjadji
I'm unable to add a label component-docs to a new issue, or add it
after submitting it, for
http://code.google.com/p/googleappengine/issues/list.

For a project on http://code.google.com where i'm a developer I can
add the labels.

2011/1/13 Ikai Lan (Google) :
> 3. The goal is to improve our documentation. Working in the groups teaches
> us where our documentation is deficient. I agree that sometimes the articles
> are hard to find. If you have any documentation suggestions, feel free to
> open an issue with the label component-docs - though small fixes are much
> more likely to make it in than large or unspecific fixes.

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



Re: [google-appengine] CSS

2011-01-14 Thread djidjadji
Run your page through
http://validator.w3.org/

Add a DOCTYPE to your page.
Do you still use the  and  tags?
 is not allowed inside a  tag.
Why do you have a CSS file if you add style directly in the HTML?
You don't close the  and  tags?
The  that Fabrizio mentioned is a real beauty, ellipses (...)
instead of  "> : 
What is the / doing inside the img tag? And the px is not allowed in
the with attribute, it is not a style specification.

Three  tags? Looks more like a class.

In the CSS file all tags specify to use
font-family:Arial, Helvetica,'Liberation Sans', FreeSans, sans-serif;
Move this to the body CSS specification with a default size and
specify size differences at the other CSS specs.

If you have a group of CSS specs that show up multiple times group
them in a separate CSS class and use multiple css classes to a tag or
an id and class attribute.
Example:
CSS
.grey-border {
-moz-box-shadow: 1px 0px 6px #00;
-webkit-box-shadow: 1px 0px 6px #00;
box-shadow: 1px 0px 6px #00;
background: #CC;
background: -moz-linear-gradient(left, #CC 0%, #DD 4%,
#DD 96%, #CC 100%);
background: -webkit-gradient(linear, left top, right top,
color-stop(0%,#CC), color-stop(4%,#DD),
color-stop(96%,#DD), color-stop(100%,#CC));
filter: progid:DXImageTransform.Microsoft.gradient(
startColorstr='#CC', endColorstr='#CC',GradientType=1 );
}
/* div#box is now class .box */
.box {
margin:3px;
padding-top:1px;
padding-left:2px;
padding-right:2px;
-moz-border-radius: 2px;
border-radius: 2px;
font: 15px/1.5 Arial, Helvetica,'Liberation Sans', FreeSans, sans-serif;
height:150px;
width:190px;
float:left;
position:relative;
}

div#img {
margin: 0;
font: 15px/1.5 Arial, Helvetica,'Liberation Sans', FreeSans, sans-serif;
float:left;
position:relative;
}

In your HTML




Prova 
klfjlkfjldfjglkdfnbn x.,nb,cbv,



2011/1/14 Fabrizio Accatino :
> Your issue is not a GAE issue.  The CSS is the same.
> Check your HTML.  It's invalid. Look at the end of "lorem ipsum" block and
> the adv java-script block.
>
>    Fabrizio

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



Re: [google-appengine] CSS

2011-01-14 Thread Massimiliano
Thanks!
I understand now the problem with this!
I'm loading part of the application from the datastore and loading it in the
datastore through email. And it took some tags from the email html and this
is why there are tags no working well!

@djidjadji: I'm going to change the CSS and HTML as per you suggestions!

Thanks!


2011/1/14 djidjadji 

> Run your page through
> http://validator.w3.org/
>
> Add a DOCTYPE to your page.
> Do you still use the  and  tags?
>  is not allowed inside a  tag.
> Why do you have a CSS file if you add style directly in the HTML?
> You don't close the  and  tags?
> The  that Fabrizio mentioned is a real beauty, ellipses (...)
> instead of  "> : 
> What is the / doing inside the img tag? And the px is not allowed in
> the with attribute, it is not a style specification.
>
> Three  tags? Looks more like a class.
>
> In the CSS file all tags specify to use
> font-family:Arial, Helvetica,'Liberation Sans', FreeSans, sans-serif;
> Move this to the body CSS specification with a default size and
> specify size differences at the other CSS specs.
>
> If you have a group of CSS specs that show up multiple times group
> them in a separate CSS class and use multiple css classes to a tag or
> an id and class attribute.
> Example:
> CSS
> .grey-border {
>-moz-box-shadow: 1px 0px 6px #00;
>-webkit-box-shadow: 1px 0px 6px #00;
>box-shadow: 1px 0px 6px #00;
>background: #CC;
>background: -moz-linear-gradient(left, #CC 0%, #DD 4%,
> #DD 96%, #CC 100%);
>background: -webkit-gradient(linear, left top, right top,
> color-stop(0%,#CC), color-stop(4%,#DD),
> color-stop(96%,#DD), color-stop(100%,#CC));
>filter: progid:DXImageTransform.Microsoft.gradient(
> startColorstr='#CC', endColorstr='#CC',GradientType=1 );
> }
> /* div#box is now class .box */
> .box {
>margin:3px;
>padding-top:1px;
>padding-left:2px;
>padding-right:2px;
>-moz-border-radius: 2px;
>border-radius: 2px;
>font: 15px/1.5 Arial, Helvetica,'Liberation Sans', FreeSans,
> sans-serif;
>height:150px;
>width:190px;
>float:left;
>position:relative;
> }
>
> div#img {
>margin: 0;
>font: 15px/1.5 Arial, Helvetica,'Liberation Sans', FreeSans,
> sans-serif;
>float:left;
>position:relative;
> }
>
> In your HTML
> 
> 
> 
> 
> Prova 
> klfjlkfjldfjglkdfnbn x.,nb,cbv,
> 
>
>
> 2011/1/14 Fabrizio Accatino :
> > Your issue is not a GAE issue.  The CSS is the same.
> > Check your HTML.  It's invalid. Look at the end of "lorem ipsum" block
> and
> > the adv java-script block.
> >
> >Fabrizio
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 

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

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



[google-appengine] Channel API Under the hoods and OpenSocial/Facebook development

2011-01-14 Thread Pranav Prakash
Before I discuss my problem, it is important to know the architecture of my 
application. I am working on a facebook iframe application. The iframe 
domain is*app-1.appspot.com. *This loads all the UX part - JS, HTML, CSS, 
images whatever you see. All the back end part is handled by *
app-2.appspot.com*. So, whenever I have to store something in datastore, use 
memcache or even urlfetch, everything happens from *app-2*.

I am using Channel API for a major module of the app. And the flow is 
similar to what is demonstrated in the tic-tac-toe application. Client 
initiates a request for channel, server sends a token, client does an onopen 
call and tells server that it is ready and so on.

The token generated is from app-2.appspot.com and it is send to the client. 
The client makes a call and the call goes to app-1.appspot.com instead of 
app-2.appspot.com. In the xhr.open(), i have explicitly mentioned the full 
url which includes something like app-2.appspot.com/open but somehow, I can 
see that the calls for channel are going to app-1.appspot.com/_ah/channel 
and since no channel is created on app-1, nothing comes back. 

Looking at the xhr() call, it seems that it is a normal AJAX POST request. 
If it is a normal asynchronous request, then this scenerio makes sense 
because i won't be able to make xhr calls to a different domain. So, here 
are my questions

1. The xhr() is a normal XMLHttpRequest or it is some wrapper over things 
which are pretty complex below?
2. Can I make a call to app-2.appspot.com, when my base domain is 
app-1.appspot.com?
3. If answer to question 2 is no, what are the alternatives? Can i use flash 
requests/response to overcome this situation? In other words, can I create a 
flash wrapper over Channel API so that i can get cross domain calls without 
any loss of functionality?
4. If appengine restricts (on the dev server/production server) that cross 
domain calls can not be made, is there some low level hack which can enable 
me to do so?

People will run into these issues when they are developing applications for 
social networking portals like facebook and myspace. Facebook does not 
provides a container, so you will have to use your own container. If my code 
and backend both resided on app-1.appspot.com, I would probably never run 
into this situation. But when it comes to myspace, they have their own 
container, and the base domain is their domain itself. They provide APIs for 
doing calls. This gives rise to one more questions?

5. How do we do channel API calls inside a container of a portal?

Thanks in advance,

--
Pranav Prakash 

"temet nosce"

(http://blog.myblive.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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] silent-auction type application

2011-01-14 Thread Richard Arrano
I'm looking to make a silent-auction type of application where you
have 20-30 users bidding on an item at a time, with potentially
hundreds or thousands of auctions happening simultaneously. As soon as
a high bid is made, it updates this information and sends it via the
Channel API to the other users in the auction. I see two potential
difficulties:

1. The limit on updating an entity group about once per second - I
believe this can be solved with sharding bids amongst users in the
auction and querying all shards to find the maximum bid at any given
time, correct?

2. The nature of the auction lends itself to a heavy amount of
writing to the datastore - this itself eats up CPU and I’m trying to
figure out if it can be avoided. Is this just inevitable in this type
of application? Does it matter that I would only be only updating a
single IntegerProperty() in any given write? Is there some clever
solution that we can apply that avoids the hammering of the datastore?

Any tips or suggestions would be appreciated.

Thank you,
Richard

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



[google-appengine] Re: Twitter issues

2011-01-14 Thread nacho
Hi, I need to use Twitter API from my appengine app. 

Is this problem still happening? 

Are appengine's IP being blocked by Twitter people? Or this issue has been 
solved?

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



Re: [google-appengine] Re: Twitter issues

2011-01-14 Thread A. Stevko
Hello Nacho,
There was some discussion the past two days concerning twitter api rate
limiting for high replication instances.
https://groups.google.com/forum/#!topic/google-appengine/MYPyqsxDGbY/discussion

and
http://code.google.com/p/twitter-api/issues/detail?id=2056

Don't know why
that first link is not showing up in search results for that group...
--Stevko

On Fri, Jan 14, 2011 at 6:21 AM, nacho  wrote:

> Hi, I need to use Twitter API from my appengine app.
>
> Is this problem still happening?
>
> Are appengine's IP being blocked by Twitter people? Or this issue has been
> solved?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

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



[google-appengine] Re: IP geocoding/geolocation in Google App Engine

2011-01-14 Thread Aaron
Nice, I'll try it out.

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



[google-appengine] Re: Channel API inconsistencies and errors.

2011-01-14 Thread Moishe
The error you're getting makes me think that the token you're passing
to your new Channel object isn't valid. Can you add debug code and
verify that it's the same string the first time you create the Channel
& Socket as well as the second time?

Also: if you're not getting an onclose message when you get the
onerror, you could try manually deleting the iframe named wcs-iframe
before creating the new channel and opening the socket. (socket.close
is NYI in production right now, but the next version that rolls out to
prod - in a week or so - will have this fixed so you'll be able to
just call socket.close() in this case instead of messing with the DOM
directly)

Hope that helps!

-Moishe

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



[google-appengine] Re: Cost of Datastore CPU usage seems high

2011-01-14 Thread willtenner
Same issue here :/

It seems to me that db.put() uses a huge amount of CPU Time. Is there
a way to avoid this or does anyone no why db.put() counts the "CPU
Time" instead of the "Datastore CPU Time"?

On 6 Jan., 20:36, Donovan  wrote:
> Hi,
>
> I'm using a very simple model to store arrays of document ids for an
> inverted index based on 3 million documents.
>
> class I(db.Model):
>     v=ArrayProperty(typecode="I",required=True)
>
> which uses:
>
> http://appengine-cookbook.appspot.com/recipe/store-arrays-of-numeric-...
>
> I have a simple task queue that includes the following piece of logic
> which loops 3,000 times a day, for new incoming documents which
> generate on average 3,500 keys each, to update the index:
>
> keys = gen_keys(document) // Builds a list of db.Key instances based
> on the document
> indexes=db.get(keys)
> upserts=[]
> for i,key in enumerate(indexes):
>     if indexes[i] is None:
>         upserts.append(I(key=keys[i],v=array('I',[document_id])))
>     elif news_article_id not in indexes[i].v:
>          indexes[i].v.append(document_id)
>          upserts.append(indexes[i])
> db.put(upserts)
>
> This loop leads to datastore CPU usage of 48 hours per 1000 documents
> which means a daily spend of $16.80 just for the datastore updates,
> which seems quite expensive given how something like Kyoto Cabinet
> running on conventional hosting could easily deal with this load. Does
> anyone have any ideas for minimizing the datastore CPU usage? My hunch
> is that the datastore CPU usage is a bit overpriced :(
>
> Cheers,
> Donovan.

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



Re: [google-appengine] Re: Twitter issues

2011-01-14 Thread nacho
Thanx Stevko.

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



[google-appengine] building indexes - seems stuck

2011-01-14 Thread danj
Hi,

I have indexes building for about an hour, my dataset is quite small,
and I think that something is stuck.
Is there any way to stop the index building process?

Thanks,
Dan

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



[google-appengine] Google App engine Hexadecimal decoding issue

2011-01-14 Thread Chandana Napagoda
Hi All,

I have issue with decode Hex String value value to String conversion.

If Input is :
687474703a2f2f772e676f6f676c652e6c6b2f

Here is my decode logic:

private static String hexStringToByteArray(String s) {
 int len = s.length();
 byte[] data = new byte[len / 2];
 for (int i = 0; i < len; i += 2) {
 data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16)
<< 4) + Character.digit(s.charAt(i+1), 16));
 }

 return new String(data);
 }

expected output: http://www.google.lk
Google app-engine output :  687474703a2f2f772e676f6f676c652e6c6b2f

this one work fine with Any other java application, but For Google App
engine this doesn't work.

Anyone know why this happened?

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



Re: [google-appengine] building indexes - seems stuck

2011-01-14 Thread Wim den Ouden
http://code.google.com/p/googleappengine/issues/entry?template=Production%20issue

2011/1/14 danj :
> Hi,
>
> I have indexes building for about an hour, my dataset is quite small,
> and I think that something is stuck.
> Is there any way to stop the index building process?
>
> Thanks,
> Dan
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>



-- 
gr
Wim den Ouden
Custom applications, https://e-comm.appspot.com/
Free open source E-commerce framework (web) apps,
http://code.google.com/p/relat/
Gae developer tips, http://code.google.com/p/relat/wiki/gaetips

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



Re: [google-appengine] Some emails are not being received by my users

2011-01-14 Thread Joshua Smith
We use email a LOT with our apps, and in every case like this, it has been 
traced to filtering.  People often don't realize that "spam" is being filtered 
long before it reaches their computer.

You can try to avoid this by avoiding looking like spam (carefully choose your 
wording, send *both* HTML and plain text versions of the message, etc.).

If you want to know that someone read the message, include an  tag in the 
email that has a src attribute to come back and tickle your server.  That is 
not 100% guaranteed to work, but it usually will.  Of course, having a tag like 
that makes you look more like spam.

On Jan 13, 2011, at 4:35 PM, Albert wrote:

> Hi!
> 
> When new users register an account in my app, they are sent a
> confirmation email through mail.send().
> 
> Occasionally, it results in an error, and I catch it, and that's fine
> with me. However, sometimes some people don't receive the email. My
> app's logs show that there's no error, so I'm assuming that it sent
> the message successfully. The people who didn't receive it also
> checked their spam/junk folders. And still not there.
> 
> Any reason for this behavior?
> 
> Is there any way for my app to check the delivery success of an email
> message?
> 
> Thanks!
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
> 

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



Re: [google-appengine] silent-auction type application

2011-01-14 Thread Ikai Lan (Google)
You can certainly write to Memcache, but I don't think your application can
tolerate any kind of volatility. Persistence is the price you have to pay.
Fortunately, I think this can be done pretty cheaply. Just be aware of
monotonically increasing indexes like timestamps: if you have an application
with a high write rate that has a timestamp, this will cause the persistence
unit storing the indexes to be unable to be autosplit easily across multiple
hardware instances and you will take a performance hit. The solution here
is, again, to shard the timestamp by prefixing a value to distribute the
writes.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Fri, Jan 14, 2011 at 6:06 AM, Richard Arrano wrote:

> I'm looking to make a silent-auction type of application where you
> have 20-30 users bidding on an item at a time, with potentially
> hundreds or thousands of auctions happening simultaneously. As soon as
> a high bid is made, it updates this information and sends it via the
> Channel API to the other users in the auction. I see two potential
> difficulties:
>
>1. The limit on updating an entity group about once per second - I
> believe this can be solved with sharding bids amongst users in the
> auction and querying all shards to find the maximum bid at any given
> time, correct?
>
>2. The nature of the auction lends itself to a heavy amount of
> writing to the datastore - this itself eats up CPU and I’m trying to
> figure out if it can be avoided. Is this just inevitable in this type
> of application? Does it matter that I would only be only updating a
> single IntegerProperty() in any given write? Is there some clever
> solution that we can apply that avoids the hammering of the datastore?
>
> Any tips or suggestions would be appreciated.
>
> Thank you,
> Richard
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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



Re: [google-appengine] How to launch 100K+ recurring task every 5 min

2011-01-14 Thread supercobra
Hello again,


> Again as Eli mentioned, to offer any solutions we'd need to know what
> you're trying to do in all those tasks.

We are exploring the idea of migrating our website monitoring service
Montastic (www.montastic.com) to GAE. Right now it works on MySQL but
scalability becomes challenging and we need to explore a
re-architecture of our system. GAE would be ideal if it was possible.
So we do need to do a LOT of UrlFetch-es every 1, 2, 5 minutes.

One of the challenge is to wait for 5 minutes. E.g. Fetch a URL, store
results, wait 5 min, do it again. Since a queue will execute the task
almost immediately (if it is empty) this would not work unless the
queue is filled w/ a known number of tasks.


Any suggestion welcome.


Daniel

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



Re: [google-appengine] silent-auction type application

2011-01-14 Thread supercobra
ikai.l+gro...@google.com says

> The solution here is, again, to shard the timestamp by prefixing a value to > 
> distribute the writes.

It seems that sharded counters are needed in many cases. Could Google
develop a shared counter capability built into GAE that developers
could use out of the box?

-- superco...@gmail.com
http://supercobrablogger.blogspot.com/



On Fri, Jan 14, 2011 at 12:05 PM, Ikai Lan (Google)
 wrote:
> You can certainly write to Memcache, but I don't think your application can
> tolerate any kind of volatility. Persistence is the price you have to pay.
> Fortunately, I think this can be done pretty cheaply. Just be aware of
> monotonically increasing indexes like timestamps: if you have an application
> with a high write rate that has a timestamp, this will cause the persistence
> unit storing the indexes to be unable to be autosplit easily across multiple
> hardware instances and you will take a performance hit. The solution here
> is, again, to shard the timestamp by prefixing a value to distribute the
> writes.
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger: http://googleappengine.blogspot.com
> Reddit: http://www.reddit.com/r/appengine
> Twitter: http://twitter.com/app_engine
>
>
> On Fri, Jan 14, 2011 at 6:06 AM, Richard Arrano 
> wrote:
>>
>> I'm looking to make a silent-auction type of application where you
>> have 20-30 users bidding on an item at a time, with potentially
>> hundreds or thousands of auctions happening simultaneously. As soon as
>> a high bid is made, it updates this information and sends it via the
>> Channel API to the other users in the auction. I see two potential
>> difficulties:
>>
>>    1. The limit on updating an entity group about once per second - I
>> believe this can be solved with sharding bids amongst users in the
>> auction and querying all shards to find the maximum bid at any given
>> time, correct?
>>
>>    2. The nature of the auction lends itself to a heavy amount of
>> writing to the datastore - this itself eats up CPU and I’m trying to
>> figure out if it can be avoided. Is this just inevitable in this type
>> of application? Does it matter that I would only be only updating a
>> single IntegerProperty() in any given write? Is there some clever
>> solution that we can apply that avoids the hammering of the datastore?
>>
>> Any tips or suggestions would be appreciated.
>>
>> Thank you,
>> Richard
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

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



[google-appengine] Re: Cost of Datastore CPU usage seems high

2011-01-14 Thread willtenner
... does anyone _know_ ... xD

On 14 Jan., 18:14, willtenner  wrote:
> Same issue here :/
>
> It seems to me that db.put() uses a huge amount of CPU Time. Is there
> a way to avoid this or does anyone no why db.put() counts the "CPU
> Time" instead of the "Datastore CPU Time"?
>
> On 6 Jan., 20:36, Donovan  wrote:
>
>
>
> > Hi,
>
> > I'm using a very simple model to store arrays of document ids for an
> > inverted index based on 3 million documents.
>
> > class I(db.Model):
> >     v=ArrayProperty(typecode="I",required=True)
>
> > which uses:
>
> >http://appengine-cookbook.appspot.com/recipe/store-arrays-of-numeric-...
>
> > I have a simple task queue that includes the following piece of logic
> > which loops 3,000 times a day, for new incoming documents which
> > generate on average 3,500 keys each, to update the index:
>
> > keys = gen_keys(document) // Builds a list of db.Key instances based
> > on the document
> > indexes=db.get(keys)
> > upserts=[]
> > for i,key in enumerate(indexes):
> >     if indexes[i] is None:
> >         upserts.append(I(key=keys[i],v=array('I',[document_id])))
> >     elif news_article_id not in indexes[i].v:
> >          indexes[i].v.append(document_id)
> >          upserts.append(indexes[i])
> > db.put(upserts)
>
> > This loop leads to datastore CPU usage of 48 hours per 1000 documents
> > which means a daily spend of $16.80 just for the datastore updates,
> > which seems quite expensive given how something like Kyoto Cabinet
> > running on conventional hosting could easily deal with this load. Does
> > anyone have any ideas for minimizing the datastore CPU usage? My hunch
> > is that the datastore CPU usage is a bit overpriced :(
>
> > Cheers,
> > Donovan.

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



Re: [google-appengine] silent-auction type application

2011-01-14 Thread Stephen Johnson
Excuse my ignorance just seeking clarity, but if there are only 20-30
bidders approx. for each auction and you had an index like this for bids:

Auction ID, Timestamp

Wouldn't this type of index be sharded by it's very nature that the
timestamp is second in the index? It seems that 20-30 bidders would be a
small amount of writes per auction and should require additional sharding. I
can't imagine the bidders hitting the bid button that quickly. Now, an
application for tickets to the superbowl would be different. Or have I
missed something fundamental to the way indexes are stored on GAE.

Thanks,
Steve

On Fri, Jan 14, 2011 at 11:28 AM, supercobra  wrote:

> ikai.l+gro...@google.com  says
>
> > The solution here is, again, to shard the timestamp by prefixing a value
> to > distribute the writes.
>
> It seems that sharded counters are needed in many cases. Could Google
> develop a shared counter capability built into GAE that developers
> could use out of the box?
>
> -- superco...@gmail.com
> http://supercobrablogger.blogspot.com/
>
>
>
> On Fri, Jan 14, 2011 at 12:05 PM, Ikai Lan (Google)
> > wrote:
> > You can certainly write to Memcache, but I don't think your application
> can
> > tolerate any kind of volatility. Persistence is the price you have to
> pay.
> > Fortunately, I think this can be done pretty cheaply. Just be aware of
> > monotonically increasing indexes like timestamps: if you have an
> application
> > with a high write rate that has a timestamp, this will cause the
> persistence
> > unit storing the indexes to be unable to be autosplit easily across
> multiple
> > hardware instances and you will take a performance hit. The solution here
> > is, again, to shard the timestamp by prefixing a value to distribute the
> > writes.
> > --
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> > Blogger: http://googleappengine.blogspot.com
> > Reddit: http://www.reddit.com/r/appengine
> > Twitter: http://twitter.com/app_engine
> >
> >
> > On Fri, Jan 14, 2011 at 6:06 AM, Richard Arrano 
> > wrote:
> >>
> >> I'm looking to make a silent-auction type of application where you
> >> have 20-30 users bidding on an item at a time, with potentially
> >> hundreds or thousands of auctions happening simultaneously. As soon as
> >> a high bid is made, it updates this information and sends it via the
> >> Channel API to the other users in the auction. I see two potential
> >> difficulties:
> >>
> >>1. The limit on updating an entity group about once per second - I
> >> believe this can be solved with sharding bids amongst users in the
> >> auction and querying all shards to find the maximum bid at any given
> >> time, correct?
> >>
> >>2. The nature of the auction lends itself to a heavy amount of
> >> writing to the datastore - this itself eats up CPU and I’m trying to
> >> figure out if it can be avoided. Is this just inevitable in this type
> >> of application? Does it matter that I would only be only updating a
> >> single IntegerProperty() in any given write? Is there some clever
> >> solution that we can apply that avoids the hammering of the datastore?
> >>
> >> Any tips or suggestions would be appreciated.
> >>
> >> Thank you,
> >> Richard
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Google App Engine" group.
> >> To post to this group, send email to google-appengine@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengine+unsubscr...@googlegroups.com
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-appengine?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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



Re: [google-appengine] silent-auction type application

2011-01-14 Thread Stephen Johnson
I meant "shouldn't rquire additional sharding"

On Fri, Jan 14, 2011 at 11:44 AM, Stephen Johnson wrote:

> Excuse my ignorance just seeking clarity, but if there are only 20-30
> bidders approx. for each auction and you had an index like this for bids:
>
> Auction ID, Timestamp
>
> Wouldn't this type of index be sharded by it's very nature that the
> timestamp is second in the index? It seems that 20-30 bidders would be a
> small amount of writes per auction and should require additional sharding. I
> can't imagine the bidders hitting the bid button that quickly. Now, an
> application for tickets to the superbowl would be different. Or have I
> missed something fundamental to the way indexes are stored on GAE.
>
> Thanks,
> Steve
>
>
> On Fri, Jan 14, 2011 at 11:28 AM, supercobra  wrote:
>
>> ikai.l+gro...@google.com  says
>>
>> > The solution here is, again, to shard the timestamp by prefixing a value
>> to > distribute the writes.
>>
>> It seems that sharded counters are needed in many cases. Could Google
>> develop a shared counter capability built into GAE that developers
>> could use out of the box?
>>
>> -- superco...@gmail.com
>> http://supercobrablogger.blogspot.com/
>>
>>
>>
>> On Fri, Jan 14, 2011 at 12:05 PM, Ikai Lan (Google)
>> > wrote:
>> > You can certainly write to Memcache, but I don't think your application
>> can
>> > tolerate any kind of volatility. Persistence is the price you have to
>> pay.
>> > Fortunately, I think this can be done pretty cheaply. Just be aware of
>> > monotonically increasing indexes like timestamps: if you have an
>> application
>> > with a high write rate that has a timestamp, this will cause the
>> persistence
>> > unit storing the indexes to be unable to be autosplit easily across
>> multiple
>> > hardware instances and you will take a performance hit. The solution
>> here
>> > is, again, to shard the timestamp by prefixing a value to distribute the
>> > writes.
>> > --
>> > Ikai Lan
>> > Developer Programs Engineer, Google App Engine
>> > Blogger: http://googleappengine.blogspot.com
>> > Reddit: http://www.reddit.com/r/appengine
>> > Twitter: http://twitter.com/app_engine
>> >
>> >
>> > On Fri, Jan 14, 2011 at 6:06 AM, Richard Arrano 
>> > wrote:
>> >>
>> >> I'm looking to make a silent-auction type of application where you
>> >> have 20-30 users bidding on an item at a time, with potentially
>> >> hundreds or thousands of auctions happening simultaneously. As soon as
>> >> a high bid is made, it updates this information and sends it via the
>> >> Channel API to the other users in the auction. I see two potential
>> >> difficulties:
>> >>
>> >>1. The limit on updating an entity group about once per second - I
>> >> believe this can be solved with sharding bids amongst users in the
>> >> auction and querying all shards to find the maximum bid at any given
>> >> time, correct?
>> >>
>> >>2. The nature of the auction lends itself to a heavy amount of
>> >> writing to the datastore - this itself eats up CPU and I’m trying to
>> >> figure out if it can be avoided. Is this just inevitable in this type
>> >> of application? Does it matter that I would only be only updating a
>> >> single IntegerProperty() in any given write? Is there some clever
>> >> solution that we can apply that avoids the hammering of the datastore?
>> >>
>> >> Any tips or suggestions would be appreciated.
>> >>
>> >> Thank you,
>> >> Richard
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "Google App Engine" group.
>> >> To post to this group, send email to google-appengine@googlegroups.com
>> .
>> >> To unsubscribe from this group, send email to
>> >> google-appengine+unsubscr...@googlegroups.com
>> .
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/google-appengine?hl=en.
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "Google App Engine" group.
>> > To post to this group, send email to google-appengine@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-appengine+unsubscr...@googlegroups.com
>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/google-appengine?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>>
>

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

Re: [google-appengine] How to launch 100K+ recurring task every 5 min

2011-01-14 Thread Eli Jones
You should probably start experimenting with the Taskqueue to get a better
idea how it functions and what is possible.

When you create a Task.. you can define a countdown or eta value..  so, the
task gets added.. but it is scheduled to execute at a future time (not
immediately).

So, you can just create a named, chained task that does a batch of
URLfetches asynchronously with a callback (not sure how many can be done at
once, one way to find out is to test it.).. and once it is done gathering
and putting data.. it schedules the next 5 minute batch.

http://code.google.com/appengine/docs/python/urlfetch/asynchronousrequests.html

See Nick Johnson for an overview of how to do chaining with deferred (I
personally prefer regular Taskqueue, but deferred has its positive aspects):

http://blog.notdot.net/2010/03/Task-Queue-task-chaining-done-right

You could also have a cron job that creates all of your scheduled tasks for
the day at once.  Depending on if there would be no issues with some tasks
not finishing before the next 5 minute task.

On Fri, Jan 14, 2011 at 1:24 PM, supercobra  wrote:

> Hello again,
>
>
> > Again as Eli mentioned, to offer any solutions we'd need to know what
> > you're trying to do in all those tasks.
>
> We are exploring the idea of migrating our website monitoring service
> Montastic (www.montastic.com) to GAE. Right now it works on MySQL but
> scalability becomes challenging and we need to explore a
> re-architecture of our system. GAE would be ideal if it was possible.
> So we do need to do a LOT of UrlFetch-es every 1, 2, 5 minutes.
>
> One of the challenge is to wait for 5 minutes. E.g. Fetch a URL, store
> results, wait 5 min, do it again. Since a queue will execute the task
> almost immediately (if it is empty) this would not work unless the
> queue is filled w/ a known number of tasks.
>
>
> Any suggestion welcome.
>
>
> Daniel
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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



Re: [google-appengine] Some emails are not being received by my users

2011-01-14 Thread Ikai Lan (Google)
Interestingly enough we see to have the opposite problem of sending too much
mail. Be warned that if you are sending mail and the mail API throws an
error, the email may have actually gone out. This causes developers to catch
the error and resend the mail, causing end users to receive duplicate
emails. We're looking at possibly solutions for this.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Fri, Jan 14, 2011 at 10:04 AM, Joshua Smith wrote:

> We use email a LOT with our apps, and in every case like this, it has been
> traced to filtering.  People often don't realize that "spam" is being
> filtered long before it reaches their computer.
>
> You can try to avoid this by avoiding looking like spam (carefully choose
> your wording, send *both* HTML and plain text versions of the message,
> etc.).
>
> If you want to know that someone read the message, include an  tag in
> the email that has a src attribute to come back and tickle your server.
>  That is not 100% guaranteed to work, but it usually will.  Of course,
> having a tag like that makes you look more like spam.
>
> On Jan 13, 2011, at 4:35 PM, Albert wrote:
>
> > Hi!
> >
> > When new users register an account in my app, they are sent a
> > confirmation email through mail.send().
> >
> > Occasionally, it results in an error, and I catch it, and that's fine
> > with me. However, sometimes some people don't receive the email. My
> > app's logs show that there's no error, so I'm assuming that it sent
> > the message successfully. The people who didn't receive it also
> > checked their spam/junk folders. And still not there.
> >
> > Any reason for this behavior?
> >
> > Is there any way for my app to check the delivery success of an email
> > message?
> >
> > Thanks!
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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



Re: [google-appengine] How to launch 100K+ recurring task every 5 min

2011-01-14 Thread supercobra
Hi Eli,

Thanks for the great feedback. If Task Queue Java is as evolved as
Phyton that maybe the way to go.


-- superco...@gmail.com
http://supercobrablogger.blogspot.com/



On Fri, Jan 14, 2011 at 12:52 PM, Eli Jones  wrote:
> You should probably start experimenting with the Taskqueue to get a better
> idea how it functions and what is possible.
> When you create a Task.. you can define a countdown or eta value..  so, the
> task gets added.. but it is scheduled to execute at a future time (not
> immediately).
> So, you can just create a named, chained task that does a batch of
> URLfetches asynchronously with a callback (not sure how many can be done at
> once, one way to find out is to test it.).. and once it is done gathering
> and putting data.. it schedules the next 5 minute batch.
> http://code.google.com/appengine/docs/python/urlfetch/asynchronousrequests.html
> See Nick Johnson for an overview of how to do chaining with deferred (I
> personally prefer regular Taskqueue, but deferred has its positive aspects):
> http://blog.notdot.net/2010/03/Task-Queue-task-chaining-done-right
> You could also have a cron job that creates all of your scheduled tasks for
> the day at once.  Depending on if there would be no issues with some tasks
> not finishing before the next 5 minute task.
>
> On Fri, Jan 14, 2011 at 1:24 PM, supercobra  wrote:
>>
>> Hello again,
>>
>>
>> > Again as Eli mentioned, to offer any solutions we'd need to know what
>> > you're trying to do in all those tasks.
>>
>> We are exploring the idea of migrating our website monitoring service
>> Montastic (www.montastic.com) to GAE. Right now it works on MySQL but
>> scalability becomes challenging and we need to explore a
>> re-architecture of our system. GAE would be ideal if it was possible.
>> So we do need to do a LOT of UrlFetch-es every 1, 2, 5 minutes.
>>
>> One of the challenge is to wait for 5 minutes. E.g. Fetch a URL, store
>> results, wait 5 min, do it again. Since a queue will execute the task
>> almost immediately (if it is empty) this would not work unless the
>> queue is filled w/ a known number of tasks.
>>
>>
>> Any suggestion welcome.
>>
>>
>> Daniel
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

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



Re: [google-appengine] How to launch 100K+ recurring task every 5 min

2011-01-14 Thread Stephen Johnson
The daily limit on Task Queue API calls is 20,000,000 and the limit on URL
fetch is 32,000 calls/minute. So at the rate your suggesting your going to
run into some walls. I'd say you'd have to request an increase. I'd get the
okay from GAE before going down this road.

On Fri, Jan 14, 2011 at 1:22 PM, supercobra  wrote:

> Hi Eli,
>
> Thanks for the great feedback. If Task Queue Java is as evolved as
> Phyton that maybe the way to go.
>
>
> -- superco...@gmail.com
> http://supercobrablogger.blogspot.com/
>
>
>
> On Fri, Jan 14, 2011 at 12:52 PM, Eli Jones  wrote:
> > You should probably start experimenting with the Taskqueue to get a
> better
> > idea how it functions and what is possible.
> > When you create a Task.. you can define a countdown or eta value..  so,
> the
> > task gets added.. but it is scheduled to execute at a future time (not
> > immediately).
> > So, you can just create a named, chained task that does a batch of
> > URLfetches asynchronously with a callback (not sure how many can be done
> at
> > once, one way to find out is to test it.).. and once it is done gathering
> > and putting data.. it schedules the next 5 minute batch.
> >
> http://code.google.com/appengine/docs/python/urlfetch/asynchronousrequests.html
> > See Nick Johnson for an overview of how to do chaining with deferred (I
> > personally prefer regular Taskqueue, but deferred has its positive
> aspects):
> > http://blog.notdot.net/2010/03/Task-Queue-task-chaining-done-right
> > You could also have a cron job that creates all of your scheduled tasks
> for
> > the day at once.  Depending on if there would be no issues with some
> tasks
> > not finishing before the next 5 minute task.
> >
> > On Fri, Jan 14, 2011 at 1:24 PM, supercobra 
> wrote:
> >>
> >> Hello again,
> >>
> >>
> >> > Again as Eli mentioned, to offer any solutions we'd need to know what
> >> > you're trying to do in all those tasks.
> >>
> >> We are exploring the idea of migrating our website monitoring service
> >> Montastic (www.montastic.com) to GAE. Right now it works on MySQL but
> >> scalability becomes challenging and we need to explore a
> >> re-architecture of our system. GAE would be ideal if it was possible.
> >> So we do need to do a LOT of UrlFetch-es every 1, 2, 5 minutes.
> >>
> >> One of the challenge is to wait for 5 minutes. E.g. Fetch a URL, store
> >> results, wait 5 min, do it again. Since a queue will execute the task
> >> almost immediately (if it is empty) this would not work unless the
> >> queue is filled w/ a known number of tasks.
> >>
> >>
> >> Any suggestion welcome.
> >>
> >>
> >> Daniel
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Google App Engine" group.
> >> To post to this group, send email to google-appengine@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengine+unsubscr...@googlegroups.com
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-appengine?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine?hl=en.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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



Re: [google-appengine] Datastore and Geo search and GQL limitations workarounds

2011-01-14 Thread Robert Kluin
Hi Cesare,
  The underlying concept to your idea is basically the same; most
techniques use an approach based on the idea that if you store a
"lower-resolution" point, you can figure out what else is close since
they might also be at that lower-res point.  Your idea is basically a
version of the bounding-boxes approach.
   http://code.google.com/appengine/articles/geosearch.html

  If you do not want to use one of the existing solutions, make sure
you consider cases when your original point is very close to the edge
of your box.  If you don't you'll miss some close results.


Robert





On Tue, Jan 11, 2011 at 18:01, Cesare Montresor
 wrote:
> Hi,
> my name it's Cesare, I'm new to GAE (3 days) and this group as well, I
> would like to take this opportunity to say hello to everybody :)
>
> I guess that many many peaople had the same ploblem of mine, because
> of the limitations of GQL about using an inequality operator on more
> than 1 property and so the problem of retriving location within a
> given range.
> I barelly evaluated GeoModel (http://code.google.com/p/geomodel/) but
> seams to me that it's big and anyway doesn't really solve the problem
> of filtering the data on GQL end only.
>
> I would like to have an optionion from you guys about this very simple
> idea that I go this morning under the shower ... :)
> The idea it's basically to "round" latitude and longitude to integer
> (for to float few decimals) and use this value as "tag" so in this way
> i will be able to pull the data from the datastore just by using = or
> IN operator to retrive the locations in a specific area. it's an hash
> table but not with unique hash, on 2 different fields.
>
> In this way the dataset in not the smallest as possible, you may need
> to refine the seach in the code, but should be small enough.
>
> That's all,
> I will be happy to get ideas, improvments, suggestion and criticism as
> well :)
>
>
> Thanks,
> Cesare Montresor
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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



[google-appengine] Re: How to launch 100K+ recurring task every 5 min

2011-01-14 Thread Uros Trebec
re

On Jan 14, 7:24 pm, supercobra  wrote:
> One of the challenge is to wait for 5 minutes. E.g. Fetch a URL, store
> results, wait 5 min, do it again. Since a queue will execute the task
> almost immediately (if it is empty) this would not work unless the
> queue is filled w/ a known number of tasks.
>
> Any suggestion welcome.

You can use the 'countdown' parameter in Task constructor (
http://code.google.com/appengine/docs/python/taskqueue/tasks.html#Task
) to set the number of seconds for the Task to wait in the queue
before executing. I use this for scheduling a task a few minutes in
the future when UrlFetch returns the data I already have.

lp,
Uros

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



[google-appengine] Re: Configuration "webapp_add_wsgi_middleware" not recognized error

2011-01-14 Thread willo
I added an issue for this here:
http://code.google.com/p/googleappengine/issues/detail?id=4236&q=webapp_add_wsgi_middleware&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log

I don't know how to resolve it, it appeared at 1.4.0, but it seems to
only be an annoyance.

On Jan 13, 4:12 pm, Tom  wrote:
> Hi,
>
> I've started receiving this error - only for some types of browsers by the
> looks of things. Here's my appengine_config file:
>
> from gaesessions import SessionMiddleware
>
> # suggestion: generate your own random key using os.urandom(64)
> # WARNING: Make sure you run os.urandom(64) OFFLINE and copy/paste the
> output to
> # this file.  If you use os.urandom() to *dynamically* generate your key at
> # runtime then any existing sessions will become junk every time you start,
> # deploy, or update your app!
> import os
> COOKIE_KEY = cookiekey
>
> def webapp_add_wsgi_middleware(app):
>   from google.appengine.ext.appstats import recording
>   app = SessionMiddleware(app, cookie_key=COOKIE_KEY)
>   app = recording.appstats_wsgi_middleware(app)
>   return app
>
> Any ideas?
>
> Thanks
> Tom

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



[google-appengine] Re: Some emails are not being received by my users

2011-01-14 Thread Albert
Hi!

Thanks for your replies.

Ikai, in my case, users receiving duplicate emails is better than them
not receiving any at all.

Joshua, thanks for the tips.

Albert

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



Re: [google-appengine] Re: Configuration "webapp_add_wsgi_middleware" not recognized error

2011-01-14 Thread Tom Critchlow
Hi Willo,

I'm pretty sure this is more serious than an annoyance - although I can't
replicate it on my machine I have reliable reports from people that say my
site is down and I've tracked these visits back to ones that fire this
middleware warning. So it appears to cause the website to not resolve for
these visits (though the appengine console doesn't report them as errors,
just as warnings).

A good way to replicate this is to use
http://www.downforeveryoneorjustme.com/ which for me reliably shows my site
as down even though it's up and functioning fine for me (and others). When I
track this request in appengine I see this:

http://i.imgur.com/wBPql.png


http://www.downforeveryoneorjustme.com/7bks.com

Also, I asked people on
twitter to visit my site and maybe 30% of respondents reported they couldn't
get to the site while the rest said it was fine. Again - these visits that
couldn't access the site showed the warning, no errors in the logs.

Let me know if I can provide more information or further data

Thanks

Tom

On Fri, Jan 14, 2011 at 10:03 PM, willo  wrote:

> I added an issue for this here:
>
> http://code.google.com/p/googleappengine/issues/detail?id=4236&q=webapp_add_wsgi_middleware&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log
>
> I don't know how to resolve it, it appeared at 1.4.0, but it seems to
> only be an annoyance.
>
> On Jan 13, 4:12 pm, Tom  wrote:
> > Hi,
> >
> > I've started receiving this error - only for some types of browsers by
> the
> > looks of things. Here's my appengine_config file:
> >
> > from gaesessions import SessionMiddleware
> >
> > # suggestion: generate your own random key using os.urandom(64)
> > # WARNING: Make sure you run os.urandom(64) OFFLINE and copy/paste the
> > output to
> > # this file.  If you use os.urandom() to *dynamically* generate your key
> at
> > # runtime then any existing sessions will become junk every time you
> start,
> > # deploy, or update your app!
> > import os
> > COOKIE_KEY = cookiekey
> >
> > def webapp_add_wsgi_middleware(app):
> >   from google.appengine.ext.appstats import recording
> >   app = SessionMiddleware(app, cookie_key=COOKIE_KEY)
> >   app = recording.appstats_wsgi_middleware(app)
> >   return app
> >
> > Any ideas?
> >
> > Thanks
> > Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Tom Critchlow
twitter.com/tomcritchlow
www.fuckyeahspotify.com
www.7bks.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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: AddAppVersion failed: DEADLINE_EXCEEDED

2011-01-14 Thread Francois Masurel
Can't use the GAE administration console at the moment : gives me some 500 
errors.

And below 2 screenshots from BrowserMob showing that monitor "failed" happen 
mainly from their Singapore and SF Bay Area servers.  Anybody has an idea 
why ?





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



[google-appengine] Re: How do I bulk send the same mail to multiple recipients?

2011-01-14 Thread pdknsk
I've figured out a solution to not resend mails (as posted partially
in appengine-python) but have been wondering: is there any reason to
not put recipients into BCC instead?

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



[google-appengine] Re: Some emails are not being received by my users

2011-01-14 Thread pdknsk
You could BCC the mail to a dedicated address which verifies it. If
it's not verified within a set time (which could be implemented with a
task countdown), it is send again. Of course this only verifies the
mail was sent out, and not that it was also received by the recipient.

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



[google-appengine] Forming url with id number

2011-01-14 Thread Zeynel
Hello,

I am working on a simple news site for people to post Sarah Palin
related links. At this point I have a submit page
http://sarah-for-president.appspot.com/submit and a newest page
http://sarah-for-president.appspot.com/newest

But I also want to add a comments page (like in Hacker News) so that
people can comment on each article. I want to use disqus for comments
and the page will look something like this 
http://sarah-for-president.appspot.com/comments

But I don't understand how I can connect an article with its comments.
Hacker News has urls of this type http://news.ycombinator.com/item?id=2105038

I see in Datastore Viewer that each entry has an id:

ID/Name: id=1
date: 2011-01-14 20:51:28.256421
title: Sarah Palin Wikipedia page
url: http://en.wikipedia.org/wiki/Sarah_Palin

Can you help me understand how to form the urls of the form
http://sarah-for-president.appspot.com/item?id=1

Or if this is not correct, what is the correct way?

This is my app.yaml:

application: sarah-for-president
version: 1
runtime: python
api_version: 1

handlers:
- url: /favicon.ico
  static_files: static/images/favicon.ico
  upload: static/images/favicon.ico

- url: /.*
  script: sarah.py

inbound_services:
- mail

and the code is here: http://pastebin.com/5bnEURhj

(sorry for all the HTML, i am not using templating at this point)

Thanks!

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



[google-appengine] Re: silent-auction type application

2011-01-14 Thread Richard Arrano
Thanks for the response! I was thinking it over and I have a question
- so if a timestamp with its monotonically increasing index causes a
performance hit at a high write rate, would updating the high bid do
so as well ? The high bid itself will be monotonically increasing - it
will never go down, but perhaps I misunderstood something about how
indices work.

And I guess a broader question that I have is(and I assume the answer
is yes) - does the size of what we're writing affect the performance?
As in, writing a simple update to an integer property as opposed to
creating new complex objects and writing them.

Thanks,
Richard

On Jan 14, 10:05 am, "Ikai Lan (Google)" 
wrote:
> You can certainly write to Memcache, but I don't think your application can
> tolerate any kind of volatility. Persistence is the price you have to pay.
> Fortunately, I think this can be done pretty cheaply. Just be aware of
> monotonically increasing indexes like timestamps: if you have an application
> with a high write rate that has a timestamp, this will cause the persistence
> unit storing the indexes to be unable to be autosplit easily across multiple
> hardware instances and you will take a performance hit. The solution here
> is, again, to shard the timestamp by prefixing a value to distribute the
> writes.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger:http://googleappengine.blogspot.com
> Reddit:http://www.reddit.com/r/appengine
> Twitter:http://twitter.com/app_engine
>
> On Fri, Jan 14, 2011 at 6:06 AM, Richard Arrano wrote:
>
> > I'm looking to make a silent-auction type of application where you
> > have 20-30 users bidding on an item at a time, with potentially
> > hundreds or thousands of auctions happening simultaneously. As soon as
> > a high bid is made, it updates this information and sends it via the
> > Channel API to the other users in the auction. I see two potential
> > difficulties:
>
> >    1. The limit on updating an entity group about once per second - I
> > believe this can be solved with sharding bids amongst users in the
> > auction and querying all shards to find the maximum bid at any given
> > time, correct?
>
> >    2. The nature of the auction lends itself to a heavy amount of
> > writing to the datastore - this itself eats up CPU and I’m trying to
> > figure out if it can be avoided. Is this just inevitable in this type
> > of application? Does it matter that I would only be only updating a
> > single IntegerProperty() in any given write? Is there some clever
> > solution that we can apply that avoids the hammering of the datastore?
>
> > Any tips or suggestions would be appreciated.
>
> > Thank you,
> > Richard
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.
>
>

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



[google-appengine] Re: Forming url with id number

2011-01-14 Thread Zeynel
I figured that

i_id = item.key().id()

logging.info("i_id is: %s" % item.key().id())

gets the id number. Can anyone help about forming the corresponding
url?

Thanks.

On Jan 14, 7:38 pm, Zeynel  wrote:
> Hello,
>
> I am working on a simple news site for people to post Sarah Palin
> related links. At this point I have a submit 
> pagehttp://sarah-for-president.appspot.com/submitand a newest 
> pagehttp://sarah-for-president.appspot.com/newest
>
> But I also want to add a comments page (like in Hacker News) so that
> people can comment on each article. I want to use disqus for comments
> and the page will look something like 
> thishttp://sarah-for-president.appspot.com/comments
>
> But I don't understand how I can connect an article with its comments.
> Hacker News has urls of this typehttp://news.ycombinator.com/item?id=2105038
>
> I see in Datastore Viewer that each entry has an id:
>
> ID/Name: id=1
> date: 2011-01-14 20:51:28.256421
> title: Sarah Palin Wikipedia page
> url:http://en.wikipedia.org/wiki/Sarah_Palin
>
> Can you help me understand how to form the urls of the 
> formhttp://sarah-for-president.appspot.com/item?id=1
>
> Or if this is not correct, what is the correct way?
>
> This is my app.yaml:
>
> application: sarah-for-president
> version: 1
> runtime: python
> api_version: 1
>
> handlers:
> - url: /favicon.ico
>   static_files: static/images/favicon.ico
>   upload: static/images/favicon.ico
>
> - url: /.*
>   script: sarah.py
>
> inbound_services:
> - mail
>
> and the code is here:http://pastebin.com/5bnEURhj
>
> (sorry for all the HTML, i am not using templating at this point)
>
> Thanks!

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



[google-appengine] Re: Forming url with id number

2011-01-14 Thread Zeynel
I tried this:

self.response.out.write("")
for item in items:
self.response.out.write("""%s
comments """ %
(cgi.escape(item.url),
cgi.escape(item.title), cgi.escape(item.key().id(
self.response.out.write("")

but gives this error:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\ext\webapp\__init__.py", line 515, in __call__
handler.get(*groups)
  File "C:\sarah.py", line 37, in get
(cgi.escape(item.url), cgi.escape(item.title),
cgi.escape(item.key().id(
  File "C:\Python26\lib\cgi.py", line 1023, in escape
s = s.replace("&", "&") # Must be done first!
AttributeError: 'long' object has no attribute 'replace'

Can anyone help?


On Jan 14, 9:10 pm, Zeynel  wrote:
> I figured that
>
>         i_id = item.key().id()
>
>         logging.info("i_id is: %s" % item.key().id())
>
> gets the id number. Can anyone help about forming the corresponding
> url?
>
> Thanks.
>
> On Jan 14, 7:38 pm, Zeynel  wrote:
>
>
>
>
>
>
>
> > Hello,
>
> > I am working on a simple news site for people to post Sarah Palin
> > related links. At this point I have a submit 
> > pagehttp://sarah-for-president.appspot.com/submitanda newest 
> > pagehttp://sarah-for-president.appspot.com/newest
>
> > But I also want to add a comments page (like in Hacker News) so that
> > people can comment on each article. I want to use disqus for comments
> > and the page will look something like 
> > thishttp://sarah-for-president.appspot.com/comments
>
> > But I don't understand how I can connect an article with its comments.
> > Hacker News has urls of this typehttp://news.ycombinator.com/item?id=2105038
>
> > I see in Datastore Viewer that each entry has an id:
>
> > ID/Name: id=1
> > date: 2011-01-14 20:51:28.256421
> > title: Sarah Palin Wikipedia page
> > url:http://en.wikipedia.org/wiki/Sarah_Palin
>
> > Can you help me understand how to form the urls of the 
> > formhttp://sarah-for-president.appspot.com/item?id=1
>
> > Or if this is not correct, what is the correct way?
>
> > This is my app.yaml:
>
> > application: sarah-for-president
> > version: 1
> > runtime: python
> > api_version: 1
>
> > handlers:
> > - url: /favicon.ico
> >   static_files: static/images/favicon.ico
> >   upload: static/images/favicon.ico
>
> > - url: /.*
> >   script: sarah.py
>
> > inbound_services:
> > - mail
>
> > and the code is here:http://pastebin.com/5bnEURhj
>
> > (sorry for all the HTML, i am not using templating at this point)
>
> > Thanks!

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



Re: [google-appengine] Re: How do I bulk send the same mail to multiple recipients?

2011-01-14 Thread Robert Kluin
I'm not sure if there really exists a hard limit or not. However, I
would not be too surprised if spam filters do not like BCC heavy
emails.  Also, keep in mind it is the SMTP server that delivers to the
users mailbox that strips the BCC addresses, it is not the same as
sending multiple emails, recipients might get the full address list.


Robert







On Fri, Jan 14, 2011 at 17:57, pdknsk  wrote:
> I've figured out a solution to not resend mails (as posted partially
> in appengine-python) but have been wondering: is there any reason to
> not put recipients into BCC instead?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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



[google-appengine] Re: Forming url with id number

2011-01-14 Thread Zeynel
converting the id to string appears to have solved the problem:

self.response.out.write("")
for item in items:
self.response.out.write("""%s
comments """ %
(cgi.escape(item.url),
cgi.escape(item.title), cgi.escape(str(item.key().id()
self.response.out.write("")

On Jan 14, 9:38 pm, Zeynel  wrote:
> I tried this:
>
>         self.response.out.write("")
>         for item in items:
>             self.response.out.write("""%s
> comments """ %
>                                     (cgi.escape(item.url),
> cgi.escape(item.title), cgi.escape(item.key().id(
>         self.response.out.write("")
>
> but gives this error:
>
> Traceback (most recent call last):
>   File "C:\Program Files (x86)\Google\google_appengine\google\appengine
> \ext\webapp\__init__.py", line 515, in __call__
>     handler.get(*groups)
>   File "C:\sarah.py", line 37, in get
>     (cgi.escape(item.url), cgi.escape(item.title),
> cgi.escape(item.key().id(
>   File "C:\Python26\lib\cgi.py", line 1023, in escape
>     s = s.replace("&", "&") # Must be done first!
> AttributeError: 'long' object has no attribute 'replace'
>
> Can anyone help?
>
> On Jan 14, 9:10 pm, Zeynel  wrote:
>
>
>
>
>
>
>
> > I figured that
>
> >         i_id = item.key().id()
>
> >         logging.info("i_id is: %s" % item.key().id())
>
> > gets the id number. Can anyone help about forming the corresponding
> > url?
>
> > Thanks.
>
> > On Jan 14, 7:38 pm, Zeynel  wrote:
>
> > > Hello,
>
> > > I am working on a simple news site for people to post Sarah Palin
> > > related links. At this point I have a submit 
> > > pagehttp://sarah-for-president.appspot.com/submitandanewest 
> > > pagehttp://sarah-for-president.appspot.com/newest
>
> > > But I also want to add a comments page (like in Hacker News) so that
> > > people can comment on each article. I want to use disqus for comments
> > > and the page will look something like 
> > > thishttp://sarah-for-president.appspot.com/comments
>
> > > But I don't understand how I can connect an article with its comments.
> > > Hacker News has urls of this 
> > > typehttp://news.ycombinator.com/item?id=2105038
>
> > > I see in Datastore Viewer that each entry has an id:
>
> > > ID/Name: id=1
> > > date: 2011-01-14 20:51:28.256421
> > > title: Sarah Palin Wikipedia page
> > > url:http://en.wikipedia.org/wiki/Sarah_Palin
>
> > > Can you help me understand how to form the urls of the 
> > > formhttp://sarah-for-president.appspot.com/item?id=1
>
> > > Or if this is not correct, what is the correct way?
>
> > > This is my app.yaml:
>
> > > application: sarah-for-president
> > > version: 1
> > > runtime: python
> > > api_version: 1
>
> > > handlers:
> > > - url: /favicon.ico
> > >   static_files: static/images/favicon.ico
> > >   upload: static/images/favicon.ico
>
> > > - url: /.*
> > >   script: sarah.py
>
> > > inbound_services:
> > > - mail
>
> > > and the code is here:http://pastebin.com/5bnEURhj
>
> > > (sorry for all the HTML, i am not using templating at this point)
>
> > > Thanks!

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



Re: [google-appengine] XSL not available in Python for GAE?

2011-01-14 Thread Jason Salas
Thanks for the info! Yeah, that's about as far as my research led me, too.  :(

On Thu, Jan 13, 2011 at 10:42 PM, Robert Kluin  wrote:
> Hi Jason,
>  If you can find a pure Python XSLT processor then it might work on
> App Engine.  A quick google turned up:
>     http://code.google.com/p/pyxslt/
>
>  Looks to be abandon / dead though.
>
>
> Robert
>
>
>
>
>
>
> On Thu, Jan 13, 2011 at 20:55, Jason Salas
>  wrote:
>> Hi all,
>>
>> I'm trying to find a definitive answer, as some of the threads on this
>> topic are a tad old...is there still no way to use XSLT with XML data
>> on the server with GAE in Python?
>>
>> Thanks for the help! :)
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> google-appengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

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