Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Should the appropriate processing and post-filtering for a complex find be done client or server side?
    1. We should probably do this on the server so that these queries are performant. I'm really concerned about all the network overhead of the client sending multiple separate queries over the wire.
    2. If this is done on the client, then complex queries are somewhat analogous to a compound operation
      1. This means that our results can become invalid if a spurious write changes the data in between network calls
        1. Example: Assume my criteria is find all records where "name = 'John' AND age = 23". If the client has to do separate calls and post filter the results then its possible a record that matches the first query can be changed to no longer match the first query after the result is returned and the client moves onto the second query.
    3. If this is done on the server, the complex query is analogous to a repeatable atomic operation
  2. Should we deprecate the #find methods that take simple parameters?
    1. No: Builders are inherently not user friendly so we should not force the user to use one of a simple query
    2. Yes: Overloaded methods that take different kinds of parameters is bad API design
  3. Why a programatic builder as opposed to a grammar parser?
    1. Don't trust raw string input from users. We can regulate things a lot more if this is done programmatically with a builder.
  4. This project may form the basis of a larger database language (e.g. Concourse Action Language (CAL))
    1. This means that we need to write this feature in a way that can easily be leveraged and extended in the future
  5. Will this builder be usable in CaSH?

Building Process

  1. User creates Criteria from builder.
  2. The client goes through each symbol in the Criteria and converts them to the appropriate TSymbol, building a TCriteria along the way
    1. All sub criteria is expanded and prepended/appended with the appropriate parenthesis symbols
  3. The server receives the TCriteria, goes through the list of TSymbols and converts them back to Symbols
  4. The server does the shunting yard alg on the list of Symbols.

...