Howdy Rafael. It's not so hard. here's something like my folder structure,
using the datastax driver:
/www/mywebsite/cassandraconnection/simpleclient.py
# datastax imports
class SimpleClient():
session = None
def connect(self, nodes):
cluster = Cluster(nodes, protocol_version=2, cql_version='3.1.7',
port=9042, ssl_options=ssl_options)
/www/mywebsite/pyramidstuff/__init__.py
having said all that, the new version of cqlengine uses the datastax driver
as a backend, which might be a lot easier to work with - they made that
change in june/july iirc. However, Cassandra updates very, very often, and
I'm doing some unique stuff with it, so I chose not to use cqlengine,
although chances are it's what you want to use.
Oh actually the crummy part is waitress doesn't work well with the datastax
driver for some reason - you'll probably get weird errors and disconects.
I changed to nginx + uwsgi, which isn't very hard to do at all with
pyramid. In the simplest case, set up nginx, and just add a [uwsgi]
section to your development.ini with the necessary things, and use:
$VENV/bin/pip install uwsgi
$VENV/bin/uwsgi --ini-paste /www/mywebsite/pyramidstuff/development.ini
I'm writing parts of this off memory, and trying to summarize the code I am
looking at, so excuse my mistakes please, but it should give you an idea of
a method that works.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.