If you just need unique IDs, skip all of this and use a UUID or GUID module instead. If you really do need a server, try one of the simple RPC servers already on CPAN. If they're not enough for you, try POE. There is no need to invent a protocol. If you choose a server that doesn't already require a specific protocol, try HTTP.