ATT的速度很快啊~# Apple - 家有苹果
b*n
1 楼
Design an algorithm to give unique id for each request, the id should be a
64 bit number. The algorithm should be scalable.
How to make each id unique?
我感觉应该用hash.
If the total memory can not hold all the numbers, we have to save it to Disk
, to get better performance, we don't save it each time an ID is created,but
saved as a block. How to make the id unique even if the machine crash some
ids doesn't write to the memory.
特别是这个问题,没有太好的思路.
还有就是网上看见相似的题目.
Given constant incoming requests, each ass
64 bit number. The algorithm should be scalable.
How to make each id unique?
我感觉应该用hash.
If the total memory can not hold all the numbers, we have to save it to Disk
, to get better performance, we don't save it each time an ID is created,but
saved as a block. How to make the id unique even if the machine crash some
ids doesn't write to the memory.
特别是这个问题,没有太好的思路.
还有就是网上看见相似的题目.
Given constant incoming requests, each ass