-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
None
Infinispan 8 is baselining on Java 8 and that enables a more advanced , functional, APIs to be built instead of relying on the traditional Map-like APIs. Such APIs, taking lambda functions, can improve on the current APIs in the following way:
- Being able to provide a write operation, where the operation is defined as a lambda, better enables conditional (CAS) like operations that are based in functions other than equality, e.g. version equality. If this functions can be executed atomically, they provide a better solution for Hot Rod version-based replace operations that currently can cause some weird behaviour (
ISPN-4972) - When operations are defined as lambdas, it's easier to move towards a model that tracks/replicates operations leading to state, rather than replicating state itself. This makes it easier to implement more-efficiently replicated alternative data structures, such as counts, lists...etc, and paths the way towards CRDTs, particularly CmRDT (Commutative Replicated Data Types) or operation-based CRDTs.