kosukesaigusa / dart_firebase_functions

Apache License 2.0
15 stars 0 forks source link

Finally! #6

Open onlyamessenger opened 2 weeks ago

onlyamessenger commented 2 weeks ago
  1. Just recently finished a rudimentary implementation of Dart cloud functions for a private project. I would really like to see this in the mainstream and contribute if possible. However, your implementation makes use of some concepts I am unfamiliar with. Can you point me in the right direction so I can better understand the proto files, and source gen used in this project?

  2. Do you have a roadmap in mind that can be used to start working on code?

  3. I see this makes use of functions_framework under the hood, does this have the ability to serve multiple functions at different cloud run urls?

kosukesaigusa commented 1 week ago

Thank you for your message, and for checking my package @onlyamessenger!

  1. ... However, your implementation makes use of some concepts I am unfamiliar with. Can you point me in the right direction so I can better understand the proto files, and source gen used in this project?

For proto files, they are used to parse Raw Cloud Event data (such as Cloud Firestore triggered event), in the same as dart_functions_framework package:

https://github.com/GoogleCloudPlatform/functions-framework-dart/tree/main/examples/protobuf_firestore

source_gen is a package which provides developer friendly API to implement code generation package using build_runner. Probably I will stop using it if Dart Macro can be its alternative.

  1. Do you have a roadmap in mind that can be used to start working on code?

Thank you so much for asking, but I can't show a concrete roadmap yet, but I would like to...

  1. I see this makes use of functions_framework under the hood, does this have the ability to serve multiple functions at different cloud run urls?

It's more related to Cloud Run, but I think it is possible!

In my understanding, basically a single function should be correspond to a single Cloud Run function, which requires a single Dockerfile.

So, when we have multiple functions which will be deployed on different Cloud Run instances (urls), we can just need to create each Dockerfile.

In this repository CI, for example in the following GitHub Action result:

https://github.com/kosukesaigusa/dart_firebase_functions/actions/runs/8387683850

shows 8 different functions (and their triggers) are deployed on different urls.

For Node.js, we have firebase CLI, but it is not correspond to dart_firebase_functions, so creating such a CLI tool can be a future work for us.

kosukesaigusa commented 1 week ago

@onlyamessenger

This project is still in its very early stages, so I apologize for any inconvenience. However, I really appreciate your interest!