 | This page was written with the hopes that we would be able to use an AOP solution. However, due to the poor and immature AOP implementations currently available for PHP, this page should be considered obsolete. We will opt for a different way to support monitoring and metering. |
Monitoring/Metering Hooks Requirements
- Use Aspect-Oriented Programming methodology to implement hooks. AOP allows us to hook into any class or method necessary without modifying the original class.
- Define cross-cutting concerns, called Aspects, which will implement hooks. The hooks themselves are defined within the Aspects and are called joinpoints.
- Monitoring/metering Aspect
- Control at API method execution joinpoint
- Security handling Aspect
- Intercept security-conscious methods, check access
- Intercept method returns, modify results
- Social Graph Monitoring Aspect
- Intercept social-graph related calls or results to record graph interaction info. Should hook into BO/DAO object layer and API layer
- Logging Aspect
- Implement logging with framework
- Error handling Aspect
- Detect when error is thrown, perform appropriate action.
- Session handling Aspect
- Identity mapping Aspect
Control Panel Requirements
- API Monitoring interface
- App-usage statistics
- How many users per unit time
- How many API calls per network/app pair, per unit time
- Registry of available API methods
- Plug in Platform-app functionality to display and configure info at an API method level
- Ability to enable/disable API methods, per app or network
- Identity mapping interface
- Manage trust relationships
- Displays principals and their affiliated networks
- Session interface
- View/manage active sessions
- Security interface
- Manage which networks can access which apps
- Manage which apps can access other apps
- Manage which apps can access which API methods
- Logging interface
- Which API calls are being called, failing, misc.
Design

Figure Description
- Apps make requests to REST server. Control panel uses admin-level API calls to retrieve information
- Aspect layer hooks into necessary joinpoints in API and DB/BO classes, recording information where necessary
|
|