Implementation of distributed IM system