Code Monkey home page Code Monkey logo

atlas's Introduction

ATLAS (Authority on The Locations of ARENA Stuff)

ATLAS will be like an aggregation of maps of major roadways. We intend that by using ATLAS, one can find any ARENA, though the details of scenes and processes we believe will be handled by other systems. The most typical usage of ATLAS would be to find an ARENA near one's own geo-location.

Usage

Install MongoDB

Comprehensive reference: https://docs.mongodb.com/manual/administration/install-community/ Note: enterprise level mongodb is not necessary.

For a Mac w Brew: brew install [email protected]

Start MongoDB server

On Mac:

mongod -f /usr/local/etc/mongod.conf &

"&" is for starting in separate process from terminal.

Install redis

For a Mac w Brew: brew install redis

For Windows, see: https://redislabs.com/blog/redis-on-windows-10/

Start redis

redis-server /usr/local/etc/redis.conf

Install web app dependencies

cd atlas-web-app/

npm install

Start web app

ATLAS is a Sails web app. See README.md in atlas-web-app/ for some more info and links about Sails.

cd atlas-web-app/

sails lift #note: you will need to npm install node modules if this is your first run

Populate test data

Currently, I am still populating my own test data each time. Please see https://github.com/conix-center/ATLAS/blob/master/atlas-web-app/api/models/Record.js for the structure of an ATLAS record. Sails auto-gens a RESTful API from that Record.js file. The default routes work fine for us right now, but could use more syntactic sugga:

https://sailsjs.com/documentation/concepts/blueprints?blueprint-routes

For us, with this web app started in dev mode, adding a record via default routes looks like this in a browser navbar:

localhost:1337/record/create?uuid=deadbeef

See test data

Similarly, to see what we just created, we would put the following in the navbar:

http://localhost:1337/record/

The ATLAS-DNS Analogy

ATLAS is to ARENA as DNS is to the Internet

Well-captured points of this analogy:

  • Both ATLAS and DNS are authorities on critical attributes of networked devices
  • Both ATLAS and DNS require manual entry for some subset of ground truth
  • Both ATLAS and DNS (well, future versions of ATLAS) are hierarchical, and can be traversed simply via recursion

Uncaptured points with the ATLAS-DNS analogy:

  • DNS adds 1 layer of abstraction for usability (textual domain name mapped to IP address)
  • However, ATLAS is probably going to do much more than a simple 1-to-1 mapping (talk of generating id's, even just performing geospatial calculations to find MQTT servers within n miles is astronomically more compute than DNS)

Design Doc (WIP)

https://docs.google.com/presentation/d/1dc1RdlGROBYj1zIoPR8HX_RBIKn8-KRmNZscXVrdIs0/edit#slide=id.p

Design Decisions

These conclusions we have reached by collaboration and consensus, but are not quite "written in stone" yet.

  • ATLAS server will implement a RESTful API (viz. pass documents, not rely on saved server or client state, etc.)
  • Luke will write server in Node.js
    • I (Luke) like learning new languages
    • Node.js comes with very handy modules for web server sorts of things

atlas's People

Contributors

dependabot[bot] avatar hi-liang avatar mwfarb avatar riebling avatar

Stargazers

 avatar  avatar

Watchers

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

Forkers

syreal17 mwfarb

atlas's Issues

Investigate ability to arbitrarily add fields to db storage

[
  {
    "ele": "abc",
    "createdAt": 1573675693644,
    "updatedAt": 1573675693644,
    "id": "5dcc62ad019645e3f38356b9",
    "uuid": "5313d3b1-6e86-40c1-bba3-d5a28a5ea89e",
    "lat": 1,
    "lon": 2,
    "elev": 0,
    "url": "ltsyrealjones.com"
  }
]

This is data that has persisted across web server restarts in spite of having a field ele that is not even in the Model (Record.js). This was found while testing validation and is related to #2. Many other fields are present in the db storage as well that are autogenerated (createAt, updatedAt, id) however, I did not expect that incorrect fields like ele would make it all the way to the db and persist...

  • Perhaps looser constraints are on the db in dev mode?

Write server-side pagination with chained fetch promises

There are advantages to the current method of doing this:

  • Download copy of records from server and cache. Paginate from this copy.

However, handling server side will be better in the long run, if we can avoid some pitfalls like someone else adding Records strangely displacing current slice of Records.

Work on cohesion of website footer

Right now, footer is a decent placeholder. Probably have less GH buttons, and introduce some catchall buttons: def: the most usual use cases for the website (in case someone gets to the bottom but doesn't see what they want)

Develop test battery for Atlas web app

  • Investigate possible Sails resources for this
  • Investigate usual ways to test websites
    • dm/ih might know this already
    • google-fu
  • using curl in a shell script would be technically feasible

Decompress navbar expansion

Navbar waits to extend until it is very large, which leaves huge unused margin by the time that it does expand.

  • Might be based on a larger viewport than needed for full navbar expansion...

Reversal of geo lookup collision mechanics

ATLAS now functions such that ARENA Scenes are geometric points and the ARENA user has a search radius, effectively making them a geometric circle. Basically, this logically needs to be reversed: ARENA Scenes having a 2D area and users being points. The user search query would then be: "What ARENA Scenes am already intersecting?" versus previously: "What ARENA Scenes are within n km of me?"

^ Decent paraphrase, @anthonyrowe ?

Automate manual test of `create-record-form.ejs` input validation

Currently testing algorithm is:

  1. Nav to atlas/create-record-form
  2. Submit form without any input
  • Expect HTML pop-up prompting for input in UUID
  1. Go back
  2. Fill out all fields with 'abc'
  3. Submit form
  • Expect failure due to malformed UUID
  1. Go back
  2. Input valid UUID
  3. Submit form
  • Expect failure due to malformed URL
  1. [repeat for each field]

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.