Deploying in the cloud

There are many advantages to deploying applications in the cloud, such as scaling the application as per its load, and all the benefits of not having to maintain your own data center or physical machines. Other than hosting the application and flexibility, most cloud platforms also provide services like a database, file storage, messaging, and so on, which can be easily integrated into your applications.

Deployment services provided by cloud platforms can be broadly classified as follows:

  • Infrastructure as a service (IaaS): In this service, you get virtual machines (VMswith complete control. You can install any software on them and set up load balancing, storage, network, and security. It is like having your own data center in the cloud. Examples of IaaS are Amazon Elastic Compute Cloud (EC2) and Google Compute Engine.
  • Platform as a service (PaaS): In this service, you get VMs with OS and server software installed. Services like load balancing, security, network, and so on are also pre-configured for you (or made very easy to configure). Therefore, you can focus on just application deployment. You can take, for example, a WAR file and deploy it directly in a PaaS. Examples of PaaS are Amazon Elastic Beanstalk and Google App Engine.

Though an IaaS offers more flexibility, it is more difficult to configure than a PaaS.

In the following sections, we will see how to deploy JEE applications in the aforementioned types of services in AWS and Google Cloud.

Note

This book, and this chapter in particular, explains deployment for development and testing, and not production. Deployment for production is a vast and complex topic and requires many considerations like security, scaling, and so on, which are not in the scope of this book.

You need to have accounts with cloud service providers you want to use in order to use the services. Depending on the services you use and the load on your servers, deployment to the cloud could cost you a lot of money. However, almost all cloud providers offer their services for free so that you can try them out for a limited period of time. To follow examples in this chapter, make sure you have accounts with AWS Cloud (https://aws.amazon.com/) and Google Cloud Platform (https://cloud.google.com).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.197.251