1
votes

I'm trying to create user sessions via Google Cloud Functions (Express-session).

Since no storage is available by default, I'm looking for the best (cheapest/easiest) solution to save my session data.

In this list, the supported services are listed: https://cloud.google.com/functions/docs/concepts/services

I've tried SQL but this is not available as a service, BigTable/Spanner requires continues uptime (= not cheap), Firebase looks quite complex and DataStore is not available since I have no App Engine.

Can someone point me into the right direction? It's just a hobby project so it does not have to scale hard.

2

2 Answers

1
votes

You can use Datastore with Cloud Function, see e.g., this tutorial. AppEngine is definitely not a prerequisite for using Datastore.

I'd recommend Firestore, though. The client library is more intuitive in my opinion and Firestore is strongly consistent.

-1
votes

I suggest you to visit the Google Cloud webpage dedicated to choose the storage option that best suits your present and future needs, which you know better. Just follow the schema. Check the “pricing” for your chosen products (e.g.: I would choose DataStore or Cloud Storage).

You can use DataStore without deploying App Engine services, so it is also an option.