Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffold Application Server #1

Open
harveysanders opened this issue Jul 20, 2022 · 8 comments
Open

Scaffold Application Server #1

harveysanders opened this issue Jul 20, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@harveysanders
Copy link
Collaborator

We'll need to scaffold out an initial application server. Let's list/discuss the MVP specs here.

Routes

Frontend Static assets

  • GET /
  • Serves the assets (JS, HTML, CSS, etc) to run the frontend application

REST endpoints [TODO]

  • Routes: [GET, POST, PUT, DELETE] /api/:apiVersion/:resource
  • Any necessary CRUD operations
    • Creating a new Jam Session
    • TODO more resources

Websocket services

  • GET ws://[appRoot]/ws

Jam Session MIDI communication

  • GET /ws/jam/:sessionId
    This endpoint is used for transmitting MIDI and other Jam Session-specific messages between musicians

WebRTC Signalling Service

  • GET /ws/signal/:sessionId
    This service handles signaling to initialize WebRTC connections between peers in a specific Jam Session
@pmoieni pmoieni added the enhancement New feature or request label Jul 28, 2022
@adoublef
Copy link
Contributor

looking at the scaffold branch, there is quite a lot of things going on, do we have a place that explains the decisions made and some of the files used? Just so its easier on people that are new or less experience with such tech

@pmoieni
Copy link
Contributor

pmoieni commented Jul 31, 2022

@adoublef those files are just some boilerplate code for the server. No worries I'll add some comments to describe the process better. It doesn't have anything to do with the main goal of the project.
And also don't mind the files inside ent folder. It's just a user database schema with some info about the user. Like email username and role.
It'll be used for authentication process and user sign up.

@adoublef
Copy link
Contributor

As well documenting how the schema was generated. The ent directory seem to be all auto-gen files so knowing where those started from makes it clearer as to why that package was chosen

@pmoieni pmoieni mentioned this issue Aug 3, 2022
5 tasks
pmoieni pushed a commit that referenced this issue Aug 3, 2022
Add gh actions for golangci-lint skeleton
@pmoieni pmoieni mentioned this issue Aug 3, 2022
5 tasks
@hansvb
Copy link

hansvb commented Aug 3, 2022

For v0.0.1 I would propose to keep it extremely minimalistic:

  • no sessions (just one big session)
  • no database or users
  • a /-route that serves as a kind of admin-page (showing all current connections and latencies) and with a JOIN-button that points to /jscli, hence this is also some kind of client but more focused on the overview
  • a /jscli-route that serves a minimal browser-client where users can do something musical
  • a /ws-route for our own rapidmidiex-ws-protocol

Thus only a websocket-based protocol v0.0.1 which can be upgraded later.

I wouldn't spend too much time on MIDI-compatibility for v0.0.1. Just a simple noteOn/noteOff in a json-websocket-text-message and some ping/pong (or similar) for latency-measurement. So a very minimal rapidmidiex-ws-protocol v0.0.1.

And maybe a few more different v0.0.1-clients as well.

┌─────────────────────┐
│                     │
│ rapidmidiex-tuicli  │
│       v0.0.1        │───────┐
│                     │       │
└─────────────────────┘       │
┌─────────────────────┐       │
│                     │       │
│ rapidmidiex-testcli │       │
│       v0.0.1        ├───────┤
│                     │       │
└─────────────────────┘       │        ┌──────────────────────────┐          ┌───────────────────┐
┌─────────────────────┐       │        │                          │          │                   │
│                     │       ├───────▶│ rapidmidiex-ws-protocol  │─────────▶│  rapidmidiex-srv  │
│  rapidmidiex-jscli  │       │        │          v0.0.1          │          │      v0.0.1       │
│       v0.0.1        │───────┤        │                          │          │                   │
│                     │       │        └──────────────────────────┘          └───────────────────┘
└─────────────────────┘       │
┌─────────────────────┐       │
│                     │       │
│ rapidmidiex-elmcli  │       │
│       v0.0.1        │───────┘
│                     │
└─────────────────────┘

@adoublef
Copy link
Contributor

adoublef commented Aug 3, 2022

I presume admin page is only for us right?

@hansvb
Copy link

hansvb commented Aug 3, 2022

For v0.0.1 I wouldn't bother with a real admin-page (that can kick clients or whatever functionality that is supposed to have?). Just a general free-for-all-overview-start-page with some buttons for the different clients than can be used. And it would be nice to see who is already connected with what client and what latency and/or other stats like how long the client is already connected, how many notes have been played, ...

@adoublef
Copy link
Contributor

adoublef commented Aug 3, 2022

ah that makes sense, could you explain what tui and elm are for? I presume terminal and Elm respectively right?

adoublef added a commit that referenced this issue Aug 3, 2022
@adoublef adoublef mentioned this issue Aug 3, 2022
11 tasks
adoublef added a commit that referenced this issue Aug 3, 2022
@hansvb
Copy link

hansvb commented Aug 4, 2022

For v0.0.1 I would propose to add as many client's as people want to work on. If a client is not ready, it can be moved to the next release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants