Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Engine URL mapping

From http://code.google.com/appengine/docs/python/tools/webapp/running.html

Tip: App Engine routes requests to Python scripts based on the URL and mappings specified in the application's app.yaml file. A webapp WSGIApplication further maps specific URL paths to request handlers. How you use both mappings is up to you: You could have all non-static URLs go to a single Python script, and have the script dispatch all dynamic URLs to handlers. Or, you can group functionality into multiple WSGI applications run by different scripts, and use app.yaml to map the appropriate URLs to the appropriate applications.

My question is: Which is better/faster/more efficient (app.yaml mapping to multiple apps?) or if there is no performance difference, which would you use and why?

like image 650
nxgn Avatar asked Nov 15 '22 06:11

nxgn


1 Answers

There's no performance difference worth considering. The pattern most people use is to have a single handler script (with a single mapping in app.yaml) per logical 'application' inside your webapp. In many apps, that translates to just one handler, or one for the main site plus another for the admin functionality.

like image 96
Nick Johnson Avatar answered Jan 21 '23 19:01

Nick Johnson