generate id for container and connection