Azure - Java aplication - java

We are planning to deploy Java application ( using jax-ws) on Azure with Tomcat. But am not sure how to connect to On premises database on Azure in Java. Can someone please provide some pointers.
Thanks.

Assuming you will deploy your Java app in an Azure App Service, you have basically two options:
Use a hybrid connection
Use a VNET integrated App Service and connect to on-premise via VPN or Express Route

Related

How to run an application that uses aws Service Discovery locally?

I'm currently trying to create an application that have some separated micros-services and they need to communicate between them.
The problem is: I want to deploy the complete application to aws, using ECS, ECR, and mainly using AWS Service Discovery.
The application runs ok on the cloud, but how to run it locally?
My initial thoughts tends towards something like choosing between using the Service Discovery when on the cloud or using something like Eureka locally.

REST API AWS cloud using java

I am new to AWS , want to develop a cloud ready java application REST API.
The application will hit the MySQL database and produce output as JSON after querying the database.
IP:port/application?q=<query> response is JSON.
How to achieve it ? the data in MySQL is mostly static 100MB data but used very frequently.
It is very straight forward. if you already have same application running in your local system , then you can just move it to AWS , using below steps :-
spin up new ec2 instance, if you are using a free-tier then you can spin up lots of AWS resources for free , more information on https://aws.amazon.com/free/ .
install all the required s/w like Java, maven , tomcat and mysql and whatever your application is using on Ec2 instance . you can even have a free RDS (Database) instance in free tier which you can use for your application , instead of having the database installed locally on your application server.
while creating the ec2 server , configure instance security group properly for ex 8080 for http and 22 for SSH , 3306 for mysql etc. (This is important and try to be as restrtict as possible to make it safe from hackers).
build and deploy your application and access it using any REST client , by giving instance ip and application port number.
There are several resources online for AWS , you can refer https://www.youtube.com/watch?v=oS7VYX7LXUo which talks about deploying a java application to AWS.
Let me know if you need any other information.
Deploying Java apps (for example, a Spring BOOT APP) that interacts with the Amazon Relational Database Service (Amazon RDS) to the cloud is easy when using Elastic Beanstalk. An example of a Spring Boot database application that queries data from MySQL running on the cloud is documented here: https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2/usecases/creating_secure_spring_app

How do I deploy own server (written in Java) on AWS (something like Openshift's DIY)?

Is there some thing similar to "Openshift's DIY" on AWS?
I never use AWS, now need deploy our team's own server(written java) on cloud, and we must use AWS.
This server listening to a custom port, and offering RPC service for client.
I wonder whether it is possible to do DIY on AWS, and how?
And whether that supports go language server?
OpenShift is a PaaS provider. It gives you a Platform with a Java runtime and an application server (Tomcat, Wildfly,...) on which you can deploy your application.
AWS has a lot of different services. EC2 is a IaaS. It gives you an Infrastructure. It starts a virtual machine with the operating system you've choosen, then you install Java and you can deploy your application. Some additional setup has to be done on the virtual network.
AWS Linux server instances can run Go applications just like any other Linux server. You won't get anything like Google App Engine of course. You'll just get a bare Linux server.

Tomcat MySQL Server with OAuth 2.0

I am trying to implement a MySQL database that is accessible via REST APIs. In order to do so, I am running a dynamic web project within a Tomcat 8.0 Server.
However, now I am looking to implement some form of authentication that has to happen before a client (i.e. an Android app) can have access to the APIs. I have been reading up on OAuth 2.0, and it does appear to be what I am looking for.
Based on the article that I have been reading (http://tutorials.jenkov.com/oauth2/authorization.html), it appears that a separate OAuth server has to be running. The question is, how can this be done? I am currently using Eclipse to compile and start my local Tomcat server. Do I have to create a separate server in Eclipse? Once the permission has been granted, does the client need to interact with the OAuth server in order to access the database data or does it interact with the Tomcat server that I am running?

publishing and hosting the webservice on cloud

I have web service that is up and running that is in other words it is publish on my tomat on port 8080 and I can hit it through my browser now I want that my webservice to be get published on cloud so that I can pass wsdl uri to any one in the world and he can access my wsdl. Please advise how to achieve this ..!!will Amazon provide such facilities.
I've tried various options and Amazon's Elastic Beanstalk is the most seamless. You can launch your Java webservice by simply uploading a war. However, it does require an EC2 instance to be running.
Other options are Heroku and Windows Azure
Heroku has a free tier and uses Maven/Git to deploy the app to their server. https://devcenter.heroku.com/articles/deploy-a-java-web-application-that-launches-with-jetty-runner
Windows Azure also has instructions on how to deploy a java webapp on their platform. http://www.windowsazure.com/en-us/develop/java/
Given these options, In my personal opinion, the cheapest is Heroku and the most convinient is Amazon Elastic Beanstalk.

Categories