Coder Social home page Coder Social logo

ark-n2t's Introduction

ark-n2t

Copyright © 2024, Christopher Alan Mosher, New York, New York, USA, [email protected].

License Donate

ARK resolver servlet.

Definitions

{ARK} format: "ark:" {NAAN} "/" [{shoulder}] {blade} {checksum}

  • {blade} has an associated {blade-length} and {alphabet}
  • {checksum} has an associated {checksum-algorithm}
  • {shoulder} is optional
  • {shoulder} format: one or more alpha (from {alphabet}) followed by exactly one numeric (from {alphabet})

Once an {ARK} has been minted with a {shoulder}, there is no indication that the shoulder is actually a shoulder, versus just a random string of characters. Then we refer to the resulting [{shoulder}]{blade} as {shoulder-blade}.

{URL} is a URL.

{datastore} is a database, such as a SQL relational database.

{checksum-algorithm} takes as input a {NAAN}, {shoulder-blade}, and {alphabet}; and returns {checksum} (a single character from {alphabet}).

{alphabet} is an ordered list of alphanumeric characters.

Actions

Resolve

  • Given a valid {ARK}, find (the single, if any) associated {URL} in the {datastore}.

Find

  • Given a {URL}, find (any or all) associated (valid) {ARK}'s in the {datastore}.

Mint

  • Given a {URL}, generate a valid, random, unique {ARK} (given: {NAAN}, {shoulder}, {alphabet}, {blade-length}, and {checksum-algorithm}), and store them (linked together) in the {datastore}.

Parse

  • Given an arbitrary string, verify it is in correct {ARK} format, and get its {NAAN}, {shoulder-blade}, and {checksum}.

Validate

  • Given an {ARK} verify its {checksum} (using its associated {alphabet} and {checksum-algorithm}).

Notes

Parsing, analyzing, or changing {URL}'s is out of scope.

Recommended {alphabet}: bcdfghjkmnpqrstvwxz23456789

Trivial SQL datastore:

CREATE TABLE Ark (
    ark VARCHAR(256),
    url VARCHAR(2048)
)

where:

  • ark is the {ARK} (including the ark: label, therefore being a "Compact ARK"),
  • url is the {URL}.

Complete representation would also need these pieces of information, which would apply to a set of Ark rows:

  • Which {checksum-algorithm} was used to generate the {checksum}'s.
  • The {alphabet} used in minting the {ARK}'s.

ark-n2t's People

Contributors

cmosher01 avatar

Watchers

 avatar

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.