Giter Site home page Giter Site logo

Comments (5)

andreasnomikos avatar andreasnomikos commented on September 14, 2024

Why allow segmentation of the db based on the app and not allow sharding of each table so that both database nodes are symmetric?

from synnefo.

apyrgio avatar apyrgio commented on September 14, 2024

Database sharding is surely interesting, but it requires a Django model that is aware of this as well as being free from cross-database relationships. At this point, our models have neither, which is why the proposed solution is app-based.

Once we have an easy way to manage multiple databases though, the next step will be examining database sharding.

from synnefo.

andreasnomikos avatar andreasnomikos commented on September 14, 2024

Yes you are absolutely right that the model has to be somewhat aware of the shading system as you would have to generate guid from the application layer and decide the sharding mechanism (usually a modulo on the guid) from there. Regarding cross-database relationship if you mean foreign keys enforced at the database level it is a common practice that such relationships are enforced at the application layer in large scale applications as the other way clearly does not scale. If your current concerns are scaling you will not get much milage out of the proposed solution. It might provide some flexibility in the sort run, but a big installation would hit problems fast. (I don't have more context or numbers on your current biggest installation so this was just a suggestion for a more long term approach). Thanks.

from synnefo.

apyrgio avatar apyrgio commented on September 14, 2024

Thanks for your input! Pretty valid points all in all.

Now, I'd say that until we examine database sharding and shape our models accordingly, we need to at least provide to the end-users a simple way to have many databases, as this can affect people that are currently installing Synnefo. This is a hard limitation that needs an immediate solution.

Also, as you may have noticed, we have not touched the issue of scaling here, since this should be the subject of a future RFC that would explicitly address it. The main point of this RFC is to provide a quick and intuitive way to handle multiple databases. If any point we've raised contradicts with the above or has room for improvement, then we'd be glad to know.

Thanks,
Alex

P.S.

(I don't have more context or numbers on your current biggest installation so this was just a
suggestion for a more long term approach)

This is out of the context of this RFC but you can get an idea about the numbers of our biggest installation here. If I'm not mistaken, the number of active users is about 6,500.

from synnefo.

apyrgio avatar apyrgio commented on September 14, 2024

A solution for this issue (and the issue of database transactions) has been added in the release branch of Synnefo.

from synnefo.

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.