Tribler / dispersy

The elastic database system. A database designed for P2P-like scenarios, where potentially millions of computers send database updates around.
http://www.tribler.org
84 stars 43 forks source link

Example community with an object-relational mapper #61

Open NielsZeilemaker opened 11 years ago

NielsZeilemaker commented 11 years ago

Outcome: a tutorial with one or all three ORM packages used Goal: use higher-level relational algebra, instead of hand-coded SQL Motivation: less code, easy to expand and re-use

Options Sqlalchemy, Storm, Django:

One of many discussions on this: http://stackoverflow.com/questions/53428/what-are-some-good-python-orm-solutions

FYI: originally created by Johan in the Tribler project Tribler/tribler#130

boudewijn-tribler commented 10 years ago

Last time I talked with Johan about this it seemed like we didn't want to put time into ORM anymore. If this is still the case I suggest we close this issue. Johan?

NielsZeilemaker commented 9 years ago

Let's see if we can get an orm to work in Dispersy. Looking at this sqlobject, it seems pretty trivial: http://code.saghul.net/index.php/tag/sqlobject/

LipuFei commented 9 years ago

@NielsZeilemaker I have a branch on Tribler that changes some database to use an ORM called Axiom. I converted all tables expect the Channel-related ones to use Axiom and it worked. So this would also be an option.

NielsZeilemaker commented 9 years ago

Could you give me a pointer to this branch?

LipuFei commented 9 years ago

https://github.com/LipuFei/tribler/tree/refactory_axiom_db

NielsZeilemaker commented 9 years ago

Axiom seems to be something else, its an object store. I'd rather use an ORM if possible, and SQLObject seems a bit more mature.

whirm commented 9 years ago

@NielsZeilemaker it can be used as an ORM just fine: https://github.com/twisted/axiom/blob/master/README.txt Also, sqlobject doesn't seem to have a working schema upgrade system...

NielsZeilemaker commented 9 years ago

If we're not using it as an object database, but as orm then ok. But let's start with Dispersy, it's smaller.

whirm commented 9 years ago

Yeah, that's what we where talking about with @LipuFei right now.