Google Cloud Java SDK - google-app-engine

I was going through the Google Cloud Java SDK on Github when I came across this line. I don't quite understand the meaning of "within Compute/App Engine". This is in with regards to Authentication for Google Cloud Services.
Github Link :
https://github.com/GoogleCloudPlatform/google-cloud-java
*When using google-cloud libraries from within Compute/App Engine, no additional authentication steps are necessary. For example:
`Storage storage = StorageOptions.getDefaultInstance().getService();`*

You can access Google APIs from anywhere on the internet. If the code accessing GCS is running on a phone, on your desktop, on AWS, on a server in colo, then you will need to do the authentication described.
However if you are accessing the API from code that is already running on Google Cloud Platform, then the authentication is automatically provided.

Related

Does Google provide support for Google APIs for vaadin if not using google app engine as a runtime..?

I am new in vaadin and developing a web project so want to know if i do't use Google App Engine as my project's run time environment so that am able to use Google all APIs such as:
*Calender API
*Contact API
*Drive API
* and also other which google provide :
Google APIs
As i get to know that GAE has lot of limitations.
Please suggest me for the structure design of an Enterprise project with
Maven+vaadin+Runtime Environment(Jboss)+Eclipse+MySQL
Google APIs does not require your application to be running on Google App Engine unless of course you’re trying to use an App Engine specific API like this.
If you’re seeking suggestions on how to structure your project using Google App Engine, you may want to do so in official App Engine Google Group as such questions can be considered too broad on stackoverflow.

I want to choose my own Server and own database in google app engine

I am very newly in google app engine.. There are three Questoins on google app engine and in google app engine i want to choose JAVA language.
Does google app engine provide private cloude ?
I want to deploy my application with my own server( E.x.glassfish or JBoss) on google app engine ?
I want to use my own database instead of cloud SQL in google app engine?
Is it possible or not?
With Google Cloud Appengine - no, it's impossible.
With Google Cloud Instances or Google Cloud Containers - all of this is possible.
Appengine is just one piece of Google Cloud, designed for very specific job, with infrastructure managed by Google. You can only write some code (with lot of restrictions too) that runs inside it. You can read some details about code restritions there: https://cloud.google.com/appengine/docs/java/#Java_The_sandbox
What you're looking for is Google Cloud Instances, that are more standard virtual machines, where you can run anything you want. See https://cloud.google.com/compute/
There is still tools for Load Balancing, Health Check, Centralized Logging for Cloud Instances, and other stuff similar to features provided by Appengine.

Google App Engine Access Cloud Datastore from Different Project

I have been trying to find a solution to accessing a datastore in one project from a different google app engine project. I went through the tutorial on accessing a datastore from a different project's compute engine, however, this is not what I am looking for. What is required here is accessing a datastore on one project from a different app engine project. Has anyone done this successfully? Any ideas?
Cheers
As #Patrice says, this is possible by using the Remote API for Java (or for Python), which lets you access different App Engine services from any other application, as stated in the documentation.
For a more specific information on how to access the Datastore remotely with the Remote API, please take a look at this article from the documentation that explains step by step all the procedure.
Please, take into account that if your Google account is configured to use 2-Step Verification, you will need an App Password that authorizes the app to access your account resources.
there is actually an API that lets you make calls to App Engine services from anywhere, even from another App, as long as the credentials are ok, it's called the "remote API"

Install tomcat on Google app engine?

I am pretty new to this whole idea of cloud and started of with Google app engine. I was able to create the basic 'hello world' program.
When i tried to understand the difference between a cloud and a server I learned that Cloud is where you have an access to virtual instance created exclusively for you and you are free to choose and install software of your choice.
But I don't see such an option with Google-cloud/app-engine. What if I have a tom-cat based application server which I would like to deploy on a cloud? Will Google app engine be of any help or should I try other cloud service providers such as Amazon EC2, hp cloud etc?
/DJ
The cloud type that you are referring to is called Infrastructure as a Service cloud.
OTOH, Google App Engine is Platform as a Service cloud.
The difference is that IaaS are a bunch of virtual machines that you need to setup yourself (OS + app stack), while PaaS typically comes with it's own API, where you write your app against the API and the rest (sw stack + scalability) is taken care of.
AppEngine comes with it's own servlet container (Tomcat is also a servlet container), so from this standpoint you could use your code on AppEngine. But the problem lies elsewhere: AppEngine imposes a set of limitation on the apps:
app must use GAE provided databases.
app can not write to filesystem
app can not have listening sockets
requests must finish in 60 seconds (e.g. no Comet or WebSockets -> no push)
You might want to review the FAQ.
To add to Peter's excellent answer, note that Google also has an IaaS service called Google Compute Engine.
Regarding other cloud query-
Before you start with cloud you might once try other options. Currently deploying application in almost all services are very easy.
few of them are-
Jelastic , Heroku , rackspace , nimbus , openshift etc.
Difference between cloud and server is very well explained already.
Since you mentioned about tomcat based application , I have worked with Jelastic for the same and found very easy to implement.
http://jelastic.com/docs/tomcat
http://jelastic.com/tomcat-hosting
Try all possible option , it will help you more .

Using Google App Engine services outside of uploaded application

I am looking to use Google Cloud Storage services outside of launching a google app engine application. My application is designed for running on a hosted server of our own, and I would like to still use the cloud storage service.
I've written a dev app that did this, and ran it with dev_appserver.py in the python GAE framework. It seems the dev_appserver.py is necessary as it fills in how to perform the RPC functions the cloud storage provides.
Is there a way to easily use google cloud storage service without the rest of it?
There is gsutil command line tool:
https://developers.google.com/storage/docs/gsutil
There is an xml/json restful service all at:
https://developers.google.com/storage/index
You'll need to enable the google cloud storage on the google console at:
https://code.google.com/apis/console/ and get the necessary api keys.

Resources