There are 3 main areas where the code is duplicated: in the service managers, in the agents and in the web frontend. There may be a little duplicated code even in the command line tools.
In the case of service managers, we need to implement a class hierarchy with a BaseManager class, an ApplicationManager class and a ServiceManager class. All the concrete service manager classes should be derived from the ServiceManager class. All the functionality that may be useful to more than one service should be moved to this ServiceManager class. The functionality that is shared between the service managers and the Application Manager should be kept in the BaseManager class.
The same needs to be done in the case of agents. All the common functionality should be moved to the BaseAgent class.
The reorganization of the code in the web frontend has at the moment a lower priority
There are 3 main areas where the code is duplicated: in the service managers, in the agents and in the web frontend. There may be a little duplicated code even in the command line tools.
In the case of service managers, we need to implement a class hierarchy with a BaseManager class, an ApplicationManager class and a ServiceManager class. All the concrete service manager classes should be derived from the ServiceManager class. All the functionality that may be useful to more than one service should be moved to this ServiceManager class. The functionality that is shared between the service managers and the Application Manager should be kept in the BaseManager class. The same needs to be done in the case of agents. All the common functionality should be moved to the BaseAgent class.
The reorganization of the code in the web frontend has at the moment a lower priority