SQLServerCentral Editorial

Microservices in SQL Server

,

It occurs to me that SQL Server is now the ideal way of implementing effective microservices. Yes, really.

Over the years, I've rather changed my attitude to structured data and databases. I remain opposed to the idea of holding XML or JSON inside the base tables of databases, unless they are treated strictly as atomic. I particularly dislike seeing untyped XML in databases: it is stored inefficiently and is slow in use. However, we now have in SQL Server 2017 an excellent way of consuming or providing JSON data in a way that is application-friendly, without letting it poison our base tables. I can now smile sweetly at developers when they ask me to 'talk and understand' JSON in the interface between application and database. Not only is it OK with me, but it removes entirely any last lingering requests from developers to access database objects other than what is provided for them in their schema/interface. It is now perfectly possible for all their functions and procedures to consume and return JSON.

Whatever one's philosophical stance to JSON, it has traction. As it is, effectively, JavaScript, it is ridiculously easy for the Web Developer to use. There is enough in JSON to allow us to do business with it. It is the data transport for microservices, and can be read 'natively' by PowerShell and any .NET compiled language. It underpins JSON-RPC and Asynchronous JavaScript and JSON (AJAJ). It is increasingly used for RESTful web services. It is the data transfer medium for most NoSQL Databases.

The introduction of SQL Server 2017 gives us an opportunity for the first time to come out of our bunkers and cooperate with developers in data terms that make sense to them, without having to trouble them with the philosophical depths of relational theory. There need be no mismatch between the object-oriented world and the relational because we, as data people, can now do all the worrying about the translation in both directions, and obsess about both the data security and integrity.

I'm hoping that next year we, as SQL Server data people, can come up with radical ways of making it quicker and easier to develop secure and scalable data applications on Windows and Linux, and change the old scary image of the database person as the grumpy curmudgeon of the IT department. With good JSON support in SQL Server now, it makes it all a lot easier to smile and nod at developers.

Phil Factor.

Rate

4 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

4 (1)

You rated this post out of 5. Change rating