April 15, 2022

Top 20 Google Cloud Computing Interview Questions and Answers

The Google Cloud Computing Platform is a rapidly evolving industry standard, and many organizations have a successful application that is promoted in a variety of ways. Every organization has a variety of cloud computing options, including roles such as Cloud Computing Manager, Cloud Computing Architect, Module Lead, Cloud Engineer, Cloud Computing Trainer, and so on. Below are the most often asked questions and answers in this sector, which will be useful to all candidates.

Google Cloud Platform (GCP) is a set of cloud computing services supplied by Google that run on the same infrastructure as Google's internal products, such as Google Search, Gmail, and YouTube.

Google has introduced a number of cloud services to the App Engine platform since its launch. Its specialization is offering a platform for individuals and businesses to create and execute software, and it connects those users over the internet.

 

Ques. 1): What do you understand by Cloud Computing?

Answer:

Cloud computing is described as computer power that is entirely stored in the cloud at all times. It is one of the most recent developments in the online saga sector, and it mostly relies on the Internet, i.e. the Cloud, for delivery. The cloud computing service is genuinely worldwide, with no regional or border limits.

 

Ques. 2): What is the difference between cloud computing and virtualization?

Answer:

        Cloud computing is a set of layers that work together to provide IP-based computing; virtualization is a layer/module inside the cloud computing architecture that allows providers to supply IaaS (Infrastructure as a Service) on demand.

        Virtualization is a software that allows you to generate "isolated" images of your hardware and software on the same machine. This allows various operating systems, software, and applications to be installed on the same physical computer.

 

Ques. 3): Tell us about Google Cloud's multiple tiers.

Answer:

The Google cloud platform is divided into four layers:

1. Infrastructure as a Service (IaaS): This is the foundational layer, which includes hardware and networking.

2. Platform as a Service (PaaS): This is the second layer, which includes both the infrastructure and the resources needed to construct apps.

3. Software as a Service (SaaS): SaaS is the third layer that allows users to access the service provider's numerous cloud products.

4. Business Process Outsourcing: Despite the fact that BPO is not a technical solution, it is the final layer. BPO refers to outsourcing services to a vendor who would handle any issues that the end-user may encounter when using cloud computing services.

 

Ques. 4): What are the most important characteristics of cloud services?

Answer:

Cloud computing and cloud services as a whole provide a slew of capabilities and benefits. The items listed below are the same. The convenience of being able to access and control commercial software from anywhere on the planet.

        The capacity to build and develop web applications capable of handling multiple customers from around the world at the same time, and to quickly centralise all software management tasks to a central web service.

        By centralising and automating the updating process for all applications installed on the platform, the need to download software upgrades will be eliminated.

 

Ques. 5): What is GCP Object Versioning?

Answer:

Object versioning is a method of recovering data that has been overwritten or destroyed. When objects are destroyed or overwritten, object versioning increases storage costs while maintaining object security. When you activate object versioning in your GCP bucket, a noncurrent version of the object is created every time the item is overwritten or removed. To identify a variant of an entity, properties generation and meta generation are utilised. The phrase generation refers to the act of producing material, whereas meta generation is the process of producing metadata.

 

Ques. 6): Why is it necessary for businesses to manage their workload?

Answer:

A workload in an organisation can be characterised as a self-contained service with its own set of code that must be executed. Everything from data-intensive workloads to transaction and storage processing is included in this task. All of this labour is independent of external factors.

The following are the primary reasons why businesses should manage their workload.

        To get a sense of how their applications are performing.

        To be able to pinpoint exactly what functions are taking place.

        To obtain a sense of how much a specific agency will charge for using these services.

 

Ques. 7): What is the relationship between Google Compute Engine and Google App Engine?

Answer:

        Google Compute Engine and Google App Engine are mutually beneficial. Google Compute Engine is an IaaS service, while Google App Engine is a PaaS service.

        Web-based applications, mobile backends, and line-of-business applications are typically operated on Google App Engine. Compute Engine is an excellent alternative if you want more control over the underlying infrastructure. Compute Engine, for example, can be used to construct bespoke business logic or to run your own storage system.

 

Ques. 8): What are the main components of the Google Cloud Platform?

Answer:

The Google Cloud Platform (GCP) is made up of a number of components that assist users in various ways. I'm familiar with the following GCP elements:

                    Google Compute Engine

                    Google Cloud Container Engine

                    Google Cloud App Engine

                    Google Cloud Storage

                    Google Cloud Dataflow

                    Google BigQuery Service

                    Google Cloud Job Discovery

                    Google Cloud Endpoints

                    Google Cloud Test Lab

                    Google Cloud Machine Learning Engine

 

Ques. 9): What are the different GCP roles you can explores?

Within Google Cloud Platform, there are many positions based on the tasks and responsibilities.

        Cloud software engineer: A cloud software engineer is a software developer who focuses on cloud computing systems. This position entails the creation of new systems or the upgrade of current ones.

        Cloud software consultant: This position comprises finding solutions to Google's cloud computing customers' complicated problems.

        Technical programme managers: To oversee the planning, communication, and execution of diverse cloud solutions, you'll require appropriate technical competence in cloud computing.

        Cloud engineering managers: Software engineers hired for this position are responsible for designing and delivering internet-scale solutions and products within the cloud computing infrastructure.

        Cloud engineering support: As a software engineer, you could be in charge of managing cloud computing systems and providing technical help to cloud customers who are having problems.

        Product managers for cloud products: As a product manager, you'd be in charge of overseeing the development of new cloud products from conception to launch.

 

Ques. 10): In Google Cloud Storage, what is a bucket?

Answer:

Buckets are the most fundamental containers for storing information. You may arrange data and grant control access to buckets. The bucket has a globally unique name that corresponds to the location where the contents are kept. It also contains a default storage class that is applied to objects that are added to the bucket without a storage class defined. The number of buckets that can be created or deleted is similarly unlimited.

 

Ques. 11): What is Cloud Armor, exactly?

Answer:

It will aid in the protection of your infrastructure and application from DDoS attacks. It protects your infrastructure by working with HTTPS load balancers. For the same, we can accept or disallow the rule. Cloud Armor's rules language is flexible, allowing for customization of defence and mitigation of attacks. It also contains predefined rules to protect against application-aware cross-site scripting (XSS) and SQL injection (SQLi) attacks. If you're running a web application, the allow and deny rules you set up will help you protect against SQL injection, DDoS attacks, and other threats.

 

Ques. 12): In cloud computing, what is load balancing?

Ans: In a cloud computing context, load balancing is the practise of spreading computer resources and workloads to control demand. It aids in achieving high performance at lower costs by effectively managing workload demands through resource allocation. It makes use of the concepts of scalability and agility to increase resource availability in response to demand. It's also utilised to keep track of the cloud application's health. All of the major cloud companies, such as AWS, GCP, Azure, and others, provide this feature.

 

Ques. 13): What is Google BigQuery, and how does it work? What are the advantages of BigQuery for data warehouse administrators?

Ans: Google BigQuery is a software platform that replaces the traditional data warehouse's hardware architecture. It is employed as a data warehouse and hence serves as a central repository for all of an organization's analytical data. In addition, BigQuery divides the data table into components called as datasets.

For data warehouse practitioners, BigQuery comes in handy in a number of ways. Here are a few of them:

        BigQuery dynamically assigned query resources and storage resources based on demand and usage. As a result, it does not necessitate resource provisioning prior to use.

·         For efficient storage management, BigQuery stores data in a variety of ways, including proprietary format, proprietary columnar format, query access pattern, Google's distributed file system, and others.

        BigQuery is completely up to date and controlled.

        BigQuery enables a broader level of backup recovery and catastrophe recovery.

        BigQuery engineers manage the service's updates and maintenance completely without any downtime or performance degradation. Users can easily reverse changes and return to a previous state without having to request a backup recovery.

 

Ques. 14): What are the primary benefits of utilising Google Cloud Platform?

Answer:

Google Cloud Platform is a platform that connects customers to the greatest cloud services and features available. It is gaining popularity among cloud experts and users due to the benefits it provides.

The following are the key benefits of adopting Google Cloud Platform over other platforms:

        When compared to other cloud service providers, GCP offers significantly lower price.

        When it comes to hosting cloud services, GCP has improved performance and service generally.

        Google Cloud is very quick to provide server and security updates in a more timely and effective manner.

        The security level of Google Cloud Platform is exemplary; the cloud platform and networks are secured and encrypted with various security measures.

 

Ques. 15): What are the different types of service accounts? How are you going to make one?

Answer:

        The service accounts are used to authorise Google Compute Engine to undertake tasks on behalf of the user, allowing it to access non-sensitive data and information.

        By handling the user's authorization procedure, these accounts often facilitate the authentication process from Google Cloud Engine to other services. It is important to note that service accounts are not utilised to gain access to the user's information.

        Google offers several different sorts of service accounts, however most users prefer to use one of two types of service accounts:

        Service accounts for Google Cloud Platform Console

        Accounts for the Google Compute Engine service

The user doesn’t need to create a service account manually. It is automatically created by the Compute Engine whenever a new instance is created. Google Compute Engine also specifies the scope of the service account for that particular instance when it is created.

 

Ques. 16): What are the multiple Google Cloud SDK installation options?

Answer:

The Google Cloud SDK can be installed using one of four distinct methods. The user can install Google Cloud Software Development Kit using any of the options below, depending on their needs.

        Using Google Cloud SDK with scripts, continuous integration, or continuous deployment — in this scenario, the user can download a versioned archive for a non-interactive installation of a given version of Cloud SDK.

        YUM is used to download the latest published version of the Google Cloud SDK in package format when operating Red Hat Enterprise Linux 7/CentOS 7.

        APT-Download is used to get the latest released version of the Google Cloud SDK in package format while operating Ubuntu/Debian.

        The user can utilise the interactive installer to install the newest version of the Google Cloud SDK for all other use cases.

 

Ques. 17): How are you going to ask for greater quota for your project?

Answer:

        Default quotas for various types of resources are provided to all Google Compute Engine projects. Quotas can also be increased on a per-project basis.

        If you find that you have hit the quota limit for your resources and wish to increase the quota, you can make a request for more quota for some specific resources using the IAM quotas page on the Google Cloud Platform Console. Using the Edit Quotas button at the top of the page, you can request more quota.

 

Ques. 18): What are your impressions about Google Compute Engine?

Answer:

        Google Compute Engine is an IaaS offering that provides self-managed and configurable virtual machines hosted on Google's infrastructure. It features virtual machines based on Windows and Linux that may run on local, KVM, and persistent storage, as well as a REST-based API for control and setup.

        Google Compute Engine interfaces with other Google Cloud Platform technologies, such as Google App Engine, Google Cloud Storage, and Google BigQuery, to expand its computing capabilities and hence enable more sophisticated and complicated applications.

 

Ques.19): What is the difference between a Project Number and a Project Id?

Answer:

The two elements that can be utilised to identify a project are the project id and the project number. The distinctions between the two are as follows:

When a new project is created, the project number is generated automatically, whereas the project number is generated by the user. The project number is necessary for many services, however the project id is optional (but it is a must for the Compute Engine).

 

Ques. 20): What are BigQuery's benefits for data warehouse administrators?

Answer:

        BigQuery is useful for data warehouse professionals in a variety of ways. Here are several examples:

        BigQuery allocated query and storage resources dynamically based on demand and usage. As a result, resource provisioning is not required prior to use.

        BigQuery stores data in a number of formats for effective storage management, including proprietary format, proprietary columnar format, query access pattern, Google's distributed file system, and others.

        BigQuery is a fully managed and up-to-date service. Without any downtime or performance reduction, BigQuery engineers manage all of the service's updates and maintenance.



January 05, 2022

Top 20 Apache Struts 2 Interview Questions and Answers

  

Struts 2 is a Java enterprise application framework for constructing web applications. It was created by the Apache Software Foundation. In the year 2006, it was first released. It's written in the Java programming language. It is cross-platform compatible. It is built on the MVC architecture, which is a software design paradigm for creating applications. Struts 2 includes features such as simplified testability, Ajax support, Thread-safety, and Template support, among others.

Apache Cassandra Interview Questions and Answers

Ques. 1): What exactly is Struts2?

Answer:

Apache Struts2 is a Java web application framework that is free source. The OpenSymphony WebWork framework is the foundation for Struts2. It's a significant improvement over Struts1, making it more adaptable, simple to use, and extendable. Action, Interceptors, and Result pages are the three main components of Struts2.

Struts2 offers a variety of options for creating Action classes and configuring them using struts.xml or annotations. For common jobs, we can make our own interceptors. Struts2 includes a large number of tags and makes use of the OGNL expression language. To render result pages, we can design our own type converters. JSPs and FreeMarker templates can be used as result pages.

 Apache Camel Interview Questions and Answers

Ques. 2): What are some of Struts2's features?

Answer:

Here are some of the fantastic features that can persuade you to use Struts2.

POJO forms and POJO actions − Struts2 has done away with the Action Forms that were an integral part of the Struts framework. With Struts2, you can use any POJO to receive the form input. Similarly, you can now see any POJO as an Action class.

Tag support − Struts2 has improved the form tags and the new tags allow the developers to write less code.

AJAX support − Struts2 has recognised the take over by Web2.0 technologies, and has integrated AJAX support into the product by creating AJAX tags, that function very similar to the standard Struts2 tags.

Easy Integration − Integration with other frameworks like Spring, Tiles and SiteMesh is now easier with a variety of integration available with Struts2.

Template Support − Support for generating views using templates.

Plugin Support − The core Struts2 behaviour can be enhanced and augmented by the use of plugins. A number of plugins are available for Struts2.

Apache Ant Interview Questions and Answers

Ques. 3): What's the difference between Struts 1 and Struts 2?

Answer: 

This is a list of the most common Strut 2 interview questions. The action class in Strut 1 is not a POJO, hence it must inherit the abstract class. An action servlet is used as the front controller. Only JSP is used for the component view. A configuration file can be inserted in the WEB-INF directory in section 1. When processing requests, it makes use of the Request Processor class. Actions and models are separated in Strut 1.

The action class in Strut 2 is a POJO, therefore there's no need to inherit any classes or implement any interfaces. For the view component, it has JSP, free-market, and so on. The function controller in strut 2 is the Struts Prepare and Execute filter. In this, a configuration file must be named as struts.xml and placed inside the classes directory. It uses the concept of Interceptors while processing the request. In strut 2, action and models are combined within the action class.

Apache Tomcat Interview Questions and Answers

Ques. 4): In Struct2, What Is The Use Of Struts.properties?

Answer:

This configuration file allows you to override the framework's default behaviour. In fact, all of the properties in the struts.properties configuration file can be defined in the web.xml using the init-param, as well as in the struts.xml configuration file using the constant tag. However, if you prefer to keep things separate and more struts specific, you can create this file in the WEB-INF/classes folder. The default values configured in default.properties, which is included in the struts2-core-x.y.z.jar distribution, will be overridden by the values configured in this file.

Apache Kafka Interview Questions and Answers

Ques. 5): Explain The Life Cycle Of A Request In Struct2 Application?

Answer :

Following is the life cycle of a request in Struct2 application −

  • User sends a request to the server for requesting for some resource (i.e pages).
  • The FilterDispatcher looks at the request and then determines the appropriate Action.
  • Configured interceptors functionalities applies such as validation, file upload etc.
  • Selected action is executed to perform the requested operation.
  • Again, configured interceptors are applied to do any post-processing if required.
  • Finally the result is prepared by the view and returns the result to the user.

Apache Tapestry Interview Questions and Answers

Ques. 6): What are the inbuilt themes that are provided by strut 2?

Answer:

There are 3 different inbuilt themes:

Simple theme: It is a minimal theme which is having very little content. It means that the text field tag renders the HTML tag without label, validation, error reporting or any other formatting or functionality.

XHTML theme: It is referred to as the default theme used by struts 2 and provides all the basics that a simple theme provides. It adds the other several features like standard two-column table layout for the HTML labels for each of the HTML, validation and error reporting etc.

Css_xhtml theme: This is the theme that provides all the basics that the simple theme provides, and it adds other several features like the standard two-column CSS-based layout and using div tag for HTML struts tags, labels for each of the HTML struts tags and placed according to the CSS style sheet.

Apache Ambari interview Questions & Answers

 Ques. 7): What is internationalization and how does it work?

Answer:

This is one of the most common Struts 2 Interview Questions that is asked during an interview. Localization refers to the process of planning and implementing products and services so that they may be easily modified to specific local languages and cultures, whereas internationalization refers to the act of enabling localization.

Apache Hive Interview Questions & Answers

Ques. 8): What is the difference between an interceptor and a filter?

Answer:

The interceptors are built around struts 2. It runs for all requests that qualify for a servlet filter front controller and can be customised to run extra interceptors for specific action execution. Interceptor methods can be configured to execute or not to execute using exclude and include methods.

Servlet specifications are used to create the filters. Executes on request and non-configurable method calls if the pattern matches.

Apache Spark Interview Questions & Answers

Ques. 9): Explain struts 2's XML-based validation.

Answer:

XML-based validation in Struts 2 adds more validation options, such as email validation, integer range validation, form validation field, expression validation, regex validation, needed validation, string length validation, and necessary string validation, among others. The XML file must be titled 'actionclass'-validation.xml in Struts 2.

Apache NiFi Interview Questions & Answers

Ques. 10): How Does Validation in Struts 2 Work?

Answer:

When the user clicks the submit button, Struts 2 will run the validate method, and if any of the if statements inside the method are true, Struts 2 will call the addFieldError method. Struts 2 will not proceed to invoke the execute method if any errors have been introduced. The Struts 2 framework, on the other hand, will return input as a result of calling the action.

When validation fails and Struts 2 returns input, the view file is redisplayed by the Struts 2 framework. Because we utilised Struts 2 form tags, the error messages will appear directly above the completed form.

These are the error messages we specified in the call to the addFieldError function. The addFieldError method takes two arguments. The first is the form field name to which the error applies and the second is the error message to display above that form field.

 

Ques. 11): What Types Of Validations Are Available In Xml Based Validation In Struts2?

Answer:

Following is the list of various types of field level and non-field level validation available in Struts2 −

  • date validator
  • double validator
  • email validator
  • expression validator
  • int validator
  • regex validator
  • required validator
  • requiredstring validator
  • stringlength validator
  • url validator

 

Ques. 12):  How Does Struts 2's Interceptor Work?

Answer:

The actual action will be performed by calling invocation.invoke() from the interceptor. So, depending on your needs, you can conduct some pre-processing and some post-processing.

The framework initiates the process by using the invoke method on the ActionInvocation object (). When invoke() is called, ActionInvocation consults its state and performs the next available interceptor. The invoke() method will cause the action to be executed once all of the configured interceptors have been invoked.

 

Ques. 13): What Is Value Stack?

Answer :

The value stack is a set of several objects which keeps the following objects in the provided order −

Temporary Objects − There are various temporary objects which are created during execution of a page. For example the current iteration value for a collection being looped over in a JSP tag.

The Model Object − If you are using model objects in your struts application, the current model object is placed before the action on the value stack.

The Action Object − This will be the current action object which is being executed.

Named Objects − These objects include #application, #session, #request, #attr and #parameters and refer to the corresponding servlet scopes.

 

Ques. 14): What Is The Difference Between Valuestack And OGNL?

Answer:

ValueStack is the storage space where Struts2 stores application data for processing client requests. The information is saved in ActionContext objects that use ThreadLocal to store values that are unique to each request thread.

OGNL (Object-Graph Navigation Language) is a sophisticated Expression Language for manipulating data on the ValueStack. Both interceptors and result pages can use OGNL to access data stored on ValueStack, as shown in the architectural diagram.

 

Ques. 15): What Is The Struts-default Package And How Does It Help?

Answer:

Struts-default is an abstract package that specifies all of the Struts2 interceptors as well as the most widely used interceptor stack. To prevent having to configure interceptors twice, it's best to extend this package while configuring our application package. This is provided to assist developers by making the work of configuring interceptor and result pages in our application a lot easier.

 

Ques. 16): What Is The Purpose Of @after Annotation?

Answer :

The @After annotation marks a action method that needs to be called after the main action method and the result was executed. Return value is ignored.

public class Employee extends ActionSupport{

   @After

   public void isValid() throws ValidationException {

      // validate model object, throw exception if failed

   }

   public String execute() {

      // perform secure action

      return SUCCESS;

   }

}

 

Ques. 17): What Is The Purpose Of @before Annotation?

Answer :

The @Before annotation marks a action method that needs to be called before the main action method and the result was executed. Return value is ignored.

public class Employee extends ActionSupport{

   @Before

   public void isAuthorized() throws AuthenticationException {

      // authorize request, throw exception if failed

   }

   public String execute() {

      // perform secure action

      return SUCCESS;

   }

}

 

Ques. 18): What Is The Difference Between Using An Action Interface And Using An Actionsupport Class For Our Action Classes, And Which Would You Prefer?

Answer:

To develop our action classes, we can use the Action interface. This interface only has one function, execute(), which we must implement. The main advantage of utilising this interface is that it includes some constants that can be used on result pages, such as SUCCESS, ERROR, NONE, INPUT, and LOGIN.

The ActionSupport class implements the Action interface by default, as well as interfaces for Validation and i18n support. Action, Validateable, ValidationAware, TextProvider, and LocaleProvider are all implemented by the ActionSupport class. To implement field level validation login in our action classes, we can override the validate() method of the ActionSupport class.

Depending on the requirements, we can use any of the approaches to create struts 2 action classes, my favorite is ActionSupport class because it helps in writing validation and i18n logic easily in action classes.

 

Ques. 19): How Do We Get Servlet Api Requests, Responses, Httpsessions, and Other Objects Into Action Classes?

Answer:

Servlet API components such as Request, Response, and Session are not directly accessible through Struts2 action classes. However, in some action classes, such as checking the HTTP method or adding cookies in the response, these accesses are required.

As a result, the Struts2 API exposes a number of *Aware interfaces through which we can access these objects. Struts2 API injects Servlet API components into action classes using dependency injection. SessionAware, ApplicationAware, ServletRequestAware, and ServletResponseAware are some of the most essential Aware interfaces.

 

Ques. 20): Is Struts2 Interceptors And Action Thread Safe?

Answer:

Because an object is instantiated for each request to process, Struts2 Action classes are thread safe.

Because Struts2 interceptors are singleton classes that launch a new thread to handle the request, they are not thread safe, and we must construct them carefully to avoid any shared data concerns.