-2

I’m looking for a good architecture to be able to efficiently query data currently stored in NoSQL dbs (specifically DocumentDB).

We have a number of microservices that manage various entities (say client, product etc). Each store their data locally (in DocumentDB). We want to create another microservice that provides the ability for real time (latency on the order of seconds) ad-hoc queries over this data.

One option is to replicate all this data and store it in an SQL db, and build the query service on top of it. I expect this would make the queries quite fast, especially if we index all columns. (Of course, since this data keeps changing, we’d listen to a message queue for db updates.)

Is this the best way? How do companies go about building ad-hoc query functionality of NoSQL data? This seems like a problem that many large companies would have to solve. (I am new to NoSQL and microservice architecture.)

Community
  • 1
  • 1
Andrei
  • 1
  • 1
  • 1
    *How do companies go about...?* You clearly would have to ask those companies. Do you really expect a *one size fits all* answer here, in the limited space allowed for an answer, written for you for free? Your question is far too broad in scope for this site. – Ken White Mar 31 '17 at 00:28
  • Since this looks like a problem many companies are facing, I want to know if there's a pattern I'm missing that's widely used. – Andrei Mar 31 '17 at 00:47
  • As I said, your question is far too broad in scope for this site. Please see [What kind of questions should I avoid asking?](http://stackoverflow.com/help/dont-ask) and [What topics can I ask about here?](http://stackoverflow.com/help/on-topic). – Ken White Mar 31 '17 at 00:53

1 Answers1

0

DocumentDB supports SQL querying over unstructured data so that you don't have to create separate database for ingestion and query: https://learn.microsoft.com/en-us/azure/documentdb/documentdb-sql-query#Aggregates

If you explain what kinds of queries your microservices need, or what limitations you've run into, we can provide targeted answers.

Aravind Krishna R.
  • 7,885
  • 27
  • 37