Changed api to expect the IDs of nodes when an algorithm connects.