4 ms·
Just wondering out loud: maybe it's possible that tooling for this just hasn't been written yet? Something along the lines of declaratively stating what a JSON
by ayrx 12y ago
Just wondering out loud: maybe it's possible that tooling for this just hasn't been written yet?
Something along the lines of declaratively stating what a JSON endpoint should be like and having a tool automatically assert that the services conform to that interface doesn't look impossible.
- logicchains 12y agoF# could do this with type providers. Or, something like Google Protocol Buffers could be used.
- cs02rm0 12y agoOr Java with JAX-RS. Or one of probably hundreds of alternatives.
- jacques_chester 12y agoIt's been tried many many times, but as a network service you simply have no way to enforce what messages you are going to receive until you receive them. So you have to type check at runtime. You can build tooling to make it easier to produce conforming software at each end, but you can't guarantee that someone won't just go ahead and write any old thing. So in practice you still perform validation on each message. Put another way: distributed systems turn all type errors into runtime errors. The guarantees of compile-time checking are severely weakened.
- aikah 12y agoApache Thrift? the issue is introducing yet another layer of indirection in an application. I'm personally not fan of micro-service architectures that don't use a coherent set of language(s). But the tooling is already here,no question. The issue is,should it be "baked" into a language?