Single threaded dev appserver
A while ago, I saw some discussion about using google appengine development server as a live (or production) web server, I forgot the conclusion (probably is no), I also found a reason to say no, when I was adding and testing the accept trackback and test trackback function to micolog on local development server.
Basically, when the post is published, it will send out a trackback request to the linked post, and wait for the success or failed response from the trackback handler of the linked post. But in the trackback handler, since I added another check step, to check the original post whether it exists and it has the linked post url or not, the trackback handler will send out a request as well.
Unfortunately, when I was testing locally, I thought probably I can just use the local post 1 to trackback local post 2. Then the above mentioned 2 requests basically were queued in the dev appserver since it is Single Thread. The 2nd request from trackback handler will never be executed until the lifetime of the trackback handler is gone. So locally, the trackback handler could never determine the orginal post is valid or not, the trackback always failed.
And I learned from a hard lesson, the dev appserver is serving requests by queueing them with single thread, and it is not a good idea to use it to serve wild public.
Custom Search