I would like to design a system that
- Will be reading CDR (call data records) files and inserts them into a nosql database. To achieve this spark streaming with Cassandra as nosql looks promising as the files will keep coming
- Will be able to calculate real time price by rating the duration and called number or just kilobytes in case of data and store the total so far chargable amount for the current billcycle. I need a nosql that i will be both inserting rated cdrs and updating total so far chargable amount for the current billcycle for that msisdn in that cdr.
- In case rate plans are updated for a specific subscription, for the current billcycle all the cdrs using that price plan needs to be recalculated and total so far amount needs to be calculated for all the customers
Notes:
- Msisdns are unique for each subscription with one to one relation. Within a month One msisdn can have up to 100000 cdrs.
- I have been going through the nosql databases so far i am thinking to use cassandra but i am still not sure how to design the database to optimize for this business case.
- Please also consider while one cdr is being processed in one node, the other cdr for the same msisdn can be processed in another node at the same time and both nodes doing the above logic.