Comments (6)
I think you may want to consider actual SQL queries in mind in designing the schema further. If you want to create a full bank/accounting hierarchy like we discussed with @ryanday36, what would be typical SQL queries you would need?
Would it be mainly a Join operation? Like join the association_table
with bank_table
? How would you join those two? What would be a foreign key?
If you need to dump the entire bank table info into the internal tree of bank hierarchy in memory, what SQL queries and how many of those will be needed?
from flux-accounting.
The three fields, account_name, parent_acct_name, shares, are the ones I can think of that could give some baseline functionality to creating a bank hierarchy. Can you think of any other fields that might be needed?
Those three fields should be enough to build a bank hierarchy. One other thing that I'm curious about, do you see this as being one database per cluster, or a centralized database for multiple clusters? There's arguments both ways, but if it's the latter will there be an association table for each cluster (_association_table) or a field for cluster name?
from flux-accounting.
That's what I was thinking - a JOIN between association_table and bank_table. To create the hierarchy, we could join based on the account name, since that would be present in both tables.
I think a requirement expressed from @ryanday36 is that a user can belong to multiple banks. How do you plan to support this?
from flux-accounting.
The primary key for association_table
is a combination of both username
and account
. This should allow multiple entries for associations with the same username that can belong to multiple banks.
from flux-accounting.
I think one database per cluster is reasonable, and probably the best way to do things, especially at first. In some senses it's more to maintain than a centralized database, but it sounds like the database is going to be pretty integral to fairshare job scheduling, so having a database per cluster removes a central point of failure that can take out all of the clusters.
from flux-accounting.
Would it be mainly a Join operation? Like join the association_table with bank_table? How would you join those two? What would be a foreign key?
That's what I was thinking - a JOIN
between association_table
and bank_table
. To create the hierarchy, we could join based on the account name, since that would be present in both tables.
One other thing that I'm curious about, do you see this as being one database per cluster, or a centralized database for multiple clusters? There's arguments both ways, but if it's the latter will there be an association table for each cluster (_association_table) or a field for cluster name?
Good question. I was thinking this being one database per cluster - the association_table
would list the users registered on the cluster, and the bank_table
could list the breakdown of the accounts registered on that same cluster. Does this seem reasonable?
from flux-accounting.
Related Issues (20)
- testsuite: fix tests that look at job state HOT 1
- support bank and project updates HOT 1
- `view-bank`: `-t` option does show hierarchy for a sub bank with users in it
- per-queue user limits HOT 2
- plugin: create external `bank_info` class HOT 1
- all pending jobs killed after Flux update HOT 5
- plugin: create new `Association` class
- plugin: improve callback for `job.validate` HOT 1
- error in flux account view-job-records HOT 2
- `plugin.query`: abstract helper functions that create JSON objects of flux-accounting data HOT 1
- `job.new`: use new external functions for user/bank lookups
- plugin: support bypassing limits
- `job.update`/`job.update...queue`: use new external methods for association lookup
- `job.state.priority`: use new external function for association lookup, general function improvement
- plugin: move accounting-specific helper functions to `accounting.cpp`
- plugin: send max nodes information per-association
- plugin: create estimation of node count helper function
- docs: move flux-accounting guide to this repo HOT 1
- create script for crontab tasks HOT 3
- flux account commands hang while fairshare is being updated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flux-accounting.