Cloud Out Loud Podcast

Episode 4 - Noone Puts Code in the Background (in Cloud Functions)


Listen Later

Send us a text

Episode 04: Show Notes


This week we talk about the 5th on the series of blog entries from the Developers and Practitioners big: Avoiding GCF anti-patterns part 5: How to run background processes correctly in Python.


This post identifies problems where python code calls standard libraries to put processing in the background. While this is a common practice in data centers or on the developer’s box, in a server less environment this does not work correctly.


If there is a need to have processing separate from the main thread of execution, you should use tools such a Cloud Tasks to spin off the processing.




Key Points From This Episode:


  • Code is executing in a sandbox, not a machine. Forks don’t work the way you expect
  • Rather than break off threads to execute, use more instantiations of the code, or hand off execution to another Cloud Function via Cloud Tasks
  • Make sure you are doing code reviews to catch problems like this early
  • Some speculation on the upcoming AWS re:Invent.
...more
View all episodesView all episodes
Download on the App Store

Cloud Out Loud PodcastBy Jon and Logan Gallagher