Decorator Design Pattern

The decorator pattern is a structural pattern, that allows you to attach additional responsibilities to an object at runtime. The decorator pattern is different than the Python language feature of…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Middleware Foundations

The software developed as distributed modules need to cooperate at different levels, especially data exchange. For the communication of these applications running in a distributed environment, the middleare software libraries can be used instead of using low level communication libraies. Middleware is seen as a layer between distributed applications and the operating system and communication protocol. It saves high-level applications from complexity by managing all the differences in a heterogeneous system developed with different languages ​​such as C ++, Java, GO, running on different operating systems such as Windows, Linux, Vx-Works and /or having different hardware architectures such as Intel, ARM, Power PC. At the same time, it is designed to solve many other technical problems such as which computer these applications are running on at any given time, whether they are alive at that moment, whether they are ready to receive data.

When we talk about middleware, most of us think of distribution middleware that enables data communication. In some projects, there is an adaptation middleware that comes as a layer over the operating system / hardware. These adaptation layers can provide common usable structures such as active object, thread pool, as well as providing a common interface for different operating systems. In addition, framework software specific to the work domain is also classified as a middleware layer. For example, in a distributed environment, the log collection infrastructure is considered as a part of middleware layer.
Since we will examine the communication layers in this article, it is expected that the communication middleware will be understood when we say middleware.

Place of the Middle Layer in a Reference Architecture (US NAVY Open Architecture Standard)

Naming Service/ Service Discovery: It keeps the relationship between the name of each resource and its physical computer address. These services provide capabilities to shut down and manage services running on a different computer. These features can be offered as a separate service as well as within the main service of the middleware. “Zoo Keeper”, “Corba Naming Service” are applications that we can give as separate services.

Protocol and communication management: Middleware solve communication infrastructure problems such as establishing a link, providing bidirectional transmission of data on the link, retransmitting lost messages, managing disconnection, managing data congestion, and providing load distribution.
Access Control, Identity Control: Encrypting the data and ensuring that only authorized applications can access the relevant data are also problems that can be solved at the middleware level.
Synchronization, Transaction, Storage, Parallelism: The middleware services enable the user to deal with the application logic only by solving the problems such as synchronizing the data at more than one point, permanently storing it on the disk, accessing the communication service in parallel.

Middleware software is widely used in software projects today. These middleware can be standard-based such as DDS, MQTT, AMQP, Corba as well as proprietary designs of the companies such as IBM WebSphere MQ, Microsoft MSMQ TIBCO, gRPC.
Most middleware standards support more than one language while there are some middleware which are specific to a specific language as in Java JMS.
Some middleware provide point-to-point client / server kind communication. On the other hand, message-based middlewares provide asynchronous messaging and communication with more than one node.

Different standards have been developed to define interfaces between components developed with the same or different languages. One of the most widely used standards in this regard is the OMG Interface Interface Definition Language (IDL). After the interface definitions are defined in the IDL, the interfaces are translated into different programming language specific codes​​by the compiler / code generator tools.
In addition to IDL, we come across Open API, Swagger and GrapQL schema to define interfaces.

IDL Example for GRPC

Different processors can handle data differently. For example, the int value can be different on a 32-bit processor or a different 64-bit processor. Computer hardware may be little endian (intel) or big endian (power PC). In addition, programming languages ​​can keep data such as strings differently. For this reason, it is not recommended to copy data from memory and transmit it at the middleware level. Even if your software works in the first place, it will cause problems in adapting different environments later. Formats such as JSON, XML, HTML, CDR, Thrift, ProtoBuf, Avro are widely used for data content coding to resolve these differences. JSON, XML and HTML are widely used as text-based formats. However, formats such as CDR, Thrift, ProtoBuf and Avro can be used to use data transmission more resource effectively.

Binary data encoding is more advantageous in terms of both the resource consumed in the communication environment and the processing speed. Below you can see the result of one of the dozens of comparisons made on this subject.

Add a comment

Related posts:

I Had a Hit Record 30 Years Ago?

For 15 years of my adult life, I derived all my income as a musician backing bands and artists (both obscure and famous) on guitar or bass, writing songs, playing recording sessions, arranging for…

Postcardiehard

Postcards of lost times were scattered in front of touristic eyes, French mountains, long-lasting hours of feet stepping into the muddy season of life. When work feels overwhelming, remember you are…

Empat Momen dalam Hidup Dimana Kamu Harus Mengirim Bouquet

Inilah momen istimewa yang patut kalian rayakan dengan memberikan hadiah kecil berupa bouquet. Yuk simak di bawah ini! Bagi sebagian orang di dunia, hari ulang tahun dianggap sebagai hari istimewa…