Billing transaction processing
Olga Soboleva
Kirill Ivanov
Problem Statement
Customer can:
• Top up an account
• Make calls, send text messages and use internet
• Get current balanc...
Use Case

Customer's
account
(0$)
Use Case

Top up: +250$

Customer's
account
(250$)
Use Case
SMS (1 unit): -2$
Call (5 minutes): -5$

Top up: +250$

SMS (2 units): -4$

Customer's
account
(239$)
Transaction Processing
transaction

Balance service
Transaction Processing
transaction

Balance service

Transactions
Transaction Processing
transaction

Balance service
async

Transactions

Transaction
handling
Transaction Processing
transaction

Balance service
async

Transactions

Transaction
handling

Settings
Transaction Processing
transaction

Balance service
async

Transactions

Transaction
handling

Settings

Charges
Transaction Processing
CF: Transactions
Transaction Processing
CF: Transactions
Row: "transactionId"

…
Transaction Processing
CF: Transactions
Row: "transactionId"
Col: "transactionId"
Transaction:
• transactionId
• transacti...
Transaction Processing
Write off sample
Transaction:
• transactionId
• transactionDate
• senderId
• recipientId
• "sms"
• ...
Transaction Processing
CF: Charges
Transaction Processing
CF: Charges
Row: "customerId"

…
Transaction Processing
CF: Charges
Row: "customerId"
Col: "yyyy-MM-ddTHH-mm-ss-fffffff:transactionId"
Charge:
• Money
• Ty...
Transaction Processing
Write off sample
Charge:
• -2$
• WriteOff
• TransactionDate
• TransactionId

Top up sample
Charge:
...
Problem Statement
Customer can:
• Top up an account
• Make calls, send text messages and use internet
• Get current balanc...
Get Current Balance
Charge 1

+
Charge 2

+
…
+
Charge N
Get Current Balance
Charge 1

+
Charge 2

+
…
+
Charge N

Balance
Get Current Balance
time

charges count
Get Current Balance
time

charges count
Get Current Balance
Charge N

…

Charge k+1

Charge k

…

Σ

Charge 1

Solution — aggregate balance
Get Current Balance
Charge N

…

Charge k+1

Charge k

last aggregation

now - Δt

now

Charge N

Σ

…

time

Charge k+1

...
Get Current Balance
CF: AggregatedBalance
Row: "customerId"

…
Get Current Balance
CF: AggregatedBalance
Row: "customerId"
Col: "customerId"
AggregatedBalance :
• Money
• AggregationDat...
Problem Statement
Customer can:
• Top up an account
• Make calls, send text messages and use internet
• Get current balanc...
Problem Statement
Customer can:
•
•
•
•

Top up an account
Make calls, send text messages and use internet
Get current bal...
Package of Services
Charge structure
money

resource
count

resource
id

type

…
Package of Services
Charge structure
money

resource
count

resource
id

type

…

WriteOff

…

Example
-6$

-3

"sms"
Package of Services
Charge structure
money

resource
count

resource
id

type

…

Annul

…

Annul
—

—

"sms"
Package of Services
Charge (+10$)

Balance
• 10$
Package of Services
Charge (+10$)
Charge (+100 sms)

Balance
• 10$
• 100 sms
Package of Services
Charge (+10$)
Charge (+100 sms)
Charge (-2 sms)

Balance
• 10$
• 98 sms
Package of Services
Charge (+10$)
Charge (+100 sms)
Charge (-2 sms)

Charge (-5 sms)

Balance
• 10$
• 93 sms
Package of Services
Charge (+10$)
Charge (+100 sms)
Charge (-2 sms)

Charge (-5 sms)
Annul

Balance
• 10$
Package of Services
Charge (+10$)
Charge (+100 sms)
Charge (-2 sms)

Charge (-5 sms)
Annul
Charge (-3 sms)

Balance
• 4$
Problem Statement
Customer can:
•
•
•
•

Top up an account
Make calls, send text messages and use internet
Get current bal...
Problem Statement
Customer can:
•
•
•
•
•

Top up an account
Make calls, send text messages and use internet
Get current b...
Flat Rate
• To all recipients
• To fixed recipients
Flat Rate
• To all recipients
• To fixed recipients
Settings

transaction

Transaction
handling
Not processed

Charges
Problem Statement
Customer can:
•
•
•
•
•

Top up an account
Make calls, send text messages and use internet
Get current b...
Kirill Ivanov
ikp@skbkontur.ru
Olga Soboleva
olgasob@skbkontur.ru
Upcoming SlideShare
Loading in …5
×

Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуникационной компании". Выступление на Cassandrd Conf 2013

742 views
662 views

Published on

Published in: Economy & Finance, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
742
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ольга Соболева и Кирилл Иванов "Обработка транзакций на примере телекоммуникационной компании". Выступление на Cassandrd Conf 2013

  1. 1. Billing transaction processing Olga Soboleva Kirill Ivanov
  2. 2. Problem Statement Customer can: • Top up an account • Make calls, send text messages and use internet • Get current balance
  3. 3. Use Case Customer's account (0$)
  4. 4. Use Case Top up: +250$ Customer's account (250$)
  5. 5. Use Case SMS (1 unit): -2$ Call (5 minutes): -5$ Top up: +250$ SMS (2 units): -4$ Customer's account (239$)
  6. 6. Transaction Processing transaction Balance service
  7. 7. Transaction Processing transaction Balance service Transactions
  8. 8. Transaction Processing transaction Balance service async Transactions Transaction handling
  9. 9. Transaction Processing transaction Balance service async Transactions Transaction handling Settings
  10. 10. Transaction Processing transaction Balance service async Transactions Transaction handling Settings Charges
  11. 11. Transaction Processing CF: Transactions
  12. 12. Transaction Processing CF: Transactions Row: "transactionId" …
  13. 13. Transaction Processing CF: Transactions Row: "transactionId" Col: "transactionId" Transaction: • transactionId • transactionDate • senderId • recipientId • resourceId • resourceCount …
  14. 14. Transaction Processing Write off sample Transaction: • transactionId • transactionDate • senderId • recipientId • "sms" • 3 Top up sample Transaction: • transactionId • transactionDate • customerId • customerId • "money" • 250
  15. 15. Transaction Processing CF: Charges
  16. 16. Transaction Processing CF: Charges Row: "customerId" …
  17. 17. Transaction Processing CF: Charges Row: "customerId" Col: "yyyy-MM-ddTHH-mm-ss-fffffff:transactionId" Charge: • Money • Type (WriteOff or TopUp) • TransactionDate • TransactionId … …
  18. 18. Transaction Processing Write off sample Charge: • -2$ • WriteOff • TransactionDate • TransactionId Top up sample Charge: • +250$ • TopUp • TransactionDate • TransactionId
  19. 19. Problem Statement Customer can: • Top up an account • Make calls, send text messages and use internet • Get current balance
  20. 20. Get Current Balance Charge 1 + Charge 2 + … + Charge N
  21. 21. Get Current Balance Charge 1 + Charge 2 + … + Charge N Balance
  22. 22. Get Current Balance time charges count
  23. 23. Get Current Balance time charges count
  24. 24. Get Current Balance Charge N … Charge k+1 Charge k … Σ Charge 1 Solution — aggregate balance
  25. 25. Get Current Balance Charge N … Charge k+1 Charge k last aggregation now - Δt now Charge N Σ … time Charge k+1 balance set up Charge 1 Σ … Solution — aggregate balance
  26. 26. Get Current Balance CF: AggregatedBalance Row: "customerId" …
  27. 27. Get Current Balance CF: AggregatedBalance Row: "customerId" Col: "customerId" AggregatedBalance : • Money • AggregationDate …
  28. 28. Problem Statement Customer can: • Top up an account • Make calls, send text messages and use internet • Get current balance
  29. 29. Problem Statement Customer can: • • • • Top up an account Make calls, send text messages and use internet Get current balance Buy package of services
  30. 30. Package of Services Charge structure money resource count resource id type …
  31. 31. Package of Services Charge structure money resource count resource id type … WriteOff … Example -6$ -3 "sms"
  32. 32. Package of Services Charge structure money resource count resource id type … Annul … Annul — — "sms"
  33. 33. Package of Services Charge (+10$) Balance • 10$
  34. 34. Package of Services Charge (+10$) Charge (+100 sms) Balance • 10$ • 100 sms
  35. 35. Package of Services Charge (+10$) Charge (+100 sms) Charge (-2 sms) Balance • 10$ • 98 sms
  36. 36. Package of Services Charge (+10$) Charge (+100 sms) Charge (-2 sms) Charge (-5 sms) Balance • 10$ • 93 sms
  37. 37. Package of Services Charge (+10$) Charge (+100 sms) Charge (-2 sms) Charge (-5 sms) Annul Balance • 10$
  38. 38. Package of Services Charge (+10$) Charge (+100 sms) Charge (-2 sms) Charge (-5 sms) Annul Charge (-3 sms) Balance • 4$
  39. 39. Problem Statement Customer can: • • • • Top up an account Make calls, send text messages and use internet Get current balance Buy package of services
  40. 40. Problem Statement Customer can: • • • • • Top up an account Make calls, send text messages and use internet Get current balance Buy package of services Buy flat rate
  41. 41. Flat Rate • To all recipients • To fixed recipients
  42. 42. Flat Rate • To all recipients • To fixed recipients Settings transaction Transaction handling Not processed Charges
  43. 43. Problem Statement Customer can: • • • • • Top up an account Make calls, send text messages and use internet Get current balance Buy package of services Buy flat rate
  44. 44. Kirill Ivanov ikp@skbkontur.ru Olga Soboleva olgasob@skbkontur.ru

×