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

refactorization and SQLAlchemy #108

Open
wants to merge 39 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@posativ
Copy link
Owner

posativ commented Jul 21, 2014

Work in progress.

Refactoring

  • using MVC
  • cookie expiration (add test!)
  • move API.fetch into controller
  • rewrite HTTP-based "unit" tests to real unittests
  • unittests for remaining integration tests (isso/tests/views/)
  • fix notifications and thread title discovery
  • revert signaling API
  • fix Disqus/WordPress migration
  • remove thread locals
  • use connections/transactions in controllers

Any new TODO/FIXME comment.

SQLAlchemy

  • threads, comments and preferences table in SA
  • thread/comments controller use SA to query the database
  • prune threads without comments periodically
  • replace SQLite3Cache with SA
  • replace SQLite3Queue with SA
  • database migration

UI

  • escape username and website
  • fix previously escaped username and website website
  • fix new like/dislike response

posativ and others added some commits Jun 25, 2014

remove configuration dependency in Markup
Also handle mutable datastructures more carefully.
include default.ini in package
share/isso.conf symlink actually. Fix broken isso.dispatch module.
connection pooling and new cache implementations
* add a wrapper around `sqlite3` to enable connection pooling across
  multiple threads.

  Most tests now use a in-memory database which speeds things (slightly)
  up. The database wrapper is now uncoupled from the actual database
  connection.

* split cache framework from core.Mixin into a separate package
  `isso.cache`. The dependency on `werkzeug.contrib` has been removed to
  ease a possible transition to a different web framework later.

  The default cache uses SQLite3 now (unless Isso is run from uWSGI).
  While it may sound like a Bad Idea (tm), it's much more efficient than
  per-process python datastructures. The SQLite3 cache is SMP-capable
  and fast for read-heavy sites.

  SQLite3 may fail due to a corrupt database for concurrent read access
  from multiple processes. The database is actually not corrupted, but
  the connection is stale. As a workaround, limit process number to your
  CPU count or wait until a "real" backend such as PostgreSQL is
  available.
cache processed HTML
The sanitizer is written in Python and rather slow for many comments
remove uWSGI/Process/Threading mixin
* atexit is ignored by uWSGI and the worker thread can not exit
* queue API and naming is not final

Gunicorn ignores an error on shutdown:

    Exception SystemExit: 0 in <module 'threading' from
    '/usr/lib64/python2.7/threading.pyc'> ignored
drop Python 2.6
* no timedelta.total_seconds
* no functools.total_ordering

EOL.
Merge branch 'master' into dev
Conflicts:
	MANIFEST.in
	docs/docs/install.rst
	isso/tests/test_html.py
refactor and migration to SQLAlchemy
* split db/view into model, controller and views
* use SQLAlchemy for comments, threads and preferences
Merge pull request #109 from NicolasLM/dev
Update config sample to work with SQLAlchemy
remove cgi.escape and simplify input sanitization
Escaping is done in Jade templates (by default).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment