crate / crate-npgsql

A plugin that provides extensions to Npgsql which enable usage of Npgsql as a .NET data provider for CrateDB.
Apache License 2.0
11 stars 5 forks source link

Possible to specify multiple crate hosts in the connection string? #1

Open dsmithson opened 7 years ago

dsmithson commented 7 years ago

Since we're connecting to a cluster of Crate servers, it would be nice to specify a list of hosts to be used by the pool. Is it possible to specify multiple hosts in the connection string?

Some benefits of supporting multiple host connections:

apircher commented 7 years ago

Hi @dsmithson, thank you for your feedback! I started discussing this issue with Crate.

Our goal is to get support for CrateDB into the official npgsql as soon as possible and there is already an issue for multiple hosts in connectionstrings in Milestone 3.3 of the official npgsql project. (https://github.com/npgsql/npgsql/issues/732)

I´ll keep you updated about where the discussion goes.

fdsmax commented 6 years ago

hi, is this support now available in the cratedb-npgsql? I could see some commits in the official npgsql to provide multiple hosts support in the connection string. Interestingly, the Elasticsearch .net providers support this feature and reflect the server side Master election/changes efficiently in the client connection.

fdsmax commented 6 years ago

I have forked this project, adding 'basic' support for the multiple crate hosts in the connection string. Will send you pull request upon commit. Pl let me know if any of you working on this already so I can avoid redundant work :+1:

apircher commented 6 years ago

Hi @diwakarpp, we will soon merge the branch https://github.com/crate/crate-npgsql/tree/a/adapttypemappings into dev and the branch https://github.com/crate/npgsql/tree/a/typemappings into crate-dev. Before that, we will integrate the latest commits from official npgsql.

fdsmax commented 6 years ago

Hi @apircher , thank you very much for the details. Ok, then I will await the merge from the official npgsql. Pl let me know if you/your team need any help for the merge or tests after the merge. Cheers.