Giter Site home page Giter Site logo

pundat's Introduction

pundat

A data archiver and metadata query processor for BOSSWAVE

Documentation can be found in the wiki

To install:

From Source

Have Go installed

Run:

$ go get -u github.com/gtfierro/pundat
$ go install github.com/gtfierro/pundat

Polishing for Release

Check the issues, but also:

  • fold in savepoint into pundat
  • fold in management of archive requests into pundat
  • pundat -> pd on command line?

pundat's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fliiteai

pundat's Issues

Archive Request Browser

Administrative interface to look at:

  • what archive requests is the archiver subscribed to?
    • probably dice this up a few ways: search by namespace
  • is there an archive request for URI ?

Add command-line query

Need the scriptable kind where we can add a query on the command line and redirect the output to a file

Command Line Tool: Range Checker

Given a UUID or a URI, return the ranges of time you are permitted to access

Usage:

$ pundat range scratch.ns/abc/def/+
< range 1 >
< range 2 >

Fix cache invalidation

10 minutes is a bit long. Can we invalidate the cache on a much shorter time interval so it more closely lines up with each new blockchain block? Around 15sec or so

Command Line Tool: Permission checker/granter

Easy way to

  • verify access to the archiver
  • give access to the archiver

Proposed interface:

$ pundat check -k <key> -a <archiver>
Key <key> has access to archiver at <abc> until <time>

$ pundat check -k <key1> -a <archiver>
Key <key> does not have access to archiver at <abc>

$ pundat grant -k <key1> -a <archiver> -e <expiry>
Granting access on archiver <abc> to key <key1> for <expiry>

Seeing this bug in production

panic: reflect: reflect.Value.Set using unaddressable value

goroutine 2019 [running]:
reflect.flag.mustBeAssignable(0x16)
        /usr/local/go/src/reflect/value.go:228 +0x17d
reflect.Value.Set(0xca04e0, 0xc43163bf90, 0x16, 0xca04e0, 0x0, 0x16)
        /usr/local/go/src/reflect/value.go:1345 +0x2f
gopkg.in/vmihailenco/msgpack%2ev2.ptrDecoderFunc.func1(0xc431e09450, 0xca04e0, 0xc43163bf90, 0x16, 0xca04e0, 0xc43163bf90)
        /home/gabe/go/src/gopkg.in/vmihailenco/msgpack.v2/decode_value.go:104 +0x2a4
gopkg.in/vmihailenco/msgpack%2ev2.(*Decoder).DecodeValue(0xc431e09450, 0xca04e0, 0xc43163bf90, 0x16, 0xc43163bf90, 0x16)
        /home/gabe/go/src/gopkg.in/vmihailenco/msgpack.v2/decode.go:185 +0x8c
gopkg.in/vmihailenco/msgpack%2ev2.decodeInterfaceValue(0xc431e09450, 0xcff3a0, 0xc43163bfa0, 0x194, 0xcff3a0, 0xc43163bfa0)
        /home/gabe/go/src/gopkg.in/vmihailenco/msgpack.v2/decode_value.go:243 +0xe4
gopkg.in/vmihailenco/msgpack%2ev2.(*Decoder).DecodeValue(0xc431e09450, 0xcff3a0, 0xc43163bfa0, 0x194, 0xc43163bfa0, 0x194)
        /home/gabe/go/src/gopkg.in/vmihailenco/msgpack.v2/decode.go:185 +0x8c
gopkg.in/vmihailenco/msgpack%2ev2.(*Decoder).decode(0xc431e09450, 0xca04e0, 0xc43163bfa0, 0x50, 0xdb45c0)
        /home/gabe/go/src/gopkg.in/vmihailenco/msgpack.v2/decode.go:180 +0x11c
gopkg.in/vmihailenco/msgpack%2ev2.(*Decoder).Decode(0xc431e09450, 0xc428e25e50, 0x1, 0x1, 0x0, 0x40)
        /home/gabe/go/src/gopkg.in/vmihailenco/msgpack.v2/decode.go:66 +0x6f
gopkg.in/vmihailenco/msgpack%2ev2.Unmarshal(0xc42c0dd4e0, 0x1, 0x1, 0xc428e25e50, 0x1, 0x1, 0x413700, 0x7fd59c70f358)
        /home/gabe/go/src/gopkg.in/vmihailenco/msgpack.v2/decode.go:37 +0x1bb
github.com/immesys/bw2bind.(*MsgPackPayloadObjectImpl).ValueInto(0xc42990e0c0, 0xca04e0, 0xc43163bf90, 0x7fd59c70f358, 0xc42990e0c0)
        /home/gabe/go/src/github.com/immesys/bw2bind/pobasic.go:183 +0xbc
github.com/gtfierro/pundat/archiver.(*Stream).start.func2(0xc427b22dd0, 0x150d740, 0xc4200f8600, 0x150bb60, 0xc4200f8240)
        /home/gabe/go/src/github.com/gtfierro/pundat/archiver/stream.go:156 +0x266
created by github.com/gtfierro/pundat/archiver.(*Stream).start
        /home/gabe/go/src/github.com/gtfierro/pundat/archiver/stream.go:129 +0xb5

Add local subscription queues

We do a fair amount of processing on each received message, so its worth creating an internal queue per stream to provide some slack so that we don't get auto-unsubscribed by the designated router.

Next version of BOSSWAVE will contain some mitigation for this, but we should have some queue-awareness on the archiver side as well.

Removed nested "Metadata" tag

We get responses formatted like this:

{
  "UUID": "102a21a8-c74b-3684-98c9-3ec107d9a8d5",
  "Path": "r0uT8QOzVuRiWIQTHWnEKUAl-JOgPXmy0gGfWMwddGQ=/s.hamilton/00126d0700000016/i.temperature/signal/temperature",
  "Metadata": {
    "Building": "Gabe's Apartment",
    "Room": "Kitchen",
    "_name": "temperature"
  }
}

but the keys really aren't under a "Metadata" parent key. Need to get rid of that

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.