Closed bailoo closed 9 years ago
lastlog in MySQL will have a new schema. It will store the last seen data for every day so that when querying for last seen data from history we need not query the main log in Cassandra. This will make all last log related queries in MySQL alone.
@ashish-iembsys says that listener is no longer reading from lastlog so this issue is closed and the idea to move lastlog to MySQL is dropped for the time being.
Ashish, RIzwan: please comment if you have any concerns about this.
After providing api for removing given imei from lastog and truncating lastlog, I relized that lastlog is an anti-pattern for cassandra.
lastlog is a small table, there is just one row per imei. It belongs in MySQL. There will be no performance issue.
Adhering to the philosophy of hiding data storage details from the developer, I will implement lastlog in MySQL and provide compatibility with the existing APIs in both Java and PHP.