mit-pdos / noria

Fast web applications through dynamic, partially-stateful dataflow
Apache License 2.0
4.98k stars 242 forks source link

Run without ZooKeeper #123

Open AnharMiah opened 5 years ago

AnharMiah commented 5 years ago

would it be possible to run without ZooKeeper for much simpler/basic deployments so its inline with other databases e.g. MySql/PosgreSql?

jonhoo commented 5 years ago

This is actually already supported by using a LocalAuthority. We'd probably want to make it even more convenient to launch a server using those settings though!

AnharMiah commented 5 years ago

thanks @jonhoo is there any documentation on how to use this LocalAuthority ?

Ideally, I would love to just do:

$ ./noria --config=/path/to/config

:)

jonhoo commented 5 years ago

So, one thing worth pointing out here is that, at the moment, ZooKeeper is the way that clients (including the MySQL shim) discover the server as well. Even if you could run just the Noria server like you show above, then you wouldn't actually have a way of interacting with it. This is probably something we should fix, though it's somewhat more involved than I had initially thought. @ms705 something worth thinking about.

ms705 commented 5 years ago

I think it would be great to have a config file-based authority implementation!

rrichardson commented 4 years ago

I have taken a stab at implementing a static client/server config option in the mysql proxy. https://github.com/mit-pdos/noria-mysql/pull/10

I was able to do this without editing Noria code, but having some helper constructs would be nice, as you can tell from the code in the PR.. the gist of the idea is here: https://github.com/mit-pdos/noria-mysql/pull/10/files#diff-639fbc4ef05b315af92b4d836c31b023R136

Basically we statically construct a LocalAuthority and pre-populate the CONTROLLER value with the value of the new server_addr argument.

I am not even sure if this is the correct approach.. if it is, we can build on it.

rayrrr commented 2 years ago

I'm a bit out of my depth here, but is there any chance that using a native Rust service discovery library such as https://docs.rs/tower/0.4.6/tower/discover/index.html could be a more robust solution to removing the Zookeeper dependency?