Bricodash/Future

From Hack Manhattan Wiki

See: Bricodash for project details

Current Tasks Outstanding

Performance and Maintenance

Fixes

  • fix early voting -- comma not second plus sign
  • resolve v3/events/search failure (email reply from Eventbrite API team 22 Oct: solution being explored)
  • explore having bricodash spawn in new tab then close old tab -- to force GC of JS code snippets

Repository

  • recreate repository as non-fork
  • readme link to defaultcast
  • research and select a code of conduct
  • flesh out issues linking to project plan

Long Overdue Calendarical Overhaul

Reverse Engineer FCNA/ECFR Calculations

  • relearn trigonometry
  • refactor astronomical month calculations to new repository
  • see if we can solve sunrise (sunset) equation for pair(?) of latitudes on a given meridian (at a given datetime)
  • see if any altitude delta patterns are apparent with coarse (non-continuous) iteration over enlongation-bounded datetime range
  • work out if we can iteratively narrow down latitude pairs to solve for altitude deltas within intersecting sunsets
  • determine how elevation complicates all of this (i.e., intersecting sunset clusters rather than intersecting sunsets)
  • examine if there's a solution for westward obstructions (e.g. mountain ranges) in determining sunsets
  • explore performance gains of reimplementing search traversal via elixir calls to python calculations

Islamic Calendar

  • refactor islamic calendarical library to new repository
  • incorporate for astronomical calculation as used by some in North America
  • confirm safe astimezone use (not erroneously masking local time as UTC)
  • refactor to combine observational and astronomical date sets
  • add Eid al-Adha to calendar

Hindu Calendar

  • refactor hindu calendrical library to new repository
  • new module to calculate enumerations of tithi for a given month
  • new module to calculate enumerations of months for a given year (rather than lisp ordinal month)
  • reimplement lisp functions for hindu calendar in python3

Calendrical Umbrella

  • spin off jewish calendarical library as dedicated project
  • spin off master festivals project for drawing together specific calendars

BindSight :2020

See also: BindSight project page

Concurrent, extensible, frame-scrubbing webcam gateway.

Web API service to stream doorcam and spacecam to Bricodash and public gateway, respectively, while tracking activity and performance of these and other webcams at the space. Will be more efficient and reliable than spawning PHP and Python processes on an as-they-come basis.

Written in Elixir, will be taking advantage of various new features of the language, building on the strengths of Erlang/OTP, including Mint (web client), GenStage (backpressure event pipelines) and ultimately mix release (build-time deployment packaging).

Fault Tolerance

  • refactor spigot as behaviour
  • insert exit monitor into children
  • exit monitor crashes on exit received; supervisor strategy of rest_on_one
  • webapi exit monitor reconnects to new spew and keeps running

Refactoring

  • no reason to split on doubledash
  • reconfigure profile to run when profile_seconds > 0
  • refactor adhere/hold to own Adhere genstage
  • rebalance chunk load to other genstages
  • digest: refactor handle_events/3 case statement to function clauses
  • digest: drop EOL determination
  • digest: refactor further if possible

Error Recovery

  • deferred spigot spinup in event camera offline at startlink
  • fix EOL check to verify in case of dropped bytes
  • test logging on down camera
  • don't nag when connection down (periodic warn)
  • ensure recovery when source stream fails

Validation

  • review whether batch requires task
  • consumer-producer in spew to filter out :corrupt/:greytoss/fail messages
  • retool Validate stage to send tuple {:ok, binary} or {_status, binary}
  • retool Digest stage to sent tuple {:ok, binary} or {:fail, error}
  • retool polling functions to send tuple {:fail, error} when such occur
  • consumer-producer in slurp to introduce :corrupt/:greytoss on :test stream

Deep Validation

  • implement greytoss checking
  • replace async batching with task/agent batching, for JIT evaluation
  • watermark with source timestamp
  • configurable agpl watermark
  • provide for timeout watermarking

Advanced

  • review supervision tree for batch tasks & agents
  • review memory usage to mitigate ProcBin leaks
  • integrate certificate used by Apache
  • configure to launch as daemon
  • bootstrap to obtain dependencies and compile cold

Robustness

  • type guards on get_env
  • @impl on all OTP callbacks
  • type guards all public functions
  • type checks on unstructured opts
  • typespecs and dialyze throughout

Subsystem Integration

  • slurp snoop to track performance on each camera
  • slurp snoop to webhook on corruption/timeouts
  • spew snoop to swap out CGI for upt/chk touch points
  • spew snoop to track client fps performance

Sousveillance Integration

  • spew snoop to swap out PHP for sous veil touch points
  • distributed sous veil client for cross-platform data exchange
  • integration with sousveillance watch-back system

Wrap-up

  • add robots.txt route
  • configure public ipcam as :test
  • flesh out documentation
  • investigate periodic multi-hit events: server severing connections prematurely? badly behaved client device?
  • investigate specific issue of pishop launch causing multi-hit failures on all other clients
  • stress test
  • explore sobelow security checking

Webhook Notifications

Javascript client-side triggers to deliver messages to our Slack channels to provide alerts when the camera feed or client devices stall.

  • migrate sleep macro to general purpose library
  • migrate from webhooks integration to webhooks feature of bricodash app (and update notice)
  • server-side webhook on stall of any given device
  • when wonkiness addressed: downthrottle chromecast reboots to 1x per day; stream swap-in to never

Server

Standardize Web server setup and fully integrate BindSight.

  • migrate to standard web port (now that relayd installed on router)
  • configure X-Forwarded-For logging in apache
  • enable SSL for camera feeds (requested for full conversion to new sous veil system)
  • enable SSL directly via daemon's listening port (i.e., elixir rather than apache)
  • transfer slackbot snapshots to bricolage gateway

Documentation

Flesh out project documentation—after fixing existing problems with our Mediawiki server.

  • recent edits monitor to trigger cache purge on transcluded Bricodash documentation updates
  • help get mediawiki server 504 issues resolved (currently an obstacle to Bricodash documentation)
  • broach discussion of absent Copyrights page on Wiki -- do we want to adopt a license??
  • redraft lists in calendar sections as tables
  • flesh out Bricodash Future Ideas, explaining known requirements for each

Cloud Log

Incorporate remaining sources into rolling update log shown in lower left-hand corner.

User Repositories

  • refactor cloud/github to abstract away github/gitlab/etc
  • allow more than most recent pushed repository to be shown
  • add boxrs-based git repositories to Cloud Log panel

Other Cloud Services

  • Mediawiki — pending new account requests
  • Zendesk — count of unread/open inquiries
  • Status updates on donations: Patreon, Paypal, Amazon Smile...
  • write up requirements for Instagram Integration
  • write up requirements for Twitter Integration

Retire IFFF Wiki Updates

  • bot to post daily cloud log update to #general on our slack

Calendars

Incorporate additional calculated and externally sourced calendar events.

Fixes

  • almanac alt for almanac events
  • add enum of event sources for sorting priority (when same start time)
  • move HM anniversary dates to special .cal that takes precedence on HM calendar (and also appears on NYC)
  • swap out icalendar (buggy repetition exception handling) in favor of true API

Calculation

  • new module to calculate hindu lunar tithi => closing muhurat => solar day
  • revise diwali/deepawali calculation using tithi rather than lisp library approximations
  • correctly calculate dates of International Astronomy Day (email out to Astronomical League for better calculation rules)
  • calculate dates of Manhattanhenge (email out to library of American Museum of Natural History for formula)
  • add eclipses and other significant astronomical events to holidays
  • finish fleshing out remainder of movable feasts for Community Calendar (June 2019 forward)

Integration

  • use google search to find Offside Tavern Meetup events
  • add placeholder events for non-Meetup Offside Tavern events
  • refactor brite search by location routine to common library
  • add nyc mesh, nyc resistor, fat cat fab lab, makerbar, makerspace nyc (SI), futureworks (BK/SI), genspace to Community Calendar
  • also add grow with google (if still in NYC), 2600, Off the Hook (if still broadcasting), blick, michaels, local library branches, makerish meetup events, NYC street fairs
  • bot to post RSVPs for upcoming events to Slack

Advanced

  • revise #thehaps formatting to provide headers per day
  • embed hotlinks in #thehaps channel event listings
  • concise calendar response for interactive slackbot
  • auto-capture of #thehaps posted events to Bricodash/Extra:Calendar
  • automation/streamlining tools for cross-posting HM Meetup events to Spingo
  • enable toggling between Welcome header and holiday greetings ^

Cleanup

Remaining features and code maintenance before calling it a major release.

  • integrate citymapper API for local subway stations
  • refactor source files from initial launch
  • find owners to adopt data sourcing projects that require more than passive API calls (see sections below)
  • squish and push fork to upstream

Upgrades

Once built, streamline and rewrite as a truly beautiful application.

  • migrate from bricolage to less power-hungry hardware
  • combined community slack calendar to wiki page (requires privacy policy under brite license)
  • reimplement bricolage to run as embedded system under elixir/scenic/nerves
  • import python directly using beamparticle

Sub-Projects Needing Owners

The projects below require an investment of time—such as active coordination with an API's owners—to be implemented, but would provide meaningful improvements to the overall feature-set of Bricodash if completed.

At some point the description for each will be fleshed out to provide a full functional specification, together with an exploration of the requirements to move forward. For now, capsule bullet points serve as place holders. For more information, touch base with User:Beadsland.

Instagram Integration

  • add Instagram to Weird Photos and HM Cloud Log — this requires creating pages on Facebook under the new Graph API

Twitter Integration

  • add Twitter to Weird Photos and HM Cloud Log — this requires emailing to get a dev account, then honoring Twitter's Display Requirements

Slack Calendar Response Bot

  • interactive bot response to "What's happening?"

Draft a Privacy Policy

  • draft privacy policy (per API reqs for public sites)

Buzzer-Activated IR Remote

Additionally, there are plans to tie a ceiling-mounted IR remote into the intercom buzzer to toggle inputs on the TV. The idea would be that when the buzzer sounds, the remote would switch from the dashboard (on Chromecast) to a dedicated full screen camera input. After a delay the input would be toggled back to the Chromecast-hosted dashboard. Such an arrangement would free up the dashboard screen real-estate currently devoted to an around-the-clock camera feed—as, realistically, the only time one needs a camera feed is when a visitor is buzzing to be let in.

Alternatively, the buzzer-activated full-screen display of the door camera might be implemented by conveying the door buzzer signal to the back-end server on bricolage, which could then trigger the full-screen effect on the dashboard. However, the potential latency of such a configuration, coupled with processing power limitations of the Chromecast, make this a less attractive option. Well, that, and why do with software what you can do by cannibalizing an old remote control?

  • integrate with custom buzzer-activated IR remote hack