Smart Contracts : a new development paradigm
I am unfortunately old enough to have lived a number of paradigm shifts. In particular the shift from procedural to object-oriented programming and from monolithic to distributed to name a few.
I remember in particular once looking at the architecture of a Corba project (Distributed objects) and realize to my great surprise that this object oriented technology had been used in a very conservative way. It was not at all taking advantage of the object paradigm, but just using this distribution framework as a regular Remote Procedure Call framework. It was not addressing directly the different object instances but rather rebuilding a layer in charge of dispatching calls to the requested objects.
Looking now at Ethereum I feel the same could happen. People may not realize that the Smart contract are changing deeply the way we will architect software: instead of being data driven code will become process driven with a much finer granularity. Alike object oriented programming which broke monoliths in small pieces, smart contracts will do the same for processing data.
Let’s take a concrete example: a bank will represent a portfolio in a database with a table having multiple columns for the various attributes. Processing a specific event on the portfolio like performing the life cycle of the instruments is currently implemented as a SQL Statement selecting the relevant data, followed by some processing transforming the data as needed. This first process will be then followed by others similar in nature. This computation is data driven : we select the data on which we want to apply the process.
Before Object Oriented programming, we were doing something similar at the model level: in the procedural approach all the different cases were merged into the same program which was handling all possible cases through batteries of switches. Object Oriented programming brought a much more granular approach: all specific cases were handled by specific objects making the code much more readable and easy to maintain. If this granularity was much better from a model point of view, the processes, often run in batches, even if running programs written in an object oriented way were still monolithic from a process point of view.
This is the process dimension that the smart contracts are addressing: those independent pieces of code are handling the life cycle of objects in a same granular way as the objects did for the data model years ago. Instead of grouping the processing of all transactions belonging to a portfolio, the smart contracts representing each portfolio line ie each transaction, will be running independently breaking down in pieces the monolithic approach we still have in writing batches.
This will have a major impact on how we implement processes: we will not scan data to find the relevant data which needs to be processed for a particular event, instead we will have autonomous small pieces of code implementing the process logic at the smallest possible granularity making these processes easier to understand and manage as object oriented simplified for ever the way we model software.