ROS (1): [..] We have a distributed discovery mechanism [..]
not really. This is already one of the big differences between ROS 1 and 2: ROS 1 has a master, which is central by nature. It's also debatable whether querying the master is really 'discovery', as it's somewhat like a DNS server that returns information in answer to queries submitted to it by clients (it's XML-RPC after all).
ROS 2 does not have this, at all. All nodes are essentially peer-to-peer (barring any partitions and other such 'tricks'). That is a fundamental difference between the two.
Edit:
1 . according to most of the internet sources ROS is as well peer to peer.
You have to realise that p2p data exchange != p2p discovery. The former is possible without the latter. In ROS 1, nodes will ask the master where to find another node that publishes to a particular topic, then use that information to setup a direct connection to that node. The master is then not involved in the data exchange any more. See wiki/Master for more info about this.
But the master is always needed to figure out where other nodes are in ROS 1.
2 . what is the difference bw Distributed Discovery vs Centralised Discovery ?
Briefly: all peers discover each other VS central server keeps list of on-line nodes.
In the former case, every node has the inherent ability to find other nodes, without the help of a central authority. In the latter case, nodes must contact a central authority (ie: the master) to ask it for a list of nodes it knows about.
ROS 1 has a master, ROS 2 does not.
3 . Is ROS a middleware ?
A part of ROS 1 is certainly the middleware, but most people consider ROS to be much more. As described on ros.org/about-ros:
ROS is a flexible framework for writing robot software. It is a collection of tools, libraries, and conventions that aim to simplify the task of creating complex and robust robot behavior across a wide variety of robotic platforms.
The middleware is what makes it possible for those tools and packages to communicate easily. But ROS is definitely more than just the communication infrastructure.
if yes, what is the need to have DDS in ROS2 ?
Similar to ROS 1, part of ROS 2 needs a way for 'the rest' to be able to communicate efficiently. DDS fulfils that role in ROS 2 (ROS 1 uses a custom infrastructure, of which TCPROS is a part). I believe the ROS on DDS article provides some insight into why DDS was considered and why it was eventually chosen.
ROS2 : ROS2 is built up on ROS but uses DDS as a middleware (that means a middleware(ROS) using another middleware (DDS)) for centralized discovery.
ROS 2 is not "built up on ROS (1)". Many of the things we now call "ROS 2" were designed and implemented (almost) from scratch. Some parts were ported (ie: ROS 1 infrastructure removed, ROS 2 ... (more)