You are right, ID creation is handled by the platform, but on the client tier. So you should always use Metadata.create() methods to create entity instances. Obtain a reference to Metadata either by injection or through AppBeans.get(), and use it:
Long and Integer identifiers are obtained from the database in batches and cached on the middleware and client tiers, so you should not worry about extra roundtrips.
However, I would recommend using UUID identifiers in general, and other types of identifiers only for some particular entities which can affect database size or performance.