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

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

Related

Google Cloud Storage in NON-GAE Java app

I'm hoping someone can shed some light on this for me, seeing as I am fairly new to using Google Cloud Storage. Is it possible to use GCS in a non app-engine application, more specifically an application running in Kubernetes in GKE.
Also, how would one spin up a local development version of the storage for testing? All the examples I can find is app-engine specific, i.e. spinning up the app engine local development server.
Maybe some more context, we want to use this for serving dynamic images, so need fairly low-latency R/W to the storage.
Yes, absolutely. While Google Cloud Storage can be used with Google App Engine, it is a standalone service that can be interacted with from anywhere.
If latency and throughput are particularly important to you, it would make a lot of sense for you to run your application which deals directly with Google Cloud Storage from inside the Google Cloud, where it will experience very low latency and can achieve very high throughput. Many GCE applications use GCS, as well as AppEngine apps and Container Engine apps.
When dealing with GCS directly from outside of AppEngine, you will want to use one of our two public APIs, called the XML and JSON APIs. You could also use one of many client libraries which invoke those APIs. In addition, for ad-hoc tasks or for experimenting, you can use our command-line client, gsutil, as well as our interactive UI in the Google Cloud Console.

Could the Google App Engine be used to drive a desktop application?

I have the impression that the Google App Engine allows an interface for developers to make use of Google's servers for storing custom application data in a highly scalable and cost effective way. Whilst working through their tutorials, it seems like tools are focused on aiding the development of 'web applications'.
I'm looking to take advantage of the GAE in order to serve data for a platform independent desktop application that I'm writing in Java, so my end product will not rest within the confines of a browser. Is this functionality supported by the GAE?
Yea! you can do that.
So basically, you are going to build a native application and use API calls to send/receive data from a server(GAE). I see a good solution will be to
Build your API endpoints using the Endpoints lib https://cloud.google.com/appengine/docs/java/endpoints
Then, depending on your application you can make API calls directly or build a client library

Synchronizing Google App Engine DataStore with local instance via Datanucleus REST API or some other Java API

I'd like to know if someone can guide me in this aspect, as everything I know is that Datanucleus REST API may help into making the contents of my local Google App Engine datastore and the online one the same, but there might be also another way to do that which is easier, as I'm having great difficulties to understand how could might be done via that API. Application has been done in Java so there's no point in trying to develop it into phyton know, it's way too late for that now.
Thanks a lot for your interest.
Edit: Well I actually found some interesting tools here: http://www.appwrench.onpositive.com, but it would be better for my application if I could done by code as it would need to be executed automatically once a day, so if you know of some not too hard way to achieve what I'm telling I'll be grateful if you tell me so, if not I'll just stick with the tools.
I don't know DataNucleus, but you can connect GAE Datastore from local machines using Remote API
you can use Remote API to access a production datastore from an app
running on your local machine. You can also use Remote API to access
the datastore of one App Engine app from a different App Engine app.
With this, you can code an app to synchronize the data

Newbie using Google App Engine

I've just started using Google App Engine and I have a few questions about it. I hope you can help me:
Once my Java web application is running on Google App Engine. What if one day I decide to run it on my own server. Which programs/services would I need? Is it difficult to configure?
I have a Javascript code that I would like to store on Google Application Engine, so that external webpages can run it directly. Is it possible? Otherwise could I deploy a Java application on Google App which returns this Javascript code? How could an external site ask on "execution time" for this code and run it?
THANKS!!
AppScale supports Java and allows users to deploy and host their own Google App Engine applications
Of course you can, although GAE is not meant to be used as a CDN.
Have a look to Static Files and Resource Files documentation.
It depends on what services you actually use. Take a look at AppScale, it will facilitate running your application on your own servers. I would also suggest looking at TyphoonAE (Python only), to see another software 'stack' providing similar services.
See the section on static files and resources in the docs.

Alternatives of Google App Engine + Java

If I develop my web application on GAE using Java, in future would I have easy migration opportunities, or will I stuck to GAE?
What can be other alternatives of Google App Engine + Java?
Not:
An GAE you are pretty much developing inside a Google managed Container - against restricted Java and other APIs. This is the PaaS - Platform As A Service approach to cloud computing. This would be similar to the Salesforce, Facebook etc approach.
However for most flexibility you should look at IaaS - Infrastructure As A Service Cloud platforms (like Amazon/Rackspace/etc..) where you have most flexibility.
We currently use both Rackspace and Amazon and have machines as our elastic containers on top of which we can deploy anything we want (custom Ubuntu image etc..)
With some care, you can write a Java app such that it will work both on and off App Engine. A better option, though, would be to use AppScale if you choose to leave App Engine. AppScale provides an App Engine compatible environment on your own hardware.
right now most viable competitor of GAE is Windows Azure. You can easily build a site/application in Azure without getting dependent on Azure framework. There is /very/ little from Azure APIs that you have to deal with(mostly for diagnostics). If you decide to use other Azure services, like table storage services, you'll want to get real good at abstracting yourself away from the table storage to make your code portable. Dealing with SQL Azure (at least from utilization perspective) is no different then using SQL Server and you would need to make a simple abstraction from actual rdbms implementation (most data access libraries do that anyway) to later utilize MySQL or Oracle, etc.
You will probably be stuck to GAE (or a very similar platform you could replicate on your own).
Alternatives: Amazon EC2? Windows Azure?
Using GAE requires you to design the app around their system so migration could require a rewrite. Certainly their NoSQL db at the least. Some people are saying Amazon EC2 is a better bet, but I haven't tried it yet. Also I prefer python-based stuff like Django, rather than Java stuff. Try the pyjamas client-side toolkit also.

Categories