Improve the (internal) resource handling ----------------------------------------
Key: SLING-1923 URL: https://issues.apache.org/jira/browse/SLING-1923 Project: Sling Issue Type: Improvement Components: Installer Affects Versions: Installer Core 3.0.0, Parent 10, Parent 9, Parent 8, Parent 7, Parent 6, Parent 5, Path Based RTP 2.0.2, Samples Webloader UI 2.0.2, Samples Webloader Service 2.0.2, Samples Simple Demo 2.0.2, Scripting API 2.1.2, Scripting API 2.1.0, Scripting API 2.0.2, Scripting Core 2.0.14, Scripting Core 2.0.10, Scripting Core 2.0.8, Scripting Core 2.0.6, Scripting Core 2.0.4, Scripting Core 2.0.2, Scripting Java 2.0.0, Scripting Java 1.0.0, Scripting JavaScript 2.0.10, Scripting JavaScript 2.0.8, Scripting JavaScript 2.0.6, Scripting JavaScript 2.0.4, Scripting JavaScript 2.0.2, Scripting JSP 2.0.12, Scripting JSP 2.0.10, Scripting JSP 2.0.8, Scripting JSP 2.0.6, Scripting JSP 2.0.2, Scripting JSP-Taglib 2.0.6, Scripting JSP-Taglib 2.0.4, Scripting JSP-Taglib 2.0.2, Servlets Get 2.1.0, Servlets Get 2.0.8, Servlets Get 2.0.6, Servlets Get 2.0.4, Servlets Get 2.0.2, Servlets Post 2.1.0, Servlets Post 2.0.4, Servlets Post 2.0.2, Servlets Resolver 2.1.0, Servlets Resolver 2.0.8, Servlets Resolver 2.0.6, Servlets Resolver 2.0.4, Scripting JST 2.0.4, Scripting JST 2.0.6, Servlets Resolver 2.1.2, Servlets Post 2.1.2, Servlets Get 2.1.2, Scripting Velocity 2.0.0, Scripting Velocity 2.0.2, Scripting JSP-Taglib 2.1.0, Scripting JSP-Taglib 2.1.2, Scripting JSP-Atom-Taglib 1.0.0, Scripting JSP 2.0.14, Scripting JavaScript 2.0.12, Scripting Java 2.0.2, Scripting Core 2.0.16, Scripting API 2.1.4, Path based RTP 2.0.4, Parent 11, Installer Core 3.0.2 Reporter: Carsten Ziegeler Assignee: Carsten Ziegeler Fix For: Installer Core 3.0.2 The current resource handling has some drawbacks - one is that a resource is always copied into the local data store even if it did not change; another one is that integrating new concepts like the resource transformer etc is difficult and error prone. The first thing we should change is the resource types, currently we have CONFIG and BUNDLE - this assumes that the client knows what resources it is providing - however it is not the task of the client to decide this; in many cases the client has even not the knowledge about it. Therefore we should introduce two new resource types PROPERTIES and FILE. However, if the client really knows what it is dealing with, it can use one of the two new types OSGI_BUNDLE or OSGI_CONFIG - we introduce these new types, to be more compatible - the old constants CONFIG and BUNDLE will be deprecated and aliases for PROPERTIES and FILE! When a new resource provider is registering itself or an update of resources takes place, merging of resources should be done immediately - the sync first does some general sanity checks on the incoming data and then uses URL and digest of the data to check for updates/removes. If a resource with the same URL and digest is already available, it is assumed to be the same and no further processing is required! This avoids unnecessary copies. We further decide between incoming resource type (usually PROPERTIES or FILE) and processing resource type. The new resource transformer services are responsible for this transformation (maybe in combination with data transformation). A resource transformer can omit one or more resources with resource type and data. If a resource has a processing resource type, this resource is used to be processed by the osgi installer task factories. As long as the resource has no processing resource type, it is not processed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.