Saturday , July 27 2024
Breaking News

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

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

Introduction to Serverless Computing using Cloud Functions – Developer I

Serverless computing is a revolutionary paradigm in cloud computing that allows developers to focus solely on writing code without worrying about managing servers or infrastructure. One popular implementation of serverless computing is Cloud Functions, a service provided by various cloud platforms like Google Cloud Platform, Amazon Web Services, and Microsoft Azure.

Here’s an introduction to Serverless Computing using Cloud Functions:

  1. What is Serverless Computing?: Serverless computing, also known as Function as a Service (FaaS), is a cloud computing model where cloud providers manage the infrastructure and automatically scale resources based on demand. Developers write functions, which are short-lived blocks of code, and the cloud provider executes these functions in response to triggers or events.
  2. Benefits of Serverless Computing:
    • No server management: Developers don’t need to provision or manage servers. The cloud provider handles server maintenance, scaling, and availability.
    • Cost-effective: With serverless, you only pay for the compute resources used during function execution, rather than paying for idle server time.
    • Scalability: Serverless platforms automatically scale resources up or down based on incoming traffic or workload, ensuring optimal performance.
    • Focus on code: Developers can focus on writing code and building applications without worrying about underlying infrastructure concerns.
  3. Introduction to Cloud Functions:
    • Cloud Functions are event-driven, serverless functions offered by cloud providers like Google Cloud Platform (Cloud Functions), Amazon Web Services (AWS Lambda), and Microsoft Azure (Azure Functions).
    • Cloud Functions are designed to respond to various events such as HTTP requests, database changes, file uploads, or messages from messaging systems.
    • Developers write functions in supported programming languages like JavaScript, Python, Go, or Java, and deploy them to the cloud provider’s platform.
  4. Key Concepts:
    • Triggers: Triggers are events that invoke Cloud Functions. Examples include HTTP requests, changes in cloud storage, database updates, and pub/sub messages.
    • Function: A function is a piece of code that executes in response to a trigger. Functions are stateless and short-lived, typically handling a single task or operation.
    • Execution Environment: Cloud providers manage the execution environment where functions run. Functions are automatically scaled and executed in isolated environments.
    • Billing: Cloud Functions are billed based on the number of invocations, execution time, and resources consumed during execution.
  5. Use Cases:
    • Web applications: Handling HTTP requests for serving dynamic content, processing form submissions, or implementing APIs.
    • Data processing: Processing and analyzing data from various sources, such as databases, streaming platforms, or file storage.
    • IoT applications: Handling events from IoT devices, processing sensor data, and triggering actions based on real-time events.
    • Backend services: Implementing backend logic for mobile apps, web apps, or microservices architectures.
  6. Getting Started:
    • Choose a cloud provider that offers Cloud Functions (e.g., Google Cloud Platform, AWS, Azure).
    • Install the necessary development tools and SDKs provided by the cloud provider.
    • Write your functions using supported programming languages and deploy them to the cloud platform.
    • Configure triggers to invoke your functions based on events or triggers.

By leveraging Cloud Functions and serverless computing, developers can build scalable, cost-effective, and resilient applications without managing infrastructure, allowing them to focus on writing code and delivering value to their users.

About Clear My Certification

Check Also

Controlling Hadoop Jobs using Oozie Cognitive Class Exam Quiz Answers

Enroll Here: Controlling Hadoop Jobs using Oozie Cognitive Class Exam Quiz Answers Controlling Hadoop Jobs …

Leave a Reply

Your email address will not be published. Required fields are marked *