event log - User point system in Cassandra -
i want design system user point. main 2 points of system point , log.
i want use cassandra store data. 2 reason:
- cassandra provides counter feature can use store point.
- the log of point changing may have think scale of storage. cassandra can scaled.
the basic data sturcture:
// row name: user_id, values: { point: { name: point, values: 1000 }, log: { name: log, values: { log_timestamp: { name: timestamp, values: xxxx }, log_timestamp: { name: timestamp, values: xxxx }, log_timestamp: { name: timestamp, values: xxxx }, …… } } } my question is:
is there problem if log many enough?
@lifei
what want somehow table with:
- row key (partition key) = userid
- 1 point counter
- 1 log collection many log_timestamp possible
it indeed easy create table this:
create table logs ( userid: int, log_timestamp long, //timestamp value text, primary key (userid,log_timestamp) ); it clustered entity (wide row) maximum of 2 billions of log_timestamp/value couples.
for point counter, unfortunately have create column family store because cassandra not allow mixing counter value other types.
Comments
Post a Comment