简体   繁体   中英

What is middleware in distributed systems?

I am taking a class on distributed systems right now and I can't grasp the idea of middleware. I understand that it is a software layer that provides a level of abstraction between the application and the actual communication over the network, but I need concrete examples. I know CORBA and Java RMI are examples of middleware, but those dont really make sense to me.

When I write a client-server program in Java that communicates over DatagramSockets() is that middleware? If so why not? The Java DatagramSocket() method provides a level of abstraction from my application to the actual communication over the network.

I agree with commenters so far - it's not really a clear-cut term.

However, the thing that's most applicable to your question I can think of is messaging queues such as 0MQ or RabbitMQ . They provide different ways of interacting with the network which are somewhat more abstract than using TCP or UDP directly. Both of them encourage use of "network patterns" which can be applied to most distributed systems problems.

  • 0MQ provides flexibility about the ordering in which the client and server begin, uses multiple protocols (between threads / between processes / over TCP / over UDP / ...) to send messages, and deals with network disconnects.

  • RabbitMQ (which I know less about) provides centralized message queues which are persisted to disk and allow the clients on your network to only know where the relevant queues are (and not where all the producers/consumers for that queue are).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM