Those of you familiar with the amazing problem that flickr had recently when they touched the ceiling of their numbering schemes for images.
in the erlang world , apart from having to hack our auto auto-incrementor for mnesiaDB. you also get to do interesting stuff like tuples that are'nt serialised as unique id's.
->{ node() , erlang:now() }
-> myReadLastIdAndIncrementByOne(table_name)
-> erlang:phash2 ( <List> )
-> erlang:term_to_binary(<List| Tupel|Integer>).
1) how do you generate unique id's for your app ?
2) Assuming you're thinking to grow real big (dont all YC'ers :) ), how do you plan to handle such ceilings ?
As for ids in mnesia, you aren't (realistically) at risk of overflowing an integer storage size since you get automatic promotion to bignums. {node(), now()} works fine if you are working in a distributed context and don't need sequential IDs. Also erlang:md5/1, or crypto:sha/1 can give you unique IDs to use over distributed nodes. I wouldn't recommend erlang:phash2 because it only yields 27 bit to 32 bit hashes.
I'm not sure what good term_to_binary would be if you are keeping everything in mnesia.
I would recommend looking into mnesia:dirty_update_counter/3 first and then expand to either {node(), now()} or erlang:md5/1 or crypto:sha/1 if you find updating the counter at distributed nodes is a problem.