I am building a distributed application on top of Java and Cassandra. To generate unique consecutive 32-bit and 64-bit identifiers, an approach is used, for example, using Flickr servers to generate primary identifiers, is it good? I am especially thrilled with this, as it can help me reduce the size of identifiers to 32 bits or 64 bits as needed, which could otherwise go up to 128 bits with a UUID. I do not want these identifiers to be completely consistent, but at least increase!
Using a single database server can, however, introduce a single point of failure that has been fixed by Cassandra. However, this may be good for the initial stage of our application. Later we can introduce two servers to alleviate these problems.
Does that sound like a good strategy? In short, we mix MYSQL and Cassandra in one application. I know that if for some reason mySQL is not going anywhere, we cannot go forward only with Cassandra.
We looked at other solutions, such as a snowflake, but they did not meet our requirements.
EDIT: I seek advice on whether using MySQL to generate unique primary identifiers for entering data / entities stored in a Cassandra database is a good approach. What are the disadvantages, if any, of an approach such as Flickr Ticket servers?
source
share