PhotArk
  1. PhotArk
  2. PHOTARK-42

Improve PhotArk services by refactoring current Services and Model Objects

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: PhotArk M2
    • Fix Version/s: PhotArk M4
    • Component/s: PhoatArk Services
    • Labels:
      None

      Description

      The current album service has grown out of control, and the client makes multiple calls to the service to retrieve multiple album information.
      We should start using more model/business objects, and stateless services that act on top of these objects.

      I'd like to propose we start defining Album as pure model/business objects that will have all album related info (e.g name, description, cover image url, etc) and same thing with Image.

      As for services, we should create a facade service to retrieve info in a more atomic way, e.g Gallery.getAlbum(albumName) retrieve a album model object with all info for the album at once. We might have a second operation to retrieve list of album images if we think it's too heavy to retrieve all at once....

      Once we have this, we can start looking into applying more RESt style APIs and revisit how we can start taking advantage of http caching to improve performance of the overall client/server experience.

      1. photark-jcr.patch
        17 kB
        John Pradeep

        Activity

        Hide
        Henry Saputra added a comment - - edited

        Instead of using TuscanyServletFilter I think we could create a context listener to have Node launcher dynamically to choose between jcr composite or file system.

        Show
        Henry Saputra added a comment - - edited Instead of using TuscanyServletFilter I think we could create a context listener to have Node launcher dynamically to choose between jcr composite or file system.
        Hide
        John Pradeep added a comment -

        Have refactored the JCR Gallery service to follow REST style, need your feedback/comment on the same.

        I still have to write JUNIT test cases for the same and make sure it is complete, but before that i want to know if the appraoch taken is right.

        Please provide your suggestion/comments to make sure i have not missed out anything.

        Note: The patch should be applied for
        https://svn.apache.org/repos/asf/incubator/photark/branches/photark-rest/photark-jcr

        Show
        John Pradeep added a comment - Have refactored the JCR Gallery service to follow REST style, need your feedback/comment on the same. I still have to write JUNIT test cases for the same and make sure it is complete, but before that i want to know if the appraoch taken is right. Please provide your suggestion/comments to make sure i have not missed out anything. Note: The patch should be applied for https://svn.apache.org/repos/asf/incubator/photark/branches/photark-rest/photark-jcr
        Hide
        Luciano Resende added a comment -

        Thanks John Pradeep, partial patch applied.

        Show
        Luciano Resende added a comment - Thanks John Pradeep, partial patch applied.

          People

          • Assignee:
            Unassigned
            Reporter:
            Luciano Resende
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development