Giter Site home page Giter Site logo

hub's Introduction

hub's People

Contributors

dansup avatar kpcyrd avatar wfleurant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hub's Issues

Fix Request::ip() ipv6 padding.

I noticed that some webservers remove padding on ipv6, which causes issues as the model primary key is the fully padded ipv6 (39 chars).

As a result I created a custom Req(uest) class in \App\Hub that extends the Illuminate Request Facade so we can pad ipv6 at the source.

Most controllers are using the new Req, however the maps still need to be fixed.

Kernel Cron Default Options

Artisan Console Scheduling is an essential component of Hub that allows periodic collection of hyperboria network data using the cjdns admin api.

There are two primary jobs:

  • Routing Table Dump
  • Peer/Ping Collection

Question: What do you think would be the optimal frequency of running the task ? (ex: Every 10 Minutes, once daily, ect)

core.inc.php - bracket

Line ~1039 of core.inc.php, you can see there is a missing bracket after the else clause.. correct me if i am wrong but if there are no brackets, the immediate next line of code should be executed and the logic ends. The subsequent code below should be executed regardless of result from the conditional.

  if(strlen(htmlentities($messageArray['subject'])) > 60)
    {
        $subject_shortened = substr(htmlentities($messageArray['subject']), 0,38);
        $this->subject_short = $subject_shortened;
    }
    else
        $this->subject_short = htmlentities($messageArray['subject']);
    $this->body = htmlentities($messageArray['body']);
    $this->sender_ip = uid2Addr($messageArray['sender']);
    $this->sender_name = uid2Username($messageArray['sender']);
    $msg_sender = unserialize($messageArray['sender']);
    $this->sender_ip = $msg_sender['ip'];
    $this->sender_name = uid2Username($msg_sender['uid']);
    return $messageArray;

Make app.css cacheable

Currently it seems appends a dynamic timestamp: GET http://hub.hyperboria.net/assets/prod/app.css?v=1425004391

Fix hardcoded refs

A lot of required_once files are hardcoded, need to remove any hardcoded references

Add Licence

We need to pick a suitable licence for Hub, I'm leaning towards GPL or MIT, though I have to discuss this with my partner in crime, @wfleurant.

IPv6 vs Public Key Primary Key

Hub previously used the cjdns ipv6 as the primary identifier (urls, routes) and the table primary key. While this worked, in theory it is possible for two unique public keys to produce the same ipv6 (very unlikely odds), I decided to address this issue now rather than it arise in the future as a bug.

A small change is the upcoming release affects the node migration, model and controller.

Use Node::whereAddr($ip)->firstOrFail() or get() instead of Node::findOrFail($ip).

Finish Node/User Authentication

Hub auth/sessions are a bit diferent than typical implementations.

First off, their are two authentication sources Nodes and Users. Node auth only has one state, logged in. If you are browsing hub, your nodes session is determined by your ipv6 address (unless active user session). A node cannot logout, change its primarykey or delete itself, just associated info.

That leaves the User auth, which is an optional feature for people with more than one node to associate multiple nodes, and use a specific node identity from any node.

I am almost done implementing User auth.

Store Cjdns Api Data

Hub needs to store the cjdns admin api data. Using an event model, specific api calls can be emitted and processed (api call + store and optional callback). This issue will track this fundamental feature.

Map Graph Node/Edge

Currently the map loads Edges using a simple 'LIMIT 1000', which is inefficent and can load duplicate edges w/ different timestamps and some nodes edges arent even loaded.

Solution: lazy load chunked results from api

Short term: use DISTINCT on the peer_key and origin_ip column

Long term: use distinct w/ time ranges (that match node time range) for map timeslider feature

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.