...
Here is a simple Object Model snippet to briefly illustrate the idea: (In the diagram below, entities colored with light blue should serve as our first-level entities that can be exposed to end-user in our REST url pattern, while those entities colored with light brown should be internal to cloud-engine southbound API).
Project planning
Design and implementing this brand-new API server is not an easy task, and need coordinated work from other component, like cloud-engine, event notification, ACL, UI, internal service refactoring, etc. We need to take a phased approach to reach our final goal. Here are some subtasks I can identified so far and specified them in order here:
- Define CloudStack Object Model for both API server and cloud-engine API.
- Implement a new set of Response classes based on object model defined. We may need two set of Response classes, one for API server, one for Cloud-Engine API due to different granularity of information.
- Create API server Cache DB view schema based on responses to be presented to the user.
- Cloud-engine should provide REST api for api server to build the cache.
- ACL component should provide APIs for api server to populate row-level permission information for each resource cached.
- Cloud-engine should hook up with event framework to publish any resource update change.
- API server needs to subscribe to event framework to be notified by each resource update change.
- Implement API server cache build and update algorithm.
- Building inverted index for API server cache db view using Lucene to support real keyword search.