Hacker News new | ask | show | jobs
by romaniv 3476 days ago
As someone who worked on a whole lot of integration projects in the recent past, I think network APIs can be "solved", but not by the means this article describes.

JSON-LD looks like a reimplementation of something that was already done by XML, XML Schemas and WSDL. If several technologies that were designed to be semantic failed at automating network API integration, why would you think a sub-format for JSON will succeed? What does it do differently?

To really solve the problem of service integration we need to rethink our approach to "services" altogether.

One solution that I see would involve a global registry of semantic symbols (e.g. "temperature", "location", "time") and a constraint solver. So yeah, distributed Prolog on the global scale. Systems would exchange constraints until they reach a mutually agreeable solution or fail. Then the derivation tree would be used to generate a suitable protocol. While I think this is possible, I don't think there is any real interest in stuff like this right now.

2 comments

Are you... crazy? I would be highly interested in hearing more about this!! :)

Please, please... Write a blog post and tell us what you think. I want to hear it.

"distributed Prolog on the global scale. Systems would exchange constraints until they reach a mutually agreeable solution" - wow, I'm impressed, but not sure I fully get this. Any pointers or writeups on this or something similar?
I simply verbalized something that I think is imminently possible. Prolog operates on rules and facts, both of which involve symbols. If you fix the meaning of some symbols globally, you can run queries that will (potentially) derive semantically meaningful information. There is nothing stopping two systems from exchanging rules. If you keep track of which symbol belongs to which machine (or the global repository) you can do distributed derivation by querying the other machine when you run into something global that you don't know or into other machine's symbols you can't resolve/unify yourself.

This is not a bullet proof concept. There can be infinite loops and it can have really bad performance in some cases. But at least it's something that would be able to do simple corrections and lookups automatically. (E.g. you need temperature in Celsius, but the server stores it Fahrenheit. This is not something that should force you to write code, because we know what temperature means and there are globally available conversions.)

...

Here is something related: https://fenix.tecnico.ulisboa.pt/downloadFile/395145629051/e...

Something like Clojure's spec would allow you to fix the meaning of symbols across one or more cooperating processes without requiring them to actually be global. With an appropriate mechanism for coercions you could even have three cooperating processes work on a solution together where process A and B agree on different (but equivalent) definitions than processes B and C. That sounds really awesome.