1

I've been asked to look into adding multicast support to a Java trading system but, to be honest, I don't have the slightest clue what this could be for. Would this mainly be to allow the trading system to broadcast trade messages to different types of clients, say, a mobile phone as well as a server? Why might a trading system need multicast support?

2
  • What do the people asking you to look into it say? Presumably they have some rationale or business case? Jun 17, 2010 at 9:58
  • Presumably. But no one's telling me. Jun 17, 2010 at 10:01

3 Answers 3

1

Multicast is a protocol to send (UDP-)datagrams to a defined set of recepients. A router maintains this list, so you need at least a router with this capability. And changing the set set of multicast addresses requires configuring the router. (-> clients can't register themselves to receive multicast messages..)

As mulitcast is for sending datagrams only we don't have a 'reliable' communication. No guarantee that a package reaches it's destination, no guarantee that datagrams arrive in the correct order.

Multicast is a solution if you need to notify a fixed set of systems with short messages, the server doesn't have to know the receivers (the list is on the router only) and the server doesn't care if the messages are received.

3
  • It has been awhile since I dealt with multi-cast but this is not entirely correct. The routers have to be multi-cast enabled to allow multicast traffic to pass through to other routers on valid multicast addresses. Senders and receivers still open sockets on the same ports to send and receive, just like in unicast operations. The major difference being that the sending is no longer duplicated to reach different subscribers.
    – Robin
    Jun 17, 2010 at 11:24
  • @Robin - You send your datagrams to one multicast address, as far as I remember, and only the router (owner of that multicast IP address) knows the members of the multicast group. Quite similiar to broadcast, where the sender doesn't know the receivers too. Jun 18, 2010 at 5:36
  • You are right that there is no knowledge of receivers, but your answer implies that your have to configure your router to add new receivers, this is not true. Applications simply open sockets on a designated multicast address to receive. The router simply has to be enabled to allow multicast traffic through, which most weren't 11 years ago when I was actually using it, can't comment on whether that is the case today or not. Your statement about a fixed set of systems with short messages is also misleading, since the main usage of multicast that I know of is for streaming media.
    – Robin
    Jun 18, 2010 at 17:21
1

Multicast would be used for distribution of live pricing details. The choice of unicast or multicast is determined by the size of the client base, the network capability, and requirements of the application.

If you have 1,000 client applications it is faster to send one packet than 1,000 packets.

However TCP is faster for smaller distribution numbers and so dedicated hardware devices are popular to implement mulitcast overlay built upon TCP connections. Check http://www.a-teamgroup.com/site/low-latency-com/ for news about the popular vendors in use today.

0

The best thing to do would be to ask the person who assigned you the task.

I am not a network expert but my understanding is that multicast can be helpful in making the system scalable. IP multicast allows your application to delegate the responsibility of notifying the subscribers to the network layer.

Multicast: A multicast address is associated with a group of interested receivers. According to RFC 3171, addresses 224.0.0.0 to 239.255.255.255, the former Class D addresses, are designated as multicast addresses in IPv4. The sender sends a single datagram (from the sender's unicast address) to the multicast address, and the intermediary routers take care of making copies and sending them to all receivers that have registered their interest in data from that sender

http://en.wikipedia.org/wiki/IP_multicast#Addressing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.