You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document that connections aren't thread safe in Python #897
As far as I can tell it is not well documented that thread safety isn't guaranteed, here are the docs I've learned most of the driver stuff from and it never mentions this:
I"m not sure whether the 10-Minute Guide is the appropriate place for it given that it's sort of a quick ReQL tutorial, although mentioning it in passing and linking to a more detailed page might fit. The cookbook definitely doesn't seem like the right place, though. Adding it to the connect page seems like a good idea.
I'd actually think the "primary page" for this info -- which admittedly doesn't have it right now -- would be the "Installing the Python driver" page.
I would argue that any place that is the jumping off point for working with the driver it should mention this. There is a good chance someone never comes back to the API documentation if the 10-minute guide teaches them everything they need.
The information people learn in these getting started guides could be the information they use to jump off and integrate it with their web framework. Maybe there should be a "Using RethinkDB on the web" guide that talks more about the issue?
Most of the intro guides don't even show you need to close the connection which could be another issue when people start using this for something more meaningful like a long running application
The problem is defining just what the "jumping off point" is. I don't think anyone is going to be able to write a ReQL application just with the 10-minute guide, for instance; it's written to be used interactively and warns you explicitly not to use repl in production code. I would rather put the thread issue on the Python driver installation page, which users should see before this.
Sometimes it's more a matter of figuring out where the information goes and how to highlight it. For instance, the dcoumentation for connect actually does mention that the driver is not thread-safe, and it even links to rethinkdb/rethinkdb#2427. (You do have to go to the API page for connect, not just the index page.) I will put that in a more highlighted box.
@chipotle Yeah, I see what you are saying. If there are some type of analytics behind the scenes that you can look at to see which pages are most popular that might give you a good sense of where to place the information.
My work flow went like this:
pip install rethinkdb
Go through 10 minute guide
Start writing my application, find errors, search and land on the cookbook
Have the driver start blowing up in random ways because I'm using threads.
So the pages I had landed on from an SEO standpoint wee:
But as you can see here, even the docstring of connect doesn't mention that it isn't threadsafe. So I want to make sure thats its mentioned in an area that is practical and will actually be viewed by most people. Even if it doesn't strike us as the right place to put it.
I'm willing to admit that my path to this may have been the non-common path though, I'm just providing some anecdotal evidence
It's good to know! We're probably going to add a little note about the lack of thread safety at the very bottom of the 10-minute guide under the "Learn more" box, as well as the driver installation page, so hopefully people will be able to find this. (I'm also going to add notes about the integration with Tornado there, with links to the main documentation on how that works.)
Activity
chipotle commentedon Sep 15, 2015
I"m not sure whether the 10-Minute Guide is the appropriate place for it given that it's sort of a quick ReQL tutorial, although mentioning it in passing and linking to a more detailed page might fit. The cookbook definitely doesn't seem like the right place, though. Adding it to the
connectpage seems like a good idea.I'd actually think the "primary page" for this info -- which admittedly doesn't have it right now -- would be the "Installing the Python driver" page.
http://www.rethinkdb.com/docs/install-drivers/python/
With JS I think this is irrelevant, but is the Ruby driver subject to a similar limitation?
sontek commentedon Sep 15, 2015
I would argue that any place that is the jumping off point for working with the driver it should mention this. There is a good chance someone never comes back to the API documentation if the 10-minute guide teaches them everything they need.
The information people learn in these getting started guides could be the information they use to jump off and integrate it with their web framework. Maybe there should be a "Using RethinkDB on the web" guide that talks more about the issue?
Most of the intro guides don't even show you need to close the connection which could be another issue when people start using this for something more meaningful like a long running application
chipotle commentedon Sep 15, 2015
The problem is defining just what the "jumping off point" is. I don't think anyone is going to be able to write a ReQL application just with the 10-minute guide, for instance; it's written to be used interactively and warns you explicitly not to use
replin production code. I would rather put the thread issue on the Python driver installation page, which users should see before this.Sometimes it's more a matter of figuring out where the information goes and how to highlight it. For instance, the dcoumentation for
connectactually does mention that the driver is not thread-safe, and it even links to rethinkdb/rethinkdb#2427. (You do have to go to the API page for connect, not just the index page.) I will put that in a more highlighted box.sontek commentedon Sep 15, 2015
@chipotle Yeah, I see what you are saying. If there are some type of analytics behind the scenes that you can look at to see which pages are most popular that might give you a good sense of where to place the information.
My work flow went like this:
So the pages I had landed on from an SEO standpoint wee:
https://rethinkdb.com/api/python/
https://rethinkdb.com/docs/cookbook/python/
https://www.rethinkdb.com/docs/guide/python/
and from those I never had to look at the documentation again because I had a decent understanding of the framework and good use my repl from there:
But as you can see here, even the docstring of connect doesn't mention that it isn't threadsafe. So I want to make sure thats its mentioned in an area that is practical and will actually be viewed by most people. Even if it doesn't strike us as the right place to put it.
I'm willing to admit that my path to this may have been the non-common path though, I'm just providing some anecdotal evidence
chipotle commentedon Sep 15, 2015
It's good to know! We're probably going to add a little note about the lack of thread safety at the very bottom of the 10-minute guide under the "Learn more" box, as well as the driver installation page, so hopefully people will be able to find this. (I'm also going to add notes about the integration with Tornado there, with links to the main documentation on how that works.)
Bring 2.2 up to date w/fixes in master