Open davidmarkclements opened 7 years ago
I would call it hydrate. It's a good term. However, I'm missing a bit its usefulness, fake req/response on first boot?
mu.dispatch(somePattern) => route to local => not found => route to ws => found => add to local pattern router (bloomrun) => respond
mu.dispatch(somePattern) => route to local => found => respond
this needs something exposed from the transport that allows patterns to be defined externally
other possibilities could be lazy data replication across services
mu.outbound('*', hydrate(tcp.client(service1), tcp.client(service2))) // try service one first, if not there, get from service2, copy to service1
and of course, local caching
mu.outbound('*', hydrate(local(), tcp.client(service1))) // cache locally for rapid responses
maybe use lru-cache with timeouts to implement
word hydrate might not fit to these other cases, but the logic translate by and large
This seems more a caching layer, rather than hydrating. I'm still missing the use case.
prime use case is hydrating local state from a remote source (particularly in a web app scenario) then replay from local
@pelger @mcollina is there an analogous term for this (as with tee and balance)