Every time I talk to the customer about the SOA reference architecture, I can't help but talk about the "data service layer ". However, at this moment, the customer's ideas will be introduced to other aspects by the word "data" without knowing it, followed by a series of questions about traditional data, "How to synchronize data..." "How to change data ..." , "How do you solve the big data problem ..." At this time, the customer often put their eyes open, as if the patients who have been ill in bed find the medicine to understand. This phenomenon illustrates at least two problems: the importance of data to the IT system, and the misunderstanding of data services in SOA and traditional data problems. In fact, we can't blame everyone for this misunderstanding. In my opinion, data service is not very rigorous. According to my personal understanding, in the SOA architecture, the data service layer should be called "information service layer ". Why? Let's first look at "data" and "information" respectively ".
What is data? Data is a basic, minimal, or underlying set of "information" fragments with some structures, relationships, and States. What is information? Information is a collection of data and the basic logic that provides additional forms, basic relationships, syntaxes, and semantic contexts. That is to say, data is the smallest component of information. Although the data itself has some structures or relationships, it lacks the syntax, semantic context, and other characteristics of information. For example, home address, zip code, and name can all be considered as data. Although home address contains information such as country, city, district, and street, it has no meaning in itself. If the data is aggregated to form the user information entity, the data set has more business significance, for example: the user information entity can form one-to-one, one-to-many, or many-to-many relationships with other information entities. There is a verification relationship between the zip code and the home address; for example, the name generally does not exceed 5 characters. In other words, information indicates the entity (subject, object) that encapsulates state (data) and behavior (logic ). It can be considered that the information is similar to an instance of the model class in object-oriented programming. This instance contains the data member (instance variable) used to maintain the state and the method used to provide (model) behavior.
So why is information more suitable for SOA than data? I think this is due to the conflict of two kinds of thinking. We know that no matter what IT system, it will eventually serve the business personnel. The business personnel focus more on the business entities they deal with every day. For example, the customer service personnel want to see all the information about the customer in the portal: such as customer registration information, customer complaint information, and customer order information. The definition or requirements of business entities by business personnel are constantly changing. For example, business leaders want to see a summary of production conditions today, in addition to the production situation, we also want to see personnel changes tomorrow. When business personnel change their ideas, they often only start from business needs and do not care about data sources. The IT department of an enterprise is another scene. When they meet the needs of business personnel, they need to translate the business entities into specific descriptions that can operate on physical data. A business entity often comes from multiple systems (such as personnel systems, production systems, and financial systems), with different data access interfaces (such as databases, WebServices, and Java APIs). Finally, data formats are also different. That is to say, the business personnel take the business as the center to consider the problem, while the technical personnel take the physical data as the center to consider the problem. Every small change in business means a large workload of technicians. From another perspective, information is more like the business entity faced by business personnel, while data is the physical data faced by technical personnel. Therefore, information is more easily related to fine-grained business methods in SOA.
What does "service" mean? My personal understanding is to turn "information" into services and standards. Whether it is information or business entities, it is still necessary to use technical means to serve the business system. Therefore, to make this level accessible to all systems in the enterprise, we must provide services in a standard way. Of course, the first thing we think of is Web Services, that is to say, the information content is provided to external users through Web Services. Of course, the industry also provides efficient data service access API-SDO to achieve access to business entities.