Cloud (1)

We have learned how to make to enable your own computer be a server in Section 1.5. But only the clients within the same inner network can access this website.

So how can you make your website be accessed by people all over the world? The code remains unchanged, and the only and minimal requirement is a public IP address.

Nowadays, cloud platforms facilitate the deployment by using a "pay-as-you-go" model, and therefore you do not have to own a physical machine as a server running your website.

Generally speaking, the cloud computing can be Infrastructure as a service (IaaS), Platform as a service (PaaS), or Software as a service (SaaS). The details of them are out of the scope of this book, and we only focus on how to deploy a Java EE project on the cloud. There are many vendors on the market provided by big technology giants, and just to name a few:

And roughly speaking, you may have two options to use the cloud service:

  1. It looks a real machine, and you can nearly do anything on this machine.
  2. It is just an application container, and you can only upload your project onto it.

Those two options have their own advantages and pitfalls. For example, the first one provides more flexibility as you have more controls, but it requires that the user must have some extra specialized skills (mainly on Linux). In the contrast, the second one is much simpler, but its functionalities is also limited.

Azure

In this book, we use Microsoft Azure as the cloud platform to deploy the website, because it provides free access for students.

[!TIP] You can go to Azure Students and apply for its free usage via your edu email.

Azure offers plenty of cloud services, including virtual machines, databases, application services. And here please choose application services, which is like the second option we mentioned above, and one can focus on the project itself even if she does not have much knowledge about command shells.

[!NOTE] You shall try out virtual machines if you are curious.