Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jeffry Hesse
    @DarthHater
    Yeah that scares me
    Nathan Zender
    @zendern
    @fitzoh in that WIP do you deal with TTL anywhere?? am i just missing it??
    Andrew Fitzgerald
    @fitzoh
    not really
    that was next on the list
    this was the start of that effort:
    func purgeExpiredEntries(db *sql.DB) error{
        db.Exec("DELETE FROM nancy_cache WHERE insert_time < ?", )
    }
    Jeffry Hesse
    @DarthHater
    It's funny, but in looking for simple key value stores, it's damn near impossible to find anything
    Everything is engineered for like millions of keys, etc...
    So it's got locking, etc... transactions, blah blah blah
    And for what we are doing it's like uhhhhh, that's way too heavy for a mostly single use process
    Nathan Zender
    @zendern
    yeah......pudge looks to be the simplest thus far so that might be a good find all depending.
    Jeffry Hesse
    @DarthHater
    The only thing I don't like about pudge is it's in memory and then saved to disk every second or so
    That's how it avoids transactions, etc...
    Nathan Zender
    @zendern
        Default store system: like memcache + file storage. Pudge uses in-memory hashmap for keys, and writes values to files (no value data stored in memory). But you may use inmemory mode for values, with custom config:
    
    cfg = pudge.DefaultConfig()
    cfg.StoreMode = 2
    db, err := pudge.Open(dbPrefix+"/"+group, cfg)
    ...
    db.Counter(key, val)
    
    In that case, all data is stored in memory and will be stored on disk only on Close.
    If i read this right though ..... it stores in memory and on Close will be flushed to disk....seems fine
    Jeffry Hesse
    @DarthHater
    There's an interval thing I saw too
    Where you can say every second or whatever
    And yeah that SEEMS ok
    It's a single use process, more or less
    Jeffry Hesse
    @DarthHater
    I'm game to give it a twirl
    I'll probably extract the DB shit from OSS Index if I do that, too
    Or at least make it internal
    Nathan Zender
    @zendern
    :+1:
    Jeffry Hesse
    @DarthHater
    First step mostly just moving it out of ossindex
    Jeffry Hesse
    @DarthHater
    Aight just got to where it's extracted
    Nancy still works, too
    Andrew Fitzgerald
    @fitzoh
    WIP, POC Cobra. Am I crazy?
    Yes
    (Nothing to do with Cobra)
    Nathan Zender
    @zendern
    :fire: :fire: :fire:
    Jeffry Hesse
    @DarthHater
    Haha
    Dan got Nancy working with Cobra
    Actual nice person, that Dan
    Andrew Fitzgerald
    @fitzoh
    Oh, I thought that was a Hesse special, disregard
    Jeffry Hesse
    @DarthHater
    Haha
    Nathan Zender
    @zendern
    :boom: :boom: :boom:
    Jeffry Hesse
    @DarthHater
    Naw this is Dan Rollo being the silent but awesome person he is
    Jeffry Hesse
    @DarthHater
    @zendern @fitzoh just got pudge working
    It's FAST
    Nathan Zender
    @zendern
    Awesome
    Jeffry Hesse
    @DarthHater
    Pushed it up
    Gotta fix up tests, etc... but I'm digging this
    Jeffry Hesse
    @DarthHater
    One test away from victory, I think
    ALSO cleaned up some of the nasty shit around the test db name, etc...
    Gonna go outside for a few minutes but I think I'm gonna crest this pretty soon
    Jeffry Hesse
    @DarthHater
    @zendern @fitzoh aight, there's some duplication in the code atm, but let er rip, tests passing: sonatype-nexus-community/nancy#133
    Jeffry Hesse
    @DarthHater
    Aight, I think I addressed your feedback @fitzoh , and tests are still passing, no lint complaints, dogfooding, and lots of other cool stuff. We reduced our dependencies quite a bit by doing this, AND it's cross platform AND it's STUPID fast at least locally
    I stepped through it a few times with the debugger to make sure it was doing exactly what I wanted
    Jeffry Hesse
    @DarthHater
    Either way we go forward now, we at least have the cache more or less extracted from ossindex itself, so it should be easyish to swap to another one if pudge isn't making the cut
    Jeffry Hesse
    @DarthHater
    ANNNND cache specific tests added. Largely duplicate the OSS Index ones, but a bit more fine grained