1

I already have an existing microservice app.

Now I want to add a simple database to simply grab contact information during events, this information will be edited once with a boolean to define if a user has been contacted yet or not.

I was thinking of making a table in a relational database to keep track of this but I think a NoSQL database would be better for this. So I decided to use Firebase, now my question is:

Where would this fit in my architecture?

[Front end] -> [API Gateway] -> [Service 1, Service 2, etc]

I was thinking of 2 options:

  1. Putting it directly into the front end (as far as I know this is the intended Firebase use)
  2. Putting it in the API Gateway
MrR3set
  • 61
  • 4
  • 2
    Both of the approaches can work equally well, and neither if them is pertinently better than the other. If you've never used Firebase before, I recommend getting started with one of the [codelabs](https://firebase.google.com/docs/samples/#codelabs) - and then deciding what fits your needs, experience, and comfort level best. – Frank van Puffelen May 03 '23 at 22:53
  • Thanks @FrankvanPuffelen I decided to run with the second option Will definitely check those codelabs – MrR3set May 04 '23 at 19:44

1 Answers1

0

Both solutions are valid. In my case I decided to run with the second approach, passing trough the API to keep true to my Single source of truth

MrR3set
  • 61
  • 4