3 ms·
Camps 1 and 2 are not mutually exclusive (well, except your inflammatory "naively" comment). Rest/JSON is a well understood, broadly adopted, low friction RPC
by novaleaf 10y ago
Camps 1 and 2 are not mutually exclusive (well, except your inflammatory "naively" comment).
Rest/JSON is a well understood, broadly adopted, low friction RPC format.
NoSQL is not always MongoDB (for example, Google Datastore is ACID compliant), and schema enforcement via an ORM layer I would argue is actually a good thing, as it provides schema validation at compile time.
- mrinterweb 10y agoRest/JSON is not a RPC. Technologies like Thrift can be used for RPC. It depends on how you define low friction for rest + JSON. JSON is schemaless, and that can be great for prototyping, but as soon as deployed services get out of sync, in terms of how they communicate, it becomes more of a burden than an advantage. Thrift, protobuf, avro, can enforce schemas and can raise exceptions for communication mismatches so less defensive programming is needed checking json responses. For internal service communication, I really think using a schema enforcing communication protocol is a good thing.
- _puk 10y agoJSON is not inherently schemaless, it's just generally not used with one. Initiatives like JSONSchema go some way to restoring some constraints to the format and prevents unchecked deviation over time.
- prodigal_erik 10y agoThe longer a database has existed, the more likely somebody in the company wrote something crucial that accesses it without your knowledge and without going through your ORM (usually because your ORM isn't implemented for the language they're using, or it emits bad queries for their use case). Sanity checks that aren't enforced by the database can't be relied on to be up to date or even happen at all.