During one of the discussions about the design for our upcoming system, several stakeholders (in the form of our system’s consumers) would sometimes visit and listen to our upcoming plan. One of these fellows was in charge of a system which specialized in extracting/importing massive data streams, so that this data could be quickly loaded into a set of cache servers (which I believe used an assortment of software like memcached); these cache servers were fast read-only repositories used by several departments. As he listened to some of my talking points, he became interested in the metadata being discussed, and we talked briefly about how he might utilize the same metadata when he exported our product data from our database. He wanted to utilize the modules in the planned engine which would dynamically build SQL statements based upon the metadata, but since his solution was exclusively in C# and our implementation was going to utilize something more low-level (like C++ ‘98), code reusability seemed to be a pipe dream. So, initially, we started to talk about how he would need to write his own version of our project’s SQL layer, which was responsible for the generation of various complex statements:
During those discussions, an epiphany suddenly struck me, and I chastised myself for not thinking of something earlier. Our new planned server, which would be a generic engine fed by metadata, was designed to handle REST-style requests that were populated with metadata; the requests would then dynamically build a SQL statement for the pull of the data which had been indicated by the request’s metadata. (At the time, REST-style requests were nascent, and it took a few discussions before everyone became comfortable with the idea of sessionless requests.) So, why not then simply create a type of request which could just return the SQL statement itself? I mentioned it to him, and his face failed to conceal his interest at such a possibility:
Consequently, when the server was finally completed, the supervisor of cache loading was easily able to obtain his complex SQL statements from our server, and his code never needed to know the exact implementation of our database’s schema. Through the common language that was our metadata, we had used our abstract solution again in order to satisfy another process in the data pipeline. In this way, the strength of our metadata proved that in addition to running our platform, it could become a way to integrate our platform and others. For almost a decade now, it has served this particular stakeholder without any issues, and for the same amount of time, it has served various other stakeholders in similar ways. Such is the might and glory of metadata! (Okay, I’ll admit that I got a little carried away there at the end. Occasionally, I need to toot my own horn.)




