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:

  1. cassandra provides counter feature can use store point.
  2. 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:

  1. row key (partition key) = userid
  2. 1 point counter
  3. 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

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -