I thought this episode was particularly interesting when Marley talked about how an enterprise integration might occur between businesses using a shared ledger.
When doing something a stateless integration probably with REST, you can often end up coupling systems together through some variation of schema(probably JSON). You have types, often nested associations, and field names that each system needs to support. If you need real-time coordination between these information systems such as when a contracting company is fulfilling some services for a shared customer, having a stateless API doesn’t fit the bill very well. Both systems probably have very different implementations in place, and the complexity of polling, authentication, authorization, and handling record changes can get pretty complex when you’re dealing with database conflicts and reactive logic to said changes.
A good description of some of the challenges involved with using this sort of API in Elixir/Ecto might be Dennis Beatty’s recent talk at Lonestar. The gist of it is Podium is polling a Google REST API for Reviews, and processing changes for updates, handling conflicts etc. You end up running into some troublesome limitations with Postgres sequencing and what-not dealing with these upserts and conflicts.
The obvious alternative solution might be a messaging, pub-sub type integration where the two systems are coupled by a set of ubiquitous events that can then be handled by either system as needed. This could be done with a central server (Elixir/Erlang is a great fit) that runs some handshaking for authentication, sets up channels, and delivers encrypted events to the subscribers.
The problem with doing it this way is dependency on this central service. Which company is running this middle-man event-messaging service? What if there’s a conflict? What if one party distrusts the message being sent from this service? This is where having a distributed ledger becomes interesting. Both companies can host a node of this middle-ware service and maintain a copy of the ledger of the events. Now there’s no centralized dependency on a service hosted by either party, the same (potentially event-sourced) capabilities are supported.
Instead of the Google Reviews API requiring polling of stateless resources, you throw up a Node, download the ledger, and consume events into whatever architecture you prefer. You get an audit-able, event-sourced, Kafka-esque functionality between multiple parties that doesn’t have the same technical problems as stateless API integrations.
Anyone know similar systems being built like this? I find these patterns really interesting.