The present invention relates to product support services. More specifically, embodiments of the invention provide a system, method, and computer-readable medium for data (message) serialization and deserialization with dynamically configured submessages as to schema for the data.
Products, such as computer hardware (e.g., laptop computers, network servers, data storage, power supplies, etc.), can be implemented to send telemetry data/information as messages. The messages can be received by a service that processes the messages to make determination as to health and status of the products.
The service can use message brokers (e.g., Kafka and RabbitMQ) which can create load and storage problems at enterprise scale due to their large message size. Reducing message size through byte serialization can effectively reduce message size by up to 50%.
Such byte serialized message or data processing are compiled/configured as applications and necessitate the need to rebuilding and redeploying the applications to make schema changes, add new schemas and provide for the new/processed message capability. Schema for serialization/deserialization is often written/defined by people who do not write the code for the microservice that uses the schema. If recompilation and redeployment is required each time is updated, added or deleted from an underlying schema repository, the application would not scale well understand high load enterprise applications.
A computer-implementable method, system and computer-readable storage medium for encoded byte message serialization and deserialization by microservices comprising receiving a multi-level message with generic data types for serializing and deserializing the encoded byte message, wherein the multi-level message includes a top level message as to type that provides general information about content and applicability, and sub-messages as to types that include content related to purpose which includes an undefined type that contains properties related to schema for serialization and deserialization of the encoded byte message; processing the top level and sub-messages content to determine the undefined type that contains properties related to schema for serialization and deserialization of the encoded byte message; and dynamically loading the schema properties of the undefined type for serialization and deserialization of the encoded byte message for consumption by the microservices.
The present invention may be better understood, and its numerous objects, features and advantages made apparent to those skilled in the art by referencing the accompanying drawings. The use of the same reference number throughout the several figures designates a like or similar element.
Implementations provide for the on-the-fly schema loading into sub-message types representing product service data that allows strict schema enforcement with capability to add/update schema with affecting performance/requiring redeployment.
A messaging scheme, such as the use of Google Protocol Buffers or Google Protobuf format is implemented with a message (e.g., Kafka) broker. The scheme implements a multi-level message, that can be formatted as Google Protobuf message. The multi-level message includes embedded sub-messages used to facilitate data-flow control or transfer of data (e.g., Kafka messages). The sub-messages used for encoded byte messages (e.g., Kafka message) transfer can have an additional subtype message with dynamically loaded schema. The dynamically loaded schema for serialization and deserialization for sending/receiving encoded byte messages (e.g., Kafka messages) to message (e.g., Kafka) brokers or microservices. The microservices can be written in are written in Python, Java, C#.NET, Golang, Scala, or C++.
Implementations provide for message (e.g., Kafka) brokers/microservices to request information as to schema properties as to serializing/deserializing and can call (e.g., REST call) to a schema proto manager. The schema proto manager reads schema information (e.g., meta data) from a schema database. This allows schema validation to be enabled and enforced in a dynamic manner. Adding new schema can be implemented by creating a schema declaration (e.g., JSON based) and adding such to the schema database. Therefore, schema can be loaded to the schema database and used for serializing/deserializing encoded byte messages (e.g., Kafka messages).
The master or multilevel multi-level message, formatted as Google Protobuf message includes a top level message with system information, embedded subtype messages representing broad classes of message types (e.g., metrics, relationships, alerts, etc.) for generic data streaming. A second level embedded message within an embedded subtype messages defined by the schema proto manager to be compiled/built into protocol buffers. The second level embedded message is provided dynamically, avoiding the need to compile.
System 100 includes network 106. Network 106 can include one or more wired and wireless networks, including the Internet. The telemetry data 104 is sent through the network 106. A product service 108 receives telemetry data 104 in the form of payload files 110. Product service 108 can be implemented as a cloud computing service, as one or more information handling systems (e.g., one or more servers), etc.
The product service 108 processes messages/payload files 110 to make determination as to health and status of the products 102. The product service 108, as further described herein, is configured to process payload files 110. In particular, payload files 110 can be relatively large files (e.g., greater than 1 GB), and are parsed out for further processing by product service 108.
The system 100 can include an administrator system 112. Implementations provide for the administrator system 112 to be included in product service 108. The administrator system 112 is configured to receive data/information 114 from the product service 108. In particular, as further described herein, data/information 114 can include product 104 information as gathered by product service 108, and specific change event information as to the products 104.
Implementations provide for reactive stream processing of large message groups with special coding precautions, such as use of concatMap which preserves the order of items/messages, rather than the more typical flatMap, to ensure messages are produced or sent to a message broker (e.g., Kafka) broker in order as appropriate. Special sync and complete messages are created to indicate the completion of in-order message processing group, where every message in a group utilizes the same key (e.g., Kafka) coded to a systemId and objectType specific to product service 108.
Implementations provide for product service 108 to include data processors and post processors 202 that receive payload files 108. Data processors and post processors 202 can be configured to receive large (e.g., greater than 1 GB) payload files 108 which are based on certain file based protocols. The data processors and post processors 202 read, process, and parse the payload files 108.
In particular, data processors and post processors 202 transform the data/information, or act as a message broker. For example, RabbitMQ message brokering can be implemented, and data processors and post processors 202 send RabbitMQ/advanced message queuing protocol (AMQP) messages 204. In addition, data processors and post processors 200 can process and post schema information 206 as to products 104, such as volumes, volume groups, pools and other information. The schema information 206 may be sent over a http post request. A volume can include a name, capacity, etc. For example, the RabbitMQ/AMQP messages 204 include information as to volumes of products 104.
The schema information 206 is used to interpret the volumes in RabbitMQ/AMQP messages 204. Schema information 206 is sent to a schema manager 208. The schema manager 208 processes schema information 206 as schema metadata 210. The metadata 210 is related to the RabbitMQ/AMQP messages 204. The schema manager 208 can persist the schema metadata 210 to schema database 212. Communication can be through Structured Query Language (SQL) between schema manager 208 and schema database 212.
The RabbitMQ/AMQP messages 204 are received by a generic data streaming converter 214 which can be considered as a microservice. The RabbitMQ/AMQP messages 204 are relatively large (e.g., 128 MB) and are broken up by generic data streaming converter 214 into smaller messages. Sending smaller messages do not require continuous storage and be more memory efficient. Such smaller messages may be implemented as Kafka messages (i.e., encoded byte messages). Kafka being optimized to send smaller messages. The generic data streaming converter 214 acts as a Kafka message broker or microservice to serialize the smaller messages. Other implementations provide for message brokers such as Pravega, Pulsar, etc. The smaller messages are sent out as Kafka messages 216 (i.e., encoded byte messages). The encoded byte messages can also be sent as Pulsar or Pravega messages.
In-order messaging within generic data streaming converter 214 acting as a Kafka message broker can be achieved with unique message keys that ensure each batch of messages is sent in-order on the same message broker (e.g., Kafka) partition. A terminal sync message can be sent with a unique message key to identify end of an in-order streaming message group. When a sync message is received, database insertions can be performed, modifications and deletions enabled according to specifics of the message group and the terminal sync message.
The schema database 212 provides schema metadata in a particular format 218 to the generic data streaming converter 214 and a schema proto manager 220. Communication can be through SQL between schema database 212, generic data streaming converter 214, and schema proto manager 220.
Google Protocol Buffers or Google Protobuf is a cross platform format used to serialize structured data. Google Protobuf is useful in developing programs to communicate with each other over a network or for storing data. Kafka messages (e.g., Kafka messages 216) are serialized per the Google Protobuf format. Other formats can also include Avro Serialization Framework and Thrift Serialization Protocol.
Implementations provide for the schema proto manager 220 to receive schema metadata 218 from schema database 212 in the format as originally presented, and generate declarations 222 that allow serializing/deserializing of Kafka messages (e.g., Kafka messages 216). Implementations provide for declarations 222 to be master or multi-level message, formatted as Google Protobuf messages, as described above.
In particular, the generic data streaming converter 214 consults/receives declarations 222 from schema proto manager 220 to serialize Kafka messages 216.
Implementations provide for a reactive generic data stream processor 224 to receive Kafka messages 216, and receive declarations 222 that allow serializing/deserializing of Kafka messages (e.g., Kafka messages 216). The generic data stream processor 224 can be considered as a microservice to serialize/deserialize smaller messages (e.g., Kafka messages). The generic data stream processor 224 can include a reactive consumer message listener (not shown) which receives the Kafka messages 216, and creates separate reactive publishers (i.e., data streams) for each Kafka message 216 in order and partitioned as to Kafka message broker (generic data streaming converter 214). Furthermore, separate threads may be used to enable parallelism and prevent one in-order data flow from impacting the throughput of other parallel data flows.
Special coding precautions (e.g., use of concatMap rather than flatMap) are implemented to ensure that messages are consumed and processed in-order on each of the parallel data flows. Kafka message brokers can only guarantee in order message processing for data written to a specific Kafka topic with a specific Kafka key. Implementations provide that all messages that are written to a Kafka broker where order is preserved are written to a Kafka key that includes a product service 108 SystemID and a data objectType. The message order in the Kafka broker can also be preserved upon retries/failures with appropriate settings in the microservice (data processors and post processors 202) that sends the messages to the Kafka message broker (generic data streaming converter 214).
The reactive generic data stream processor 224 acts as a microservice that provides parallel data streams or reactive publishers uniquely grouped to each (message broker (e.g., Kafka) partition. In-order processing can be maintained on each parallel data stream or reactive publisher by using downstream (mapping) publishers that preserve strict order in each data stream.
The generic data stream processor 224 can communicate with a Cassandra database 226. The Cassandra database 226 is an open source NoSQL distributed database. Communication between the generic data stream processor 224 and Cassandra database 226 is through Cassandra Query Language (CQL).
The Cassandra database 226 includes all the data/information that has been received from products 104. A generic data application program interface (API) 228 receives product data/information 230 from the Cassandra database 226 sent through CQL. In certain implementations, the generic data API 228 is used by administrator system 112. The generic data API 228 allows queries of the products 104. Cassandra database 226 further provides data/information 232 to the generic data stream processor 224.
A data API/adapter 234 can keep a local cache of data similar to data in Cassandra database 226. The local cache of data is formatted for faster access to allow for use cases such as for graphical user interface (GUI) to perform sorting, paging, etc.
Implementations provide for a change event converter 236. As data/information as to products 104 change (e.g., new disk added to a product), the Cassandra database 226 receives the data/information (i.e., new/updated data/information). The generic data stream processor 224 receives Kafka messages 216 as to the updated data/information. The generic data stream processor 224 compares previously received Kafka messages 216 with the latest Kafka messages 216 as to products 104, and generates a Kafka message 238 as to change/update for a particular product. The change event converter 236 receives the Kafka message 238 and declarations 222 that allow serializing/deserializing of the Kafka message 238. The change event converter 236 is considered as microservice. The change event converter 236 converts Kafka message 238 to a RabbitMQ/AMQP message 240. The RabbitMQ/AMQP message 240 is provided to and consumed by the data API/adapter 234.
At step 702 the process 700 starts. At step 704, a microservice (e.g., generic data streaming message converter 214, generic data streaming processor 224, and change event converter 236) receives a message with generic data types for serialization and deserialization the encoded byte message; wherein the message includes a top level message as to type that provides general information about the message content and applicability, and sub-messages as to types that includes content related to purpose which includes an undefined type that contains properties related to schema for serialization and deserialization of the encoded byte message.
At step 706, the top level message and sub-messages content are processed in order to determine the undefined type that contains properties related to schema for serialization and deserialization of the encoded byte message.
At step 708, the schema properties of the undefined type for serialization and deserialization of the encoded byte message are dynamically loaded for consumption by the microservices. At step 710, the process 700 ends.
For purposes of this disclosure, an information handling system may include any instrumentality or aggregate of instrumentalities operable to compute, classify, process, transmit, receive, retrieve, originate, switch, store, display, manifest, detect, record, reproduce, handle, or utilize any form of information, intelligence, or data for business, scientific, control, or other purposes. For example, an information handling system may be a personal computer, a network storage device, or any other suitable device and may vary in size, shape, performance, functionality, and price. The information handling system may include random access memory (RAM), one or more processing resources such as a central processing unit (CPU) or hardware or software control logic, ROM, and/or other types of nonvolatile memory. Additional components of the information handling system may include one or more disk drives, one or more network ports for communicating with external devices as well as various input and output (I/O) devices, such as a microphone, keyboard, a video display, a mouse, etc. The information handling system may also include one or more buses operable to transmit communications between the various hardware components.
The information handling system 800 includes a processor (e.g., central processor unit or “CPU”) 802, input/output (I/O) devices 804, such as a microphone, a keyboard, a video/display, a mouse, and associated controllers (e.g., K/V/M).
The information handling system 800 includes a hard drive or disk storage 808, and various other subsystems 810. In various embodiments, the information handling system 800 also includes network port 812 operable to connect to the network 108 described herein, where network 108 can include one or more wired and wireless networks, including the Internet. Network 108 is likewise accessible by a service provider server 814.
The information handling system 800 likewise includes system memory 816, which is interconnected to the foregoing via one or more buses 818. System memory 816 can be implemented as hardware, firmware, software, or a combination of such. System memory 816 further includes an operating system (OS) 820. Embodiments provide for the system memory 816 to include applications 822. Applications 822 can be implemented as the components/microservices described herein.
As will be appreciated by one skilled in the art, the present invention may be embodied as a method, system, or computer program product. Accordingly, embodiments of the invention may be implemented entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in an embodiment combining software and hardware. These various embodiments may all generally be referred to herein as a “circuit,” “module,” or “system.” Furthermore, the present invention may take the form of a computer program product on a computer-usable storage medium having computer-usable program code embodied in the medium.
Any suitable computer usable or computer readable medium may be utilized. The computer-usable or computer-readable medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, or a magnetic storage device. In the context of this document, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
Computer program code for carrying out operations of the present invention may be written in an object-oriented programming language such as Java, Smalltalk, C++ or the like. However, the computer program code for carrying out operations of the present invention may also be written in conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Embodiments of the invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
The present invention is well adapted to attain the advantages mentioned as well as others inherent therein. While the present invention has been depicted, described, and is defined by reference to particular embodiments of the invention, such references do not imply a limitation on the invention, and no such limitation is to be inferred. The invention is capable of considerable modification, alteration, and equivalents in form and function, as will occur to those ordinarily skilled in the pertinent arts. The depicted and described embodiments are examples only and are not exhaustive of the scope of the invention.
Skilled practitioners of the art will recognize that many such embodiments are possible, and the foregoing is not intended to limit the spirit, scope or intent of the invention. Consequently, the invention is intended to be limited only by the spirit and scope of the appended claims, giving full cognizance to equivalents in all respects.