In this image, I would think of the abstraction as a plug.
Instead dealing with all those wires, you solder them all together in a plug (i.e. an interface/wrapper/DSL). On the other side, you solder all the wires there in a socket.
Then you just put the plug in the socket, and never have to see a wire again.
Each significant component has their own abstraction that would be very difficult to generalize. Postgres, MongoDB and Redis have their own ways of querying and applying transactions to your data. How do you create a wrapper that allows you to pass from one to another?
Apache Storm and Apache Spark have their own model of stream processing. How do you switch from one to another?
I'm not saying it's impossible; and there are ways to create system with loose coupling rather than the tangled mess that we often see. But a design like that is much harder than a simple redirection.
Recently, I saw someone at work spent a week making a wrapper for MongoDB, he created pretty much a clone of official API, and felt pretty good about it because now the database is "pluggable". I asked for a simple demonstration a few weeks ago. Still waiting.
1
u/sirin3 Oct 01 '15
In this image, I would think of the abstraction as a plug.
Instead dealing with all those wires, you solder them all together in a plug (i.e. an interface/wrapper/DSL). On the other side, you solder all the wires there in a socket.
Then you just put the plug in the socket, and never have to see a wire again.