Hosting a web application on AWS using java, maven, spring and mySQL - java

My son has done a university project which is a web app using Java 8, Maven, Spring boot, Spring hibernate, Spring data and MySQL. I am helping him try to find a free or very cheap hosting solution, and was told AWS is one option. Is this correct? The application is small (15 tables) and the data is a few megs.
If AWS is the way to go, am I supposed to setup a virtual / instance and install all software and upload all code to the virtual? He is using Windows 10 to develop the application. Which instance should be used? There are various "Microsoft Windows Server" options.
A guide on how to do this and have it running on the web would be appreciated.

That isn't an entire guide, but a starting point to check on your options.
All depends on for how long you intend to have the application running.
If you only want to have a demonstration of the APP in School you could really use the AWS Free tier for new users.
If you intend to have it running for more than a year or scale it up, you will either have to refactor it as Micro services based architecture or a payment will be required, though it isn't really that much at all.
I sugges you have a look here:
https://aws.amazon.com/free/
https://aws.amazon.com/answers/web-applications/aws-web-app-deployment-java/
https://aws.amazon.com/elasticbeanstalk/pricing/

Related

Setting up MySQL and Apache for RESTful webservices

Can anybody point me in the right direction for instructions on setting up the following items on a Windows development PC?
Setup a MySQL database.
Setup an Apache webserver, a framework plus an IDE so that I can write RESTful APIs using Java and JSON.
I am using this to write a native Android and IOS mobile app that will store and retrieve data from the MySql database using the RESTful APIs on the Apache web server.
I have searched through several tech books, Google and Stack Overflow but cannot find anything that contains the above specific items. Within Stack Overflow, the following two links proved useful but do not give the specific items that I need. Android - Ruby on Rails - MySQL AND Best practice selecting database for mobile app
If you are planning to develop RESTful APIs using a Windows development PC, you could consider some of the available software bundles like XAMPP (https://www.apachefriends.org/index.html), which include an Apache distribution containing MariaDB (successor of MySQL, you can work with MariaDB as you would in MySQL), PHP (server-side language), and Perl (not neccesary) in a single Windows installer. Then, once you install it, you will have a complete web development environment up and running.
Then, considering that you develop your APIs using PHP as the server-side programming language (which I strongly recommend you as it is the most widely used language for this purpose), several additional decisions have to be taken, in terms of deciding about:
The IDE to develop in. When working with PHP, I recommend you PHPStorm IDE (https://www.jetbrains.com/phpstorm). The best in my humble opinion. However, quite complex and not very easy, but it completely worths learning.
The PHP framework. Unless you want to manually program your APIs (completely madness), you will have to use one of the many available PHP frameworks. In this case, I recommend you Laravel Framework (http://laravel.com). As far I have seen and worked, the best present and future option concerning PHP development. You could then install some RESTful API specific package in top of Laravel to speed up the development, like Dingo/API (https://github.com/dingo/api).
I insist this is just my recommendation, but you have to know that behind all that languages and frameworks there is a quite long and hard learning curve.
Good luck anyway!
1) To install MySQL on Windows refer to this official MySQL guide.
You will need to download and then extract the zip file (I would recommend the Community Edition). You will have all the details you need in the link above. Note that the .msi installer for Windows is no longer available for newer versions of MySQL.
2) Since you are going to use Java, you do not need the Apache web server (httpd) but you need Apache Tomcat as a servlet container (or other alternatives like Glassfish, JBoss as full Java EE application servers).
For building RESTful Web APIs in Java, Jersey is very good option (https://jersey.java.net).
Finally, as an IDE you can use anything, the most popular being Eclipse, NetBeans and IntelliJ IDEA.

Sample Java web application for simulation proposes (inclusive of database script and etc)

I'm currently trying to understand OpNet AppInternal Xpert.(Application Performance Management Software)
May I know where can I download entire JEE application including source code for deployment to TomCAT/weblogic servers?
prefer application with simulation for users and usage.
you can check this site http://www.programmr.com/frontkk have many J2E projects

Can I use Google's Datastore for a desktop application?

I was asked to provide a quick and easy solution for storing data in Java, and since I had experience in working with Google App engine, I thought that I could just use their Google Cloud Datastore (https://developers.google.com/datastore/). But, the project that I'm working on now is a desktop application with a GUI. My question is, would I be able to use these services even though the application I'm developing isn't a web app, and uses Java's GUI components?
Yes you can. The Cloud Datastore gives you access to the normal App Engine Datastore but does not require you to be running a web app. You can then use all the normal Datastore tools that App Wngine provides to manage your data.
You'll want to follow these instructions for setting up your Cloud Datastore project to connect from your GUI app.
It depends. dev_appserver isn't a hardened environment, and simulating a deployed environment is a priority over performance. dev_appserver provides a simulated Datastore, not the real thing. That said, I've built several single-user, locally-served web apps using both the Java and Python dev_appservers, because it was a convenient way to get started and performed well enough for my purposes.
I don't see why not,
Not a java dude, but it says it exposes a HTTP interface, so this:
code.google.com/p/google-http-java-client/‎
should allow you to communicate with it I believe.
Also perhaps have a read of this question
Database for Google App Engine and desktop application

Need help starting with Amazon EC2 for a Java project

I have been googling all day for a good tutorial to help me start with a basic setup for a Java based web application on Amazon Web Services. The popular ones are outdated and the new ones are unclear. Here are a few doubts I have. Primarily I'm looking for a good "Getting started" tutorial.
What to choose to create my custom AMI and what is the best way to build it?
How to configure an EBS volume to store MySQL data and web application project files and how to deploy them from eclipse?
Is there any best practice for setting up an instance for persistence? Specifically, should I use an EBS-backed AMI or use an instance-store AMI and attach an EBS volume to store persistent data?
Please note that I'm looking for the most basic setup as I'm still in development stage but I should be able to scale the system without much trouble.
Any help would be appreciated.
i would suggest to try out grails, it is java (groovy) based, open source, and there are some tools to push your app to the cloud backed by amazon (check out http://www.cloudfoundry.com/ from spring) our to appengine.
http://grails.org

How to take a Java Web-application offline?

We develop Java Web-aps (Websphere, DB2) which display graphical and databased information. We would also like to offer the same application offline (distribution via CD/DVD) with online data-update. We have tried a number of alternatives in the past, but nothing has been really stable. What are the new best practices to take a Web ap plus data (in a small database) offline?
I don't know how well it works with the CD/DVD distribution front, but the first thing that comes to mind is Gears. On the .NET side of the fence there's Silverlight 2. Then there's the Mozilla Prism project, although I don't know how far advanced that is.
These are all designed for not just offline access, but mixed offline/online, talking to a server when it's available and working locally when necessary.
I'd suggest using Apache Derby as the database (also available as Sun's Java DB, and possibly still IBM Cloudscape (does that still have DB2 compatibility in place?)).
I'm sure there's plenty of Web servers/Servlet containers about. Apache Tomcat is the obvious one. An alternative approach would be to use an embedded native browser within a single Java process. That approach should be relatively hassle free for users and tech support, and you can just use WebStart to install and update.
If you're using EJBs and other nonsense, then there are similar freebies about. I understand Sun Glassfish is nice and fast starting.
You could create an image of your server as a VMware instance and distribute it with a copy of VMware player (licensing allowing of course). Personally I'd build it on top of a Linux distribution like CentOS5.
You can bundle a JRE along with JETTY server and use a different database e.g HSQLDB (that you can bundle inside the webapp itself).
If you are using an ORM tool to connect to database, you might not have to make many code changes for this.
A lot of Application server distribute their admin consoles like this.For e.g Weblogic admin console runs offline (it uses internal ldap server for its database)
Also as far as Google gears is concerned, they are also pretty much doing the same thing.
They have a server that is bundled along with SQLDB and they allow to synchronize the data between online offline app.
You can sync the data too (use webservices in the online app) and talk over https from the offline app to sync the data, if you need the sync feature.
Also you can check this link
http://developers.sun.com/learning/javaoneonline/2007/pdf/TS-69700.pdf

Categories