New in Cloud Functions: languages, availability, portability, and more

Google Cloud Functions is a scalable pay-as-you-go Functions-as-a-Service (FaaS) platform that runs your code with zero server management. With its simple and easy-to-use developer experience, we’re excited to extend Cloud Functions so that you can now use it to build end-to-end solutions for several key use cases.Click to enlargeNamely, functions have emerged as a great fit for serverless application backends to integrate with third-party services and APIs, or for mobile or IoT backends. You can also use functions for real-time data processing systems, such as processing files as they are uploaded to Cloud Storage, or to handle real-time streams of events from Pub/Sub. Last, but not least, functions can serve intelligent applications like virtual assistants and chat bots, or perform video, image or sentiment analysis.Here’s an overview of the new Cloud Functions capabilities that you can now take advantage of.  New runtimes: .NET, Java and Ruby join Node.js, Python and GoWhether you use Console.WriteLine, console.log, fmt.Println, print or puts, Cloud Functions has you covered. Cloud Functions now supports six different languages with the following runtimes: Java 11, .NET Core 3.1, Ruby, Node.js (8, 10 and 12), and Python (3.7 and 3.8).New regionsCloud Functions is now available in 11 more regions, including Seoul, São Paulo, Sydney, bringing the total number of regions to 19. This is a significant improvement to the global availability of your Cloud Functions. For more details on available regions, see https://cloud.google.com/functions/docs/locations.Improved local developer experienceThe Cloud Functions team has released the Functions Frameworks: a set of open-source, idiomatic libraries for each of the Cloud Functions-supported languages. Functions Frameworks allow you to run, test and debug your function in your local environment, giving you the same behavior as production without needing to deploy.Function Frameworks also increase the overall portability of your functions. In addition to running locally, the frameworks are also suitable for deploying your function elsewhere as well. For example, using the frameworks with a Dockerfile or Buildpacks allows you to turn a single function into a complete container image that can then be deployed to a service like Cloud Run. This significantly improves the portability of your functions.Improved Cloud Functions UI experienceWe’ve redesigned the Cloud Functions UI at http://console.cloud.google.com/functions, including an improved inline code editor that’s suitable for use with larger screen sizes:Security enhancements with fine-grained controls We work hard to build strong security into all our products, and Cloud Functions is no different. One of the key capabilities Cloud Functions now provides is per-function identities, wherein individual functions within a project have their own identity. In addition, the feature allows for fine-grained control over which resources your function can access.Cost and scaling controlsWhether you want to reduce your overall serverless bill, or simply want to put safeguards in place to prevent cost overruns, here are some key capabilities we offer with Cloud Functions to meet your needs.Set maximum instancesMax instances in Cloud Functions is a feature that allows you to limit the degree to which your function will scale in response to incoming requests. Choosing the right number of maximum instances depends on your traffic and your desired request latency. Cloud Functions provides a Cloud Monitoring metric (cloudfunctions.googleapis.com/function/active_instances) that you can use to estimate the number of instances your function needs under normal circumstances.You can change the max instances value for Cloud Functions via the command line:Learn more about managing instances in Cloud Functions.Set budget alertsBudget alerts can provide an important early-warning signal of unexpected increases in your bill. Setting a budget alert is a straightforward process, and you can configure them to alert you via email or via Cloud Pub/Sub. That, in turn, can trigger a function, so you can handle the alert programmatically.Use labelsLabels allow you to assign a simple text value to a particular resource that you can then use to filter charges on your bill. For example, you may have an application that consists of several functions. By applying a consistent label to these resources, you can see the overall impact of this multi-function application on your bill. This will help identify areas of your Google Cloud usage that contribute the most to your bill and allow you to take targeted action on them. For more details on labels, see “Creating and managing labels”.Customer Use Case: IKEA RetailIKEA has been using serverless and Cloud Functions as a part of their digital transformation to fulfill IKEA’s vision: “To create a better everyday life for the many people.” To learn more about this, please check out this exciting demonstration from Matthew Lawson, Engineering Manager at IKEA Retail, on IKEA’s live-feed inventory management system.Try Cloud FunctionsThe Cloud Functions team is excited to bring all these new capabilities to you. Interested in learning more? Try one of these next steps:Get started with a quickstart and our free trial.Run your function locally with the Function FrameworksTurn your function into a container with the Google Cloud BuildpacksAnd at any time, feel free to give us feedback on your experience. We’re looking forward to seeing what you can build with Cloud Functions!Related ArticleIntroducing Java 11 on Google Cloud FunctionsYou can now write a Cloud Functions function in Java 11Read Article
Quelle: Google Cloud Platform

Published by