Firebase 3.0: Free Class
Chris Esplin
242

I’m a SQL dev making the paradigm shift, and I’m finding your stuff extremely helpful. I was wondering if you could help me think through a couple of architecture issues on a small project I’m doing? I’m using it as a way to begin learning firebase.

The project is a rewrite of a very small REST api. I want to move the data into firebase and use node to serve it via a handful of REST endpoints. I’ve made good progress on the swagger/openApi side of things, and have nice documentation being generated via swaggerUI. Now I’m looking to implement two features (paginated results and querying) and would like some guidance.

The data is essentially one collection, called ‘providers’. There will probably be no more than 100k of them. I would like the api to support the typical query params for pagination. An api like:

/providers?page=10&per_page=50

I saw the firebase pagination library that you wrote. Where I’m struggling is that I’m not sure how to make that work with a result set that’s queried. If I was just paginating the entire collection, then I could create a paginator object on the server and just reuse it, but I need to paginate arbitrary result sets. Is this even possible?

Basically, how do I support this:

/providers?name=foo&address=main&page=50&per_page=100

Thanks for any guidance!

Jay