Title: AOSD for Accounting of Telematics systems'
1AOSD for Accounting of Telematics systems.
- Tom Broens
- 4th of July 2002
2Content
- Introduction
- Context
- Research Goals
- AOSD / AspectJ concepts
- Accounting a crosscutting concern?
- Prepaid SVoD case
- Conclusion
- Questions
3Context (1/2)
- Mark I First program controlled computer in the
US - Fits into a big hall..
- Can hardly do more than a pocket calculator can
do now..
4Context (2/2)
Exponential process power increase
AOSD
5Research questions
Main research question Is it feasible to use an
AOSD approach to augment accounting on an
underlying telematics system?
- Sub-questions
- Is accounting a crosscutting concern?
- What is the state of the art in compile time
AOSD approaches? - How do these AOSD approaches compare to each
other in a theoretical but also in practical
evaluation? - Which AOSD tool can be best used to augment
accounting to a underlying system? - Future perspective
6Aspect oriented software development (AOSD) (1/3)
- Concepts
- Crosscutting concern an element of a system
which can not be easily - constrained in a modular way.
- Tangled code concern code scattered around
multiple objects - Aspect modular unit of crosscutting
implementation
7AOSD (2/3)
- Physical Elements
- Component language
- Aspect language
- Component program
- Aspect language
- Weaver
8AOSD Advantages (3/3)
Arrows in the other direction!
- One aspect file with interaction points in
comparison with several invocation points in
multiple components in the conventional paradigm - No tangled code
- Less change of inconsistency
- Better system evolution
- Clear structure
- Better software quality
9Major approaches
- Composition filters
- Aspect oriented programming AspectJ
- Hyperspaces
- Adaptive programming
10Aspect Oriented programming AspectJ
- Elements
- Aspect
- Pointcut
- Advices
aspect Logging // Pointcut to log change
methods pointcut Log(ContentFrame c, Content d)
call( change(..)) // Change method
logging after(ContentFrame c, Content d)
Log(c,d) c.output.append("Change logged
at"thisJoinPoint)
11Accounting of telematics systems
Accounting management is the collection of data
of resource usage, which can be used to analyse
capacity and trends, cost allocation, auditing
and billing.
- Examples
- The phone bill you get is the result of an
accounting process - Prepaid GSM
- Paid multimedia content over the internet
But is accounting a crosscutting concern?
12Accounting a crosscutting concern?
YES
- Many system components are accounting sensitive
- Elements of accounting (CDRs, schemas) are
change sensitive - Different instantiations of a system want
different accounting - functionality
- Conversion between accounting library data
structure and specific - main functionality data structure
13Prepaid SVoD Case
- Goal ? feasibility
- Check if a a AOSD approach could implement
accounting - Easy of use
- Check if levels of modularity, reusability and
adaptability increase
- Prepaid SVoD service
- Streaming Video on Demand (SVoD) service
- Accounting schemas and structures
14Underlying SVoD service
- Elements
- Client
- Broker
- Content Provider
15Underlying SVoD service
16Accounting components
- Structures
- EBA
- BBA
- Schemas
- Time Based
- Byte - Based
17Accounting Structures
Entity based accounting (EBA)
Broker based accounting (BBA)
18Aspect implementation
Broker pointcuts
pointcut init(Brokerinit binit) execution(void
Brokerinit.init(..))
this(binit) pointcut billing(Brokerinit
binit) call(void Brokerinit.sendHTML(..))
this(binit)
Content Provider pointcuts
pointcut init() execution(void
CPServlet.init(..)) pointcut billing(CPServlet
cp) call(void CPServlet.sendHTML(..))
this(cp) pointcut stopstream()
call(void AVTransmit.stop(..))
19Aspect implementation
// Broker EBA and BBA structure advices void
around(Brokerinit binit) billing(binit)
boolean status false try //
Do the accounting but does it succeed?
status iserver.doAccounting(binit.user.getName()
,"Broker",binit.broker.getRequestprice())
catch(RemoteException e)binit.bw.writeStatus(
"Accounting Server not ready!") // If the
accounting succeeds send the direction info
if(status) binit.bw.writeStatus("User '"
binit.user.getName() "'service request is
forwarded to contentprovider '"
binit.reqProvider.getName() "'")
binit.bw.writeStatus("Accounting "
binit.user.getName() " ---gt Broker "
binit.broker.getRequestprice())
proceed(binit) // Proceed with the sendHTML()
method // If the accounting not succeeds send
a failed document else binit.bw.writeStatu
s("Accounting failed") sendAccountingFailedHT
ML(binit)
20Aspect implementation
// Content Provider BBA Time-based
accounting after(CPServlet cp) billing(cp)
// Time based specific code (conversion code)
long Begintime System.currentTimeMillis()
int pricepersecond cp.thiscp.searchContent(cp.u.
getChoice()).getValue_per_period() int period
10000 String as_address
"rmi//utip479.cs.utwente.nl/BrokerAS"
// Create the right accounting structure thread
// (accounting code) accountingstructure new
CPAccounting_time_based(Begintime,priceper
second,period,as_address,cp.u.getName(),cp.thiscp.
getName(),iserver,cp.streamer, cp.CPGUI, cp) t
new Thread(accountingstructure)
t.setPriority(Thread.MIN_PRIORITY) t.start()
cp.CPGUI.writeStatus(cp.u.getName() "gt
Accounting thread started..")
21Implementation remarks
- One aspect file for one accounting scenario
(e.g. EBA-time based) - Easy changing implemented structure and scheme
- Easy applying different schemes and structures
to - different invocations of the system
- Standards can be implemented
- Easy AOSD approach IDE, documentation, examples
- short learning curve
-
22Conclusion
Feasible?? ?
23Recommendations
- Monitor future developments in the AOSD community
- Research run-time solutions
24Questions?