spring-attic / reactive-streams-commons

A joint research effort for building highly optimized Reactive-Streams compliant operators.
Apache License 2.0
357 stars 51 forks source link

Make GroupBy and future partitioning operator store-agnostic #17

Closed smaldini closed 8 years ago

smaldini commented 8 years ago

Currently GroupBy uses a Map to store grouped sequence references. We probably use 4 interactions with Map that could be eventually translated as many java.util.function or java.lang callbacks. The reason is that some repository might actually offer more refined strategies to create and fetch group references. We could use a pooled registry of groups for instance, attach some behavior to a fresh group (timeout) or just increase our route resolution possibilities.

smaldini commented 8 years ago

For the context, I was thinking about Reactor Bus, a specific routing component I'd like to plug into partitioning operators from Stream and RSC in general :)

smaldini commented 8 years ago

Eventually the simple alternative is to just provide a Supplier of Map.

smaldini commented 8 years ago

Question closed for now, GroupBy doesn't seem suited for this.