Java server with Firebase and Google App engine - java

I am slightly confused with the Firebase client library that is available for Java. In the documentation, it says that the library should be used on the server. Recently, I came across Google App Engine. A PaaS service that allows application code to be put in the cloud.
Could I write the server code using the Firebase client library and deploy that as application code on Google App Engine? That way my application could connect with Firebase through the App engine.
I am asking this questions from the perspective of creating a Java application; the same libraries available for Android are not available for Java desktop applications. The only library that can be used in Java is the server library.
Thank you.

That is possible with the firebase-server-sdk.
You find an example deploying a servlet to appengine and access firebase from within the servlet here: https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio
Just skip the android stuff and scroll down to MyServlet source code.
But be aware of the scaling setting you need to use firebase on app engine.

Related

How to set up cloudboost in android app with my own server?

I am new in cloud boost.
I am using cloud boost in my android application for chat feature.
We have integrated cloud boost SDK on our server.
Now I want to use cloud boost in my android app with my server URL but I am not able to init CloupApp with custom URL. I have also tried following method but it not work.
CloudSocket.init(cloudUrl);
CloudApp.init(appId, appKey);
Can someone help me with this?
The library does not support Java/Android and other languages - it only supports Javascript language.
Issue on GitHub: https://github.com/CloudBoost/JavaSDK/issues/9

Get credentials for desktop Java SE Firebase project

I'm trying to access a Firebase database in desktop (non-Android) Java, and can't find where to download the dedifferentiate credentials JSON to initialise the API. There's an option to get started for Android, but that requires putting in an app name and fully-qualified identifier, which isn't applicable for a desktop project. Is there another way of obtaining this file? Or is there an alternative initialisation option?
From the firebase-talk mailing list:
We currently don't have an SDK that is intended for Java desktop apps. We do have a Java server SDK, but it requires a service account which is not secure to include in a desktop app. Your options are to either use the Realtime Database's REST API or communicating with Firebase via your own custom server using the Java server SDK.
We are not actively working on building an SDK for Java desktop apps. However, if others out there would like to see this, please chime in here.

Is it possible to host Java Spring application over Firebase hosting?

I am seeking information about using Firebase (as database) for Java. Is this possible along with hosting of Java (using Spring framework) project over Firebase hosting.
It is possible. Use Google App Engine an environment for running application code in the cloud; Platform as a service (PaaS).
Below is description how make to make basic example.
In the this tutorial, you'll learn how to:
Create a backend service running on App Engine using Android Studio.
Connect the backend service to your data in Firebase.
The sample app stores a to-do list in Firebase, which automatically synchronizes the data across devices, and then uses backend logic running on App Engine to send out daily reminder emails:
https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio
By connecting App Engine to a Firebase database, you can perform complex logic on data without having to manage synchronization and updates; Firebase handles that for you.
No. Firebase offers hosting for static assets only.
The Google Cloud Run seems is most suitable for what you want.
Consider to check the documentation and pricing. Like firebase, cloud run also has a free tier that can help you develop your app with no costs.
The cloud run supports several programming languages including Java.
Once created the service you can try to connect to your firebase project...
Cloud Run Java Documentation

Developing Android Application w/ Existing App Engine Application

I have existing appengine application. I'm planning to develop android application with that existing app. I can only find examples on development of android app w/ new appengine application. Any reference for developing android app for existing appengine project?
There is nothing special about it. You have to add some sort of an API that your mobile apps can use and return data in an easily parsaeble format such as JSON or XML. You have think about whether you need authentication and how to do it (Google accounts are integrated in Android, but you need extra permissions to use them). Then you access them from Android using HttpClient or HTTPUrlConnection.
The 'new' way to do it would be to use Goggle Cloud Endpoints which takes care of authentication and generates an Android client for you automatically. However it is still in
'trusted beta', so you might not be able to use it.
http://endpoints-trusted-tester.appspot.com/

Webservice API for my Java App Engine GWT app

I'm creating a web app that runs on Google App Engine. I'm also developing a desktop client that needs to access/update data on the webapp.
I would like to create a web sevice api between the server and the client. What would be my best options?
According to GAE the do not support RMI og JAX out of the box.
I hate to answer my own question but Restlet is working on a GAE version. The current development version seems to work well.
http://wiki.restlet.org/docs_1.2/13-restlet/252-restlet.html

Categories

Resources