Home » Serverless Computing using Cloud Functions – Developer I Cognitive Class Exam Answers

Serverless Computing using Cloud Functions – Developer I Cognitive Class Exam Answers

by IndiaSuccessStories
0 comment

Introduction to Serverless Computing using Cloud Functions – Developer I

Introduction to Serverless Computing

Serverless computing is a cloud computing execution model where cloud providers dynamically manage the allocation of machine resources. This means developers can focus on writing code and deploying functionalities without worrying about managing servers, scaling applications, or provisioning infrastructure.

Cloud Functions

Cloud Functions are a type of serverless compute service offered by cloud providers such as Google Cloud Platform (GCP) with Cloud Functions, Amazon Web Services (AWS) with Lambda, and Microsoft Azure with Azure Functions. These functions are event-driven, meaning they are triggered by events such as HTTP requests, database changes, file uploads, or scheduled tasks.

Key Concepts

  1. Event-driven: Functions are executed in response to events. For example, an HTTP request to an endpoint can trigger a function to process and respond to the request.
  2. Scalability: Cloud Functions automatically scale based on the number of incoming events. You don’t need to manage scaling configurations manually.
  3. Pay-per-use pricing: You are charged based on the number of executions and the resources consumed during execution time, rather than paying for idle resources.
  4. Statelessness: Functions are stateless by design. They are executed independently and do not maintain state between executions. State can be managed externally, typically using databases or external storage services.

Benefits

  • Reduced operational overhead: Developers can focus more on writing code and less on managing infrastructure.
  • Scalability: Functions automatically scale based on demand, from a few requests per day to thousands per second.
  • Cost-efficiency: Pay only for the resources consumed during function execution, with no charges when functions are idle.

Use Cases

  • APIs and microservices: Implement backend services without managing servers.
  • Event processing: React to events such as file uploads, database changes, or IoT events.
  • Scheduled tasks: Run code on a schedule, like cron jobs.

Getting Started

To get started with Cloud Functions:

  1. Choose a provider: Decide on a cloud provider that offers serverless computing services (e.g., GCP, AWS, Azure).
  2. Define your functions: Write the functions that will handle specific events or triggers.
  3. Deploy and test: Deploy your functions to the cloud and test them with sample events.
  4. Monitor and optimize: Monitor function performance and optimize as needed for cost and efficiency.

Conclusion

Serverless computing with cloud functions offers developers a scalable, cost-effective way to deploy code without managing infrastructure. By focusing on writing code and defining triggers, developers can build powerful applications with reduced operational overhead.

banner

Serverless Computing using Cloud Functions – Developer I Cognitive Class Certification Answers

Question 1: What characteristics of serverless computing contribute to its name?

  • Developers can run backend code to access databases without using servers.
  • Serverless computing scales inherently to incoming events.
  • Serverless computing does not use servers.
  • Server management decisions are hidden from the developer.
  • Serverless developers only need to configure the service framework for their chosen language.

Question 2: Serverless computing is a specific technology with a developed set of standards and practices.

  • False
  • True

Question 3: Serverless computing requires the developer to allocate servers and machine resources.

  • False
  • True

Question 4: Serverless computing scales inherently and executes stateless code in response to events.

  • False
  • True

Question 5: Isabelle decided to use serverless computing for a project that crops photos automatically when added to cloud storage. How would you critique her choice?

  • Serverless is a great choice because it can flexibly react to incoming photos and crop them as needed.
  • Serverless won’t work well here because it depends too much on how often customers will be uploading photos.
  • Serverless may work well, but Isabelle will have to spend some time configuring servers to handle the infrequent uploads.
  • Serverless is a great choice here because it allows Isabelle to manage the allocation of machine resources.

Question 6: You need to develop a project that is as cost-effective as possible. For which reasons would you pick serverless?

  • Serverless outsourcing leads to less infrastructure, operational, and development costs.
  • Serverless only charges for the time when code is executing.
  • Serverless applications can run in low-cost, pre-allocated capacity you can purchase in advance.

Question 7: Long running and non-separable tasks are types of tasks that typically work well in a serverless environment.

  • False
  • True

Question 8: You are given the following graph of usage for an application you are developing. Which of the following is a correct conclusion of the graph?

  • The usage is mostly sporadic, so serverless computing is a bad fit for this usage case.
  • The usage is mostly sporadic, so serverless computing is a good fit for this usage case.
  • The usage is mostly constant, so serverless computing would be a bad fit for this usage case.
  • The usage is mostly constant, so serverless computing would be a good fit for this usage case.

Question 1: If you were to execute the following command which invokes a Hello World action:

ibmcloud fn action invoke hello

it would return with an activation ID and an HTTP response generated by the function.

  • False
  • True

Question 2: When invoking actions, parameter values can be any valid JSON value, including nested objects.

  • False
  • True

Question 3: It is not possible to monitor activation logs in real time using the command line.

  • False
  • True

Question 4: It is impossible to perform a blocking invocation on an asynchronous action.

  • False
  • True

Question 5: If an action in the middle of a sequence fails, the platform will return the error after the last action in the sequence is invoked.

  • False
  • True

Question 1: You can invoke actions in public packages as if they were normal actions.

  • False
  • True

Question 2: You can provide default parameters to an action in a public package just as you would a normal action.

  • False
  • True

Question 3: If you bind a parameter value to a package, that value cannot be overridden on invocation.

  • False
  • True

Question 4: After creating a custom package as private, you can update the package to make it public.

  • False
  • True

Question 1: What is a trigger?

  • An API that invokes a function
  • A network connection between an event source and a function
  • A named channel for a class of events
  • Event data that is sent to functions as key-value pairs

Question 2: What is the purpose of a rule?

  • associates multiple triggers with a single action
  • associates a single trigger with a single action
  • associates a single trigger with multiple actions

Question 3: Rules allow you to define conditional logic that controls if an action gets invoked based upon event data.

  • True
  • False

Question 4: Multiple actions can be fired from a single trigger.

  • Correct
  • Incorrect

Question 1: Any action can be made accessible on the web by simply setting the flag –web to true.

  • False
  • True

Question 2: Functions that are web actions need to parse the raw HTTP request header to obtain query parameters.

  • False
  • True

Question 3: Which command would you use to retrieve the HTTP endpoint for a web action?

  • ibmcloud fn api get <action_name> –url
  • ibmcloud fn action get <action_name> –url
  • ibmcloud fn api get <action_name> –http
  • ibmcloud fn action get <action_name> –http

Question 4: If you have a web action that returns a JSON object, the caller must append .json to the web action’s URL to get a successful response.

  • False
  • True

Question 1: When using the ICF Web UI, you can accomplish almost everything you can using the CLI.

  • False
  • True

Question 2: The ICF Web UI provides access to logs and action metrics.

  • False
  • True

Question 1: ICF scales your actions automatically only in response to event triggers.

  • False
  • True

Question 2: You are given the following graph of usage for an application you are developing. Which of the following is a correct conclusion of the graph?

  • The usage is mostly sporadic, so serverless computing is a bad fit for this usage case.
  • The usage is mostly sporadic, so serverless computing is a good fit for this usage case.
  • The usage is mostly constant, so serverless computing would be a bad fit for this usage case.
  • The usage is mostly constant, so serverless computing would be a good fit for this usage case.

Question 3: Tobias is trying to create an image recognition model for object analysis using large amounts of raw image data. Is serverless a good choice in helping with these tasks?

  • Serverless may be a good choice in both dividing the data into manageable pieces as well as analyzing the data in parallel.
  • Serverless won’t work well here because processing the large amount of raw data would be too costly.
  • Serverless is not a good choice because Tobias would need dedicated servers that have the processing power for analytics.
  • Serverless is a great choice here, but Tobias will have to configure his account to handle the amount of processing needed.

Question 4: Actions cannot directly invoke other actions without using a sequence.

  • False
  • True

Question 5: You are able to pass parameters when invoking an action using the command line directly or indirectly using a parameter file.

  • False
  • True

Question 6: If you have many packages of actions, you can better organize them by creating a package that contains several similar packages.

  • False
  • True

Question 7: Multiple triggers can be configured to fire the same action.

  • Correct
  • Incorrect

Question 8: It may be possible to construct a website entirely using serverless actions.

  • False
  • True

Question 9: If you wish to monitor your action invocations, you need to use the Web UI.

  • False
  • True

You may also like

Leave a Comment

Indian Success Stories Logo

Indian Success Stories is committed to inspiring the world’s visionary leaders who are driven to make a difference with their ground-breaking concepts, ventures, and viewpoints. Join together with us to match your business with a community that is unstoppable and working to improve everyone’s future.

Edtior's Picks

Latest Articles

Copyright © 2024 Indian Success Stories. All rights reserved.