server: use random generated node id

It is very confusing to pass in a name, which is not the name of the direct target, to a construction function.