Uploaded image for project: 'Spring Data Geode'
  1. Spring Data Geode
  2. DATAGEODE-257

Support Function context aware Repositories operating on a local, filtered data set

    XMLWordPrintable

    Details

      Description

      It would be ideal if a Function bound, Spring Data Repository took context into consideration when performing Repository data access operations.

      For instance, if an application-defined Repository is injected into and used in an Apache Geode Function (perhaps a Function annotated with @GemfireFunction in SDG's Function Annotation support), and if the associated Region of the Repository matches when the Function is "executed" on a Region (with @OnRegion), then the Repository would operate on the "local" (possibly, "filtered") data set provided by the FunctionContext.

      One such test example exists here along with it's Function definition and Function execution.

      However, there are many things that need to be considered carefully as not to adversely affect any existing functionality or behavior. Using Repositories in Functions is quite common in practice. The following list, though not exhaustive, needs to be taken in consideration:

      1. Repositories with an @Region annotation on the Repository itself, or indirectly on the associated application domain object does not match the RegionFunctionContext of the Region targeted Function execution.

      2. Functions executed via @OnMember(s) or @OnServer{s) should be excluded.

      3. Repositories defining raw OQL using the @Query annotation need to be handled appropriately.

      4. Repositories with "custom" implemented methods also need to be handled properly.

      5. ???

        Attachments

          Activity

            People

            Assignee:
            jblum John Blum
            Reporter:
            jblum John Blum
            Last updater:
            John Blum
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: