By the time a client app is released I would like to have a fairly stable implementation of the lexicon in place. The goals for the first version should allow users to:
- Create messages based on a strictly enforced message type that includes accurate location data
- Delete location records.
- "Upvote" or "Like" messages (and undo).
- Fetch records based on their current location, within a defined radius.
I also want to define queries and procedures that make client interactions easy.
The most difficult part of all of this has been defining the message lexicon. It's intended to only allow messages that use a pre-defined set of phrases, however I do need to allow for localization for different languages. The union data type seems to work for combining different languages and categories of constant string enums, but leaving it "open" seems to allow for message records of almost any type. "Closed" unions are restrictive enough, but they are documented in a way that makes it seem like a closed union should never be changed?