Giter VIP home page Giter VIP logo

yaps's Introduction

yaps

yaps (yet another playout system) is a server that tries to implement the list and mux Bifrost roles in one program.

Less technically, it handles playlists for n playd servers.

yaps's People

Contributors

dincahill avatar mattwindsor91 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

dincahill

yaps's Issues

Generalise controller and Bifrost logic

Eventually, much of the logic currently in list/controller.go and list/bifrost.go will be applicable to other bits of the server, such as the multiplexer. There's nothing particularly tying much of it to working with lists.

Obviously, we don't want to generalise too fast too soon, but it makes sense to think about doing so in the future.

Text items should not be selectable

Selection is how we tell the connected player which track to load. It makes no sense for a text item to be selectable, so we should disallow it.

This needs two changes:

  • Stop the user from manually selecting a text item
  • Stop autoselect from selecting a text item (it should just skip right over it)

Graceful shutdown

Currently, when someone presses Ctrl-C in the baps3d console, it exits the program's main function without waiting for the controller etc. to shut down gracefully. This is not ideal =p

Plumb in better error handling

We're using fmt.Errorf for errors, which is bad for the following two reasons:

  • For errors we're going to send back to the client as Bifrost messages, we can't tell whether it's a problem with the message (ACK WHAT) or our internal state (ACK FAIL);
  • Really, the errors should be more structured, and should be converted to Bifrost-friendly format by the Bifrost handling logic for each part of the server.

This is an open question, since there are eleventy zillion different ways to handle errors in Go. Does anyone have any suggestions?

At the least, I'm thinking of just having an error type, and maybe a Blameable interface that lets us decide whether it's a what or a fail.

Add list controller requests for loading items

For baps3d to handle BAPS3 lists, it actually needs to support load requests in the list controller.
list.List already has a method Add that does most of the legwork---this is mostly just connecting it up to the controller logic.

  • Handle file load floadl index hash path
    • Add request into list/requests.go
    • Add handler into handleRequest etc. in list/controller.go using c.list as the List
    • Add Bifrost message marshalling logic into list/bifrost.go
  • Handle text load tloadl index hash contents
    • Add request into list/requests.go
    • Add handler into handleRequest etc. in list/controller.go using c.list as the List
    • Add Bifrost message marshalling logic into list/bifrost.go

The baps3 spec is incomplete with regards to file and text loads, so that could do with updating. Off the top of my head, what the server should do is:

  1. If the given hash is already being used, return an error (should be an ACK WHAT response, just return the error inside the AckResponse for now);
  2. We insert above the given index, so if the index isn't in the range 0...len(list) then return an error;
  3. Insert the item;
  4. Broadcast FLOADL (or TLOADL) index hash contents---these responses already exist for handling dump requests;
  5. Broadcast COUNTL new-list-count---this response also already exists.

Rename project

This is no longer the official URY BAPS3 project, though at the moment I still intend to work on it in my spare time.

A new name that doesn't refer to BAPS would be nice.

Add Bifrost TCP server

baps3d currently only communicates to stdin through a console readline. Obviously, it'll need to talk to Bifrost clients on TCP, but we haven't implemented that yet.

Much of the same logic the console currently uses will help in making the TCP server. What will need to be worked out is the best way of handling multiple clients---the controller has half-implemented support for multiple clients but this is more so that it can have the console, TCP server, and eventually downstream player attached.

TCP servers are the bread and butter of Go, so there should be some good examples in the wild of how to do them.

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.