Barry,

Key class doesn't have to implement partition resolver; you can have custom
partition implemented from a dedicated class and use it during region
creation...

https://gemfire.docs.pivotal.io/geode/developing/partitioned_regions/using_custom_partition_resolvers.html

-Anil.



On Thu, Jan 18, 2018 at 1:00 PM, John Blum <[email protected]> wrote:

> Effectively, your key needs to be representable in a JSON format and sent
> as a JSON String.  Then, Apache Geode, using a Key constraint along with an
> appropriate registered (Spring) Converter, would automatically convert the
> JSON String to an Object of the required (key) type.  I am a bit fuzzy on
> all the technical/implementation details w.r.t. Apache Geode, but it is all
> Spring (Web MVC) under-the-hood, intercepting the Web REST calls and
> invoking the appropriate Region ops.  It's at least a good place to start.
> You just need to figure out how to customize the underlying Spring
> infrastructure, which is not that difficult, but much has changed with
> Apache Geode since I last inspected Dev REST API and how it exposes, or
> makes accessible, Spring configuration (if at all) that is the real
> question.  It is certainly doable though, given the ability to tweak the
> configuration to support custom Partitioning.
>
> Food for thought.
>
> -j
>
>
> On Thu, Jan 18, 2018 at 12:48 PM, Barry Wood <[email protected]> wrote:
>
>> Hello Geode User Group,
>>
>> There seems to be a usage conflict when using Restful Interface and
>> Custom Partitioning.  Keys must be String for the Restful Interface.  When
>> using custom partitioning the the EntryOperation.getNewValue() has been
>> deprecated, now we must use getKey(), thus the key must be an Object
>> containing the field the PartitionResolver.getRoutingObject() will
>> return, which is *not *compatible with the Restful Interface key being a
>> String requirement.
>>
>> How should custom partitioning be handled when using the Restful
>> Interface?
>>
>> Best regards,
>> Barry Wood
>>
>>
>>
>
>
> --
> -John
> john.blum10101 (skype)
>

Reply via email to