Firebase and indexing/search -


i considering using firebase application should people use full-text search on collection of few thousand objects. idea of delivering client-only application (not having worry hosting data), not sure how handle search. data static, indexing not big deal.

i assume need additional service runs queries , returns firebase object handles. can spin such service @ fixed location, have worry availability ad scalability. although don't expect traffic app, can peak @ couple of thousand concurrent users.

architectural thoughts?

long-term, firebase have more advanced querying, it'll support sort of thing directly without having special. until then, have few options:

  1. write server code handle searching. easiest way run server code responsible indexing/searching, mentioned. firebase has node.js client, easy way interface service firebase. of data transfer still happen through firebase, write node.js service watches client "search requests" @ designated location in firebase , "responds" writing result set firebase, client consume.
  2. store index in firebase clients automatically updating it. if want clever, try implementing server-less scheme clients automatically index data write it... index full-text search stored in firebase, , when client writes new item collection, responsible updating index appropriately. , search, client directly consume index build result set. makes lot of sense simple cases want index 1 field of complex object stored in firebase, full-text-search, pretty gnarly. :-)
  3. store index in firebase server code updating it. try hybrid approach index stored in firebase , used directly clients searches, rather have clients update index, you'd have server code updates index whenever new items added collection. way, clients still search data when server down. might stale results until server catches on indexing.

until firebase has more advanced querying, #1 best bet if you're willing run little server code. :-)


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -