Skip to content

Commit

Permalink
Added stubs for api_queue and community2
Browse files Browse the repository at this point in the history
Let the rewrite commence!
  • Loading branch information
calaldees committed Mar 14, 2022
1 parent dba281a commit 3583c5b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
59 changes: 59 additions & 0 deletions api_queue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
api_queue
=========

* no database
* Redis datastore for queues.
* (no need to have any info/coupling about tracks)
* sqlite3 for community login tokens?



* asgi
* [aiopyramid](https://aiopyramid.readthedocs.io/index.html)
* [pyramid asgi](https://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/deployment/asgi.html)
* mqtt
* [aiormq](https://github.com/mosquito/aiormq) - Pure python AMQP 0.9.1 asynchronous client library
* [paho-mqtt](https://pypi.org/project/paho-mqtt/) - MQTT version 5.0/3.1.1 client class
* redis
* [redis-py](https://github.com/redis/redis-py) - aoi?


queue datamodel
---------------

Don't need JSON - newline text? split? No need for field names? `test/csv` records? (no heading?)
```
QUEUE_KEY: [
{
"track_id": "BASE64HASH",
"performer_name": 'str',
"session_owner": '',
"weight": float,
}
"timestamp_play": int,
]
```

api
---

* queue
* new
* new queue (demo - 10 tracks?)
* new queue (transient)
* new named queue (admin)
* get_settings
* set_settings (admin)
* queue limit model (priority token or points)
* del queue
* get_tracks
* redirect to static track_datafile from hash of filter_tags
* queue_items operations
* get (only used for testing - this is pushed to mosquito)
* add (limit owner or admin)
* No validation of track_id
* del (owner or admin only)
* update (admin)
* (weight, timestamp_play)
* root
* queues (admin)
6 changes: 6 additions & 0 deletions community2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Community2
==========

Placeholder
Used to be part of website - now can load track.json and api_queue in single page webapp

0 comments on commit 3583c5b

Please sign in to comment.