ssw
ssw

Reputation: 175

Does Firebase server sdk works on Google Appengine Java

On Firebase server setup page (https://firebase.google.com/docs/server/setup), it provides a java sdk (firebase-server-sdk.jar) for regular Java application. i'm wondering if firebase-server-sdk.jar will work for google appengine.

As you know, google appengine is special container that have restriction such as not allowing us to run our own long running process.

firebase-server-sdk allows us to setup listeners to listen to data change on firebase realtime database, which seems like it may require some kind of long running process. (for example, see https://firebase.google.com/docs/database/server/retrieve-data)

Upvotes: 2

Views: 474

Answers (2)

Marta Pérez
Marta Pérez

Reputation: 21

I suggest you to take a look at the flexible environment of appEngine.

Standard version is not prepared at all for persistent connections (is more usefull when we talk about periodic maintenance of the db, mails, or anything you can actually do with a cron) and if you try to use it permanently sometimes it will lose connection.

So if this is your case, consider using flexible environment. It's beta, probably it will be more expensive, but it keeps the connection up.

https://cloud.google.com/appengine/docs/flexible/

hope this helps!

Upvotes: 0

ssw
ssw

Reputation: 175

Thanks to @FrankvanPuffelen for the answer.

At the current moment, firebase-server-sdk works with google appengine java, but only on manual scaling instance. as it requires a long-running thread. It does not work for appengine on auto-scaling.

source: https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio

Upvotes: 2

Related Questions