Unique id generation service in scala