Skip to content

Instantly share code, notes, and snippets.

@uunsamp
Created December 30, 2014 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uunsamp/c545d6b7fa48bb458bd4 to your computer and use it in GitHub Desktop.
Save uunsamp/c545d6b7fa48bb458bd4 to your computer and use it in GitHub Desktop.
given i have an app running somewhere and someone sends a request for a resource
if it's a request for a page, maybe that page should be cached by the web server and served
but what if it's something like a POST request
does it make sense for an app to create a new job for each http POST request on a certain endpoint or should the endpoint process the request immediately?
by immediately, i mean use a few function calls to validate the data, insert the data, and on success or failure of updating the db, return this status to the user
i can do this with 3-4 lines, but i can't decide if i should just throw the request into a job scheduler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment