Instead of putting patches in Jaggery apps directory, wouldn't it be better
if we put it as a normal patch. i.e. in repository/components/patches
directory as repository/components/patches/jaggeryapps.

Further, if we want to make it more generic, we can improve our patching
model to ideally replace anything in a carbon server. i.e. when we create a
patch e.g. patchxxxx, we structure our artifacts as the same way in that
server. If there is a file called y as <SERVER>/a/b/c/y, then we can have
our patch structure as patchxxxx/a/b/c/y. Then when that patch is being
applied, original file will be backed up as patch0000/a/b/c/y and old file
at <SERVER>/a/b/c/y will be replaced with the new one.

Although, that approach introduces a deeply nested file structure within a
patch directory, it allows you to replace any file in the server via a
patch including configs, Jaggery, JSP etc. Instead of having the same
directory structure, we can also get help from an ant descriptor which says
where to copy what etc. So, we can get rid of the deeply nested file
structure as well if needed.

/Ruchira


On Sat, Jan 25, 2014 at 4:53 PM, Sameera Medagammaddegedara <
[email protected]> wrote:

> Hello Everyone,
>
> *Problem*
>
>    - As it stands ,if a Jaggery application needs to be updated the user
>    must manually copy the required files
>    - This introduces a number of problems
>       - If several files need to be changed it will become a chore
>       - A user may forget to copy one or more files
>       - It departs from the normal way in which patches are applied to
>       other WSO2 products
>    - The files that could be included in a patch to a Jaggery file could
>    include (but is not limited ) to the following;
>       1. JAG files
>       2. JS files
>       3. Jaggery Modules ( These will be JS files)
>       4. Images and CSS files
>       5. JSON files
>
> *Suggestion*
>
>    - Package the files to be replaced in a zip format
>    - All Jaggery App patches could be placed in the
>    repository/components/patches/jaggeryapps similar to the way existing
>    patches are applied
>    - *Structure of the patch*
>    - Please refer to attached image
>       - The files to be updated would need to be organized according to
>       structure of the app or module to be patched
>       - Before the application is deployed the archive is extracted and
>    the files copied over to the mirrored location in the app or module to be
>    patched
>
> *Open Questions*
>
>    - How do we handle reverting a patch?
>    - How can we apply the patch before Jaggery app is deployed?
>
> Thank You,
>
> Sameera
>
>
> --
> Sameera Medagammaddegedara
> Software Engineer
>
> Contact:
> Email: [email protected]
> Mobile: + 94 077 255 3005
>



-- 

*Ruchira Wageesha**Associate Technical Lead*
*WSO2 Inc. - lean . enterprise . middleware |  wso2.com <http://wso2.com>*

*email: [email protected] <[email protected]>,   blog:
ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>,
mobile: +94 77 5493444*
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to