-
1. Re: Accessing SwitchYard Application Meta-data
kcbabo Jul 11, 2011 9:24 AM (in response to rcernich)I think what we need to do here is define a set of interfaces which represent the entities that we plan to pop up in the console (and other tooling such as command-line, IDE, etc.). I'll expand on this in the other thread you created re: admin API. I definitely still see a need to expose the configuration descriptor, but the interface route will allow us to provide an admin interface beyond just the AS7 deployment hooks and DMR. Starting from the interfaces, we can map to:
- AS7 console
- JMX
- Jopr/JON
- JAX-RS/RESTEasy
- OSGi service registry
The basic entities would be something like:
- SwitchYard : system-level info
- Component : one for each installed component
- Application : one for each application
- Service : one for each service
The interesting thing to me is that all of these entities share relationships which should make it easy to navigate between them, e.g. view the list of services, select one, then navigate to the app containing that service.
-
2. Re: Accessing SwitchYard Application Meta-data
rcernich Jul 11, 2011 12:26 PM (in response to kcbabo)Hey Keith,
This sounds good to me. The mappings simply become ways of exposing the API through various access protocols/API.
Rob
-
3. Re: Accessing SwitchYard Application Meta-data
kcbabo Jul 12, 2011 10:52 AM (in response to rcernich)OK, I took a quick swipe at this and came up with the following basic interfaces. All this information is available now and I think it should be easy to map to the console quickly.
public interface System { String getVersion(); List<Application> getApplications(); List<Component> getComponents(); List<Service> getServices(); } public interface Component { String getName(); boolean isGateway(); boolean isImplementation(); String getType(); String getConfigSchema(); } public interface Application { public List<Service> getServices(); public QName getName(); } public interface Service { QName getName(); Component getImplementation(); List<Component> getGateways(); String getInterface(); }
Again, this is really just scratching the surface. I'm hoping we can iterate over this to get closer to what we need.
Some random thoughts:
- This is obviously a rough first shot, but after messing with it a bit, I'm confident that we can evolve this to be something decent.
- I'm thinking we will have a core set of these admin interfaces which are then extended or wrapped by other implementation-specific interfaces (JMX/MBean, JAX-RS, etc.) vs. expecting a single interface to be able to be mapped to all of these technologies.
- I can attach the top-level System interface to the SwitchYardService, which should make it easy for you to pull out.
- Lifecycle, monitoring, and other control/edit functions are not represented yet, but I think these can be incorporated directly and/or layered on top.
-
4. Re: Accessing SwitchYard Application Meta-data
rcernich Jul 12, 2011 11:15 AM (in response to kcbabo)Hey Keith,
This looks great. I can integrate the API into the SY service.
One quick question, did you want navigation to be bidirectional, e.g. Service.getApplication()?
Thanks for scratching this out.
Rob
-
5. Re: Accessing SwitchYard Application Meta-data
kcbabo Jul 12, 2011 12:20 PM (in response to rcernich)Good point about the back pointer to Application from Service. I will get this packaged up into a new admin module and get a pull request out by tonight. You can pick it up from there and have a new console by tomorrow morning? ;-)