Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zookeeper support #478

Closed
jsteggink opened this issue Feb 2, 2017 · 16 comments
Closed

Zookeeper support #478

jsteggink opened this issue Feb 2, 2017 · 16 comments

Comments

@jsteggink
Copy link
Contributor

Hi,

It would be great to have Zookeeper support and have similar SolrCloud functionality as in SolrJ (Java client).
I'm willing to port some parts from SolrJ to solarium. However, I wanted to know if there is any interest and if so, if it's ok to rely on
the PHP Zookeeper extension (http://php.net/manual/en/book.zookeeper.php) and check if it's there using extension_loaded?

Cheers,
Jeroen

@basdenooijer
Copy link
Member

I have no experience with a Solr setup that uses Zookeeper myself, but it might be a useful addition. There have not been any feature requests yet, but that doesn't say a lot, as many other popular Solarium features where added without specific requests.

I think using the extension is ok, I consider a Zookeeper setup as something for the more advanced user, so the requirement for a non-standard PHP extension should not be a big issue. And I think there are not much alternatives anyway?

@jsteggink
Copy link
Contributor Author

Thanks for your reply Bas. I run Solr with Zookeeper all the time and mostly use SolrJ as a client. However, when a client uses PHP, the Zookeeper part is lacking. This means we have to manually add all Solr servers. Something which can change in larger farms. Zookeeper will tell you what Solr servers for specific collections are available at any time. This makes connections more rubust and you have less downtime in cases of Solr server failure.

I have not come across any other PHP libraries as extensive as solarium. Great work happens here and that's why I'd like to extend it even further. I'll update this ticket when I have something ready.

@jsteggink
Copy link
Contributor Author

After much thought I have concluded that it's not very practical to include this in solarium. The reason is that there are some dependencies it will require which differ from the versions solarium requires. My suggestion is to build another package, 'solarium-cloud', which extends solarium with it's own dependencies. This way I don't impose users to require all sorts of extensions and libraries which they will never use. I think it would be most accessible to add this to the solariumphp organisation. I'm not sure how that works though.
What do you think about this?

@basdenooijer
Copy link
Member

I think that's a good idea, and we could add this repo to the solariumphp organization.
I can create the repository and give you access to it as a maintainer, or you could start out in your own repository and transfer it later, whatever you prefer.

@jsteggink
Copy link
Contributor Author

I will start my own repo and when it's usable I'll let you know and we can move it. Thanks!

@jsteggink
Copy link
Contributor Author

Would it be possible to add me as a repository member? I'd like to move the solarium-cloud repo from my personal repo to solarium. Furthermore I'd like to work extensively on future versions of solarium.

@basdenooijer
Copy link
Member

Great, your help is very welcome!
I've sent you an invite, once accepted I can set the correct access rights.

@jsteggink
Copy link
Contributor Author

Cheers Bas! I tried to transfer the repository. However, it says I don't have permissions to create repositories in solariumphp. Could you take a look?

@basdenooijer
Copy link
Member

I've added a solarium-cloud repository and made you admin for the repository

@jsteggink
Copy link
Contributor Author

Thanks Bas, but that doens't work. I get this message when I try to transfer it:"solariumphp/solarium-cloud already exists and You don’t have the permission to create repositories on solariumphp"

@jsteggink
Copy link
Contributor Author

I also tried pushing a mirror, same problem. I don't seem to have any rights. Could you take another look?

@basdenooijer
Copy link
Member

You should be able to transfer the repository now

@jsteggink
Copy link
Contributor Author

Thanks so much Bas, it's done!

@Elyytscha
Copy link

zookeeper support is done? please explain, where how when, we do not find docs, we do not find tests, we do not find examples, we just found the outdated, never gotten production ready, solarium-cloud repo
https://github.com/solariumphp/solarium-cloud

https://stackoverflow.com/questions/72635900/how-to-connect-to-solr-cloud-cluster-in-a-zookeeper-ensemble-via-php

@thomascorthals
Copy link
Member

thomascorthals commented Jul 1, 2022

@Elyytscha I believe "it's done" referred to transferring the solarium-cloud repo to this organisation. The implementation never got past the alpha stage.

My understanding of SolrCloud is a bit foggy, but I know that we're running the same integration tests against a standalone Solr and SolrCloud as part of the CI workflow, without solarium-cloud. This includes indexing and querying documents, and collection management commands. Solarium\Tests\Integration\AbstractCloudTest shows collection management in action.

If there's a specific feature you're having trouble with or are missing in Solarium, please open a new issue in this repo. Include a link to the Solr ref guide for the desired functionality. If you have a proof-of-concept with cURL commands, including those as well might help us get on the way. If you feel up to it, you can also open a PR which we'd be happy to review.

Our contributors are volunteering their own time. We're willing to help, but there are no guarantees. The more information you provide, the better the chances we'll be able to act on your request.

@jsteggink
Copy link
Contributor Author

@Elyytscha As @thomascorthals describes I was also volunteering. I had worked for a company which needed this functionality, but priorities changed and I'm no longer working for them. The reasoning behind the solarium-cloud client was mainly getting collection information for load-balancing and being able to manage the collections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants