<div dir="ltr"><div>FWIW, As a consumer I'm not excited about seeing ES make its way back into the katello ecosystem.  All of my opinion is based on the fact that I use pulp inside Katello.<br><br>PostgreSQL's more recent versions extended to NoSQL feature sets that can be very performant.  Simply googling PostgreSQL NoSQL points to lots of articles on it.<br><br></div><div>Having supported on several large applications that didn't scale well due to ORMs I'm not a huge fan of them myself, but I'd rather have an ORM than have ES on my systems.<br><br></div><div>Since i keep saying i dont want ES but dont have any reasons here are my top 3:<br><br></div><div>1: Bundled everything - we are big on packages (hey pulp!) and having a big bundled package from an open source project just rubs me wrong and has other fun issues that yall will be stuck deal with.<br><br></div><div>2: Scaling - Katello's install isn't really designed to easily be built across multiple systems, even if ES is.  Not that you can't do it, but breaking things out can be...interesting.  Then, ES requires you to think about scale from the get go. If pulp or katello initialize a default, there is a strong requirement to oversize everything upfront, but even that is dangerous.<br><a href="https://www.elastic.co/guide/en/elasticsearch/guide/master/scale.html" target="_blank">https://www.elastic.co/guide/en/elasticsearch/guide/master/scale.html</a><br><br></div><div>3: Data integrity (i've had supposedly recoverable shards that i had to loose completely cause they would not come back online no matter what documentation tells you)<br></div></div><div dir="ltr"><div><br></div><div>-greg<br><br><br></div></div><div dir="ltr"><div><div class="gmail_quote"><div dir="ltr">On Thu, May 12, 2016 at 1:09 PM Eric Helms <<a href="mailto:ehelms@redhat.com" target="_blank">ehelms@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 12, 2016 at 10:51 AM, Sean Myers <span dir="ltr"><<a href="mailto:sean.myers@redhat.com" target="_blank">sean.myers@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Early planning for Pulp 3.0 is building up some steam, and it's<br>
a good time to go over the proposed technology stack that we're<br>
looking at right now that we're looking at to build on. For all<br>
of these choices, once Pulp's basic needs are met, the major<br>
deciding factor for what library to use is decided by "meta"<br>
factors, like community support, release processes, etc. Special<br>
thanks to Jeff Ortel for making sure my assumptions about these<br>
tools got challenged so the right choices get made.<br>
<br>
We're using postgres as the DB for 3.0. Since we're going<br>
relational, the next thing we'd want is a good ORM. Several team<br>
members have experience with the Django ORM, and Pulp is actually<br>
already using it in its views. It has a fantastic community, is<br>
well documented, and comes with a vast multitude of third-party<br>
plugins to help us fill in any gaps in functionality that may be<br>
found. Our current tasking system is build on Celery[0], which is<br>
among those third-party plugins with excellent Django support,<br>
which potentially means that using Django with a relational DB<br>
can help us get rid of code where we overlap functionality that<br>
may be provided by django-celery.<br>
<br>
Other ORM options were considered, but only SQLAlchemy (another<br>
very good ORM) stood out as something we could use if there was<br>
a compelling reason to switch from Django, but at this time there<br>
is no such reason. Django does the job well. Most other ORMs are<br>
either not robust enough in their feature-set or apparently not<br>
being actively maintained, and were rejected as alternatives.<br>
Also rejected outright was not using an ORM (or other form of<br>
data mapper) at all, since my sense is that we all agree that<br>
we don't want to manually be writing SQL. :)<br>
<br>
This leads to the next big building block, which is the tool we<br>
should use to build our REST APIs. I've used django-tastypie in<br>
the past, as have a few other team members, and it was my front-<br>
runner for this job. After looking around though, it looks like<br>
django-rest-framework (DRF) is currently dominating this space<br>
in the Django community[0]. Going through some of their tutorials<br>
and examples, it's looking like tastypie is out of the running,<br>
and DRF is the winner. Both would be adequate for Pulp's needs<br>
when it comes to putting a REST API on top of our data model, so<br>
it makes sense to go with the more "popular" option. In addition,<br>
I think its documentation and API are easier to work with than<br>
tastypie's, so it's simultaneously easier to use and easier to<br>
*learn how* to use.<br>
<br>
Finally, we're looking at bringing in a search engine for the<br>
search views in the API. We're currently doing search using<br>
mongodb, using mongo-specific search criteria, but will be<br>
decoupling the search API from the search engine. As with Django,<br>
a few team members have experience using elasticsearch (myself<br>
included). Elasticsearch is java-based, running on top of the<br>
Lucene indexer, with a simple REST API on top of it, and so at<br>
the moment it's my preferred search engine.<br>
<br>
I looked at a few other search engines in recent testing, including<br>
the pure-python engine "Whoosh", Solr (also uses lucene), Xapian,<br>
and Sphinx (the search engine, not the document builder). Of these,<br>
only Whoosh and Elasticsearch have first-party support by the<br>
django-haystack project[2], which is both my preferred and the most<br>
commonly used django search plugin[3]. Given my previous positive<br>
experience with Elasticsearch, I think it's probably the best choice<br>
for a search indexer at this time.<br></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Can you expand on why a separate search service is needed and how Postgres won't fill your needs? </div><div><br></div><div>Thanks,</div><div>Eric</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The Whoosh plugin for Haystack currently doesn't support a very<br>
useful feature that Whoosh itself does support, which is faceting.<br>
This feature gap is something that would need to be closed (likely<br>
by us) to get feature parity between the elasticsearch and whoosh<br>
backends.<br>
<br>
While there are other libraries that appear to live in the same space<br>
as haystack (integrate a search indexer with Django models, providing<br>
Django QuerySet/Model results), none of them have the robust features<br>
and community support seen in haystack. Again, though, decoupling the<br>
search interface from the search implementation means that this piece<br>
is likely to be easy to change out if we find better options in the<br>
future (especially if we write it with this in mind).<br>
<br>
Summary:<br>
- Django ORM on postgres<br>
- django-rest-Framework to build API views<br>
- django-haystack to provide search capabilities, using Elasticsearch<br>
  to start, possible switching to Whoosh after some development -- this<br>
  switch should occur before any release of 3.0<br>
<br>
[0]: <a href="http://docs.celeryproject.org/en/latest/django/" rel="noreferrer" target="_blank">http://docs.celeryproject.org/en/latest/django/</a><br>
[1]: <a href="https://www.djangopackages.com/grids/g/rest/" rel="noreferrer" target="_blank">https://www.djangopackages.com/grids/g/rest/</a><br>
[2]: <a href="http://django-haystack.readthedocs.io/en/stable/backend_support.html" rel="noreferrer" target="_blank">http://django-haystack.readthedocs.io/en/stable/backend_support.html</a><br>
[3]: <a href="https://www.djangopackages.com/grids/g/search/" rel="noreferrer" target="_blank">https://www.djangopackages.com/grids/g/search/</a><br>
<br>
<br>_______________________________________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com" target="_blank">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a><br></blockquote></div></div></div>
_______________________________________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com" target="_blank">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a></blockquote></div></div></div>