Comments (4)
This work is basically:
- Add to the
WorldState
trait a function to query quota per object owner. - Likewise, add the ability to ask
WorldState
for the size of a specific object. - Fixup stuff in
values
so thatVar
andVerbDef
etc have reasonably efficient "tell me your size in bytes" functions. - The trickier part: Actually implement the functions in 1. and 2. for the
rocksdb
backend. Would mean tracking byte sizes for all the different column families that bits of objects are stored in, since an object is never stored as a whole chunk. - Implement the quota checks and tracking in
create
andrecycle
- Fix up the byte-size relates builtins in
bf_values.rs
to use the stuff from 3.
from moor.
LambdaMOO's quota implementation, by the way, is almost entirely done in-database, only relying on an object_size
builtin. The quota-handling code in built-in create
and recycle
is a relic of way back when when object quota rather than byte quota was used.
And you could even not do that and reactivate $quota_utils:object_bytes(old) and LambdaMOO's quota system would almost just work.
from moor.
Thanks, I keep meaning to dig into it in earnest, but part of the problem is I really don't like the way the bytes quota stuff ends up putting some annoying requirements into the DB layer that are rather awkward to implement. Knowing how many bytes an object uses up is a bit tricky in the context of systems built with paged datastructures and the like where the packing of a given page depends on branching factors and etc and what not, and in my current DB impl all the pieces that make up what an object is are scattered across multiple "column families" etc. I'd prefer to avoid having to scan all of them to go look it up for a given object, so I will probably have to add specific summary tables, cache them etc.
from moor.
So yeah, as per @pppery's comment, I'm hoping/assuming I do not need to implement the "old school" create
/recycle
object-count based quota at all, and as I have a working object_bytes
now, I think that's all that's needed.
I haven't done any rigorous testing with a core, but if anything comes up I'll re-open this ticket. For now I'll consider this done.
Remaining related work is implementing db_disk_size
in some form, but that's not about quota, really.
from moor.
Related Issues (20)
- code browser edit args
- code browser edit name
- MOO syntax highlighting format validation
- editor.js: completion provider which works to lookup verbs / props for constant ...
- Language enhancement: Introduce lexical scopes to the MOO language: HOT 2
- tuple uniqueness constraint check?
- do I need to pick Insert if the tombstone is Base-derived? HOT 1
- Document vm_overcommit requirement (was Seemingly High Quanity of Memory Requested) HOT 4
- exp backoff.
- use WT join once it's implemented
- buffer size from FormatType...
- backup, log, metadata, statistics, file
- add more.
- find ways of avoiding copies by using SliceRef / ByteSource
- Provide non io-uring option for DB page writing HOT 1
- Provide non-vm overcommit-based buffer pool allocator option
- `telnet-host` doesn't emit "I don't understand that." on core-less `huh` HOT 8
- Support binding to dynamic port; use in networked `moot` tests HOT 1
- MOO tracebacks are double-line-feeded (at least on telnet sessions)
- Empty verb bodies causing panics
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 moor.