Code Monkey home page Code Monkey logo

Comments (16)

adamn avatar adamn commented on May 22, 2024

What would be the ORM? I personally am fine having SQLAlchemy be a dependency but it seems like you'll have to choose SQLAlchemy or Django as a dependency.

from sentry.

dcramer avatar dcramer commented on May 22, 2024

I honestly wouldn't mind Django as a dependency if it wasn't so damn large. Batteries included was once nice, and now is just bloat.

from sentry.

adamn avatar adamn commented on May 22, 2024

By large you mean size - meaning that it takes a while to download from PyPI on a new machine? If so, then it makes sense to just leave it depending on Django for normal people and big shops should just host their own PyPI on their own network so that size doesn't matter much.

from sentry.

dcramer avatar dcramer commented on May 22, 2024

It's still kind of up in the air. There's a few things I'm looking at with Sentry 2:

  • ZODB as a default storage mechanism
  • Built-ins for Redis, Mongo, and other popular capable key/value stores
  • Potentially just simple backends using psycopg2 and mysqldb (as we dont need full-on ORMs since the schema is now very simple).

from sentry.

adamn avatar adamn commented on May 22, 2024

I would say that the idea of a pluggable backend is great (although we're happy with MySQL on this front). I wouldn't do psycopg2 or mysqldb directly though - it's much better to implement a manager on the models with raw sql that runs efficiently on pg or mysql

from sentry.

SEJeff avatar SEJeff commented on May 22, 2024

Zope is a dead weight. Please do not go down that path.

from sentry.

matclayton avatar matclayton commented on May 22, 2024

Any thoughts on adding Cassandra as a backend, could be a good fit, with high speed writes and being sort of k/v store based. I've not had time to look at the sentry datamodel to see what the fit is like. Also Mongodb and capped collections might be interesting as well, if you log a lot and dont want to keep large amounts of historic data.

from sentry.

dcramer avatar dcramer commented on May 22, 2024

I think Cassandra and MongoDB would be great targets for the initial backends (or at least, post-release candidate supported backends)

from sentry.

dcramer avatar dcramer commented on May 22, 2024

The default implementation is now going to be Redis. I'm not sure (as of release) if we'll ship with more than that, but it should be pretty easy to extend.

We still need to consider how the Django integration will work, but it will likely be something like sentry.contrib.django, which literally just plugs in an exception handler and a request parser.

from sentry.

adamn avatar adamn commented on May 22, 2024

You're talking about the default backend for the sentry messages, right?

It seems like an app at Sentry's level should not be using any direct implementations for a datastore backend, but rather an abstraction such as: the Django ORM (current), SQL Alchemy, django-nonrel, or lower level with django-dbindexer or djangotoolbox.

from sentry.

dcramer avatar dcramer commented on May 22, 2024

@adamn I think SQL Alchemy would be a great approach, but Sentry will have to have its own general ORM (though not a SQL ORM) to actually map down to those levels. There will still be some odd behavior if people use a custom SQL backend in Django that isnt supported by SQL Alchemy, but that's not a big deal.

As an example, Sentry has unique operations such as "add message to group set", "increase count of message", etc. which can translate to most engines, but translate differently. For example, in Redis, we can use zsets and neat toys like that, but in SQL we rely on indexes rather than generating our own.

from sentry.

SEJeff avatar SEJeff commented on May 22, 2024

Wait at this point are you moving the sentry server away from Django? Just curious what that solves if you did that. It makes perfect sense why you'd want to remove the Django dep from the sentry client, but I can't see it for the sentry server.

from sentry.

matclayton avatar matclayton commented on May 22, 2024

Random thought which came up the other week when we were moving datacenters. One of the issues we have with sentry is the need to maintain an additional deployment. We were bouncing around the idea of running sentry on appengine. This would have the advantage of allowing new users to get up and running quickly, and for 90% of users would probably be fine with the free quota. Just wondered if you'd given any thought to go down this route, or if the data model is too alien from what you are planning with redis.

from sentry.

dcramer avatar dcramer commented on May 22, 2024

@matclayton I'm not entirely sure how well Big Table would work, but with the new data model it's designed to be pretty darn flexible. I'd like to think it's probably doable (depending on what dependancies we require)

@SEJeff the main problem with Django is that the dependency is huge. It's a very large download for a lot of components which frankly we just don't need.

from sentry.

adamn avatar adamn commented on May 22, 2024

@dcramer Maybe it makes the most sense to make a new project that works as an abstract backend for Sentry and that project would plug into redis (or MongoDB, etc..). That way, non-Sentry projects can use things like zsets in a more abstract way.

In other words, I'm proposing a new Python package that acts as a NoSQL abstraction layer with backend support for Redis, MongoDB, SimpleDB, etc..

from sentry.

dcramer avatar dcramer commented on May 22, 2024

Sentry 2 no longer requires Django, but still works as drop-in.

from sentry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.