How / where to host a WebService?

-1

Hello, I am taking part in a voluntary project in my college and would like to create a Web Service to help with the internal process and learn a little more about it. Our team has the following environment:

  • A site hosted by Hostgator.
  • A software that uses the database provided by Hostgator.

However, I would like to create a system for interacting the site, the software and one more application (Android and iOS), so the need to create the Web Service. The initial idea was to create it in Java, because I have more experience and ease in dealing with the language, but Hostgator does not support Java, as I was informed by the support. In addition to that, I believe that website hosting services can not be used to maintain a Web Service.

Here are the questions:

  • Is there any way to host the website and web service on the same hosting service? How?

  • If it is not possible, is there another kind of service where I can keep the two or do I have to leave the site there and the Web Service in another service?

I have researched here and in other forums, but I did not find a response that answered completely.

If you know a course, video lesson, bibliography, website, tutorial that can complement the answers, it would be a great help.

    
asked by anonymous 12.07.2018 / 01:26

1 answer

1

You need some things to have a WebService, in Java, I will not be able to pass any help, however in this answer I will try to help you in hosting a WebService.

The answer is that it is relatively possible to do a WebService on a shared hosting in Hostgator, but you would end up having some problems, and I think the main one would be debugging the code in production, since you would not have access to a shell.

Now, in a way where it would be even easier to maintain, you have an EC2 server in AWS, if your application does not require many features, you can even use the free layer for a period, on the EC2 server you could publish both the site , such as WebService, of course you will need to be more careful with your server, firewall, proxy, or whatever settings you want to use, but that was not the case.

  

Creating an instance of EC2

  • Access AWS
  • Create an account, activate your valid credit card, you will not be charged, but you need to free the free layer.
  • Inside your console search for 'EC2', click 'EC2'
  • Click 'launch instance', follow the steps to create the instance free.
  

Create the database in AWS

  • Inside the console search for 'RDS', click 'RDS'
  • Click on 'instances'
  • Click 'Launch DB instances'
  • Follow the steps to create the free instance according to the database you will use.
  

To post

  • Develop your project in your local environment.
  • Configure your instance exactly as your local environment.
  • Switch the local endpoints to the endpoints of your instance.
  • Upload your project to any project hosting, if you use i GIT you can save your project to GitLab , which allows you to save private projects for free.
  • Enter your instance via SSH, download and run your project.

Google also offers a free layer to test your VMs, you would have something much like Google Compute Engine , but I believe that AWS will be easier to understand if it has never operated with it.

Refs:

EC2 RDS

Of course I am considering that you will be able to configure the server, if you do not know how to comment that complement the response, I will soon delete this section.     

12.07.2018 / 02:13