Building Query Builder Design and Architecture Suggestion? http://i.stack.imgur.com/ABAKN.png We need to build efficient scalable Query Builder as in above picture. Example link for reference: http://help.campaignmonitor.com/topic.aspx?t=90 Requirements 1) Attributes are dynamic per client. e.g. for Client 1 "region", "position" are attributes. For Client 2 "first name", "last name", "language" are attributes. 2) Client will do segmentation on dynamic fields through above query builder. 3) Since attributes are dynamic we are going with NoSql database Amazon DynamoDB. We need to perform real time requests( < 100ms SLA) on DynamoDB database, run the dynamic built query, show results on dashboard and do pagination. 4) Below operations can be run on text fields: "matches exactly", "does not match exactly", "is provided", "is not provided", contains, "does not contain", "starts with", "does not start with", "ends with", "does not end with" Questions 1) Best approach i.e. architecture to manage data so that dynamic built queries can be run efficiently on million of list data? 2) Technology / Database suggestions? 3) Production use cases will be helpful. |