twitter-archive/ostrich

Supporting multiple services in config

azinman opened this issue · 1 comments

It appears that Ostrich supports multiple concurrent services, as implied by the need to run ServiceTracker.register(this). However, the documentation only describes creating a configuration for one service. Furthermore, given the typing of runtime.loadRuntimeConfig[Service] it appears that the default loading scheme only supports a single service. While a meta-service can be employed as a work around, it would be useful to either document how to create a more complicated set of services. With that any issues of threading would also be helpful to have documented.

the issue is a little bit old but one solution (which i either don't like) which worked for me is:
instantiate 2 seperat RuntimeEnvironments:
RuntimeEnvironment(this, Array(args(0), args(1)))
RuntimeEnvironment(this, Array(args(0), args(2)))
run -f config1 config2

each config instantiates one serviceConfig object.

is there any better solution?