drawpile / Drawpile

A collaborative drawing program
http://drawpile.net/
GNU General Public License v3.0
1.03k stars 130 forks source link

Project idea: The Peanut Gallery (and a call for participants) #400

Closed callaa closed 1 year ago

callaa commented 7 years ago

I've received many requests for features that would be useful for certain use cases, but which I feel wouldn't fit well into the application itself, such as music players or gaming related utilities. There are also some features that would be nice to have, like built-in live streaming, which would be difficult to implement.

So, I'm presenting an idea for a new project I'm calling "peanut gallery", that would provide a companion web site for a Drawpile session.

This site would serve two purposes:

Here's a rough mockup/wireframe (just a first draft, not a final design by any means):

peanut-gallery

Usage

The user goes to watch.drawpile.net and is presented with a list of Peanut Gallery enabled sessions. They select a session and enter a username. A password too, if the session is password protected. They are then logged in to the Peanut Gallery and can watch the live stream, comment in the chat box and use all the other features.

Note: the peanut gallery is a server specific feature. The one at watch.drawpile.net could only be used for sessions hosted on the public server. For other sessions, the person hosting the server must also host their own copy of the Peanut Gallery software.

Features for the first version:

Technical architecture

pg-architecture

The biggest architectural question right now is how the live stream feature should work. Possible approaches:

So far, the last option seems best. The live stream module has to be written in C++ so it can reuse the Drawpile paint engine. (Rewriting it in some other language while ensuring it works exactly the same would be a massive undertaking.)

Separating the livestreamer into its own process provides some extra safety and means the PG backend can be written in a more suitable language. (Also, I'm planning on creating a headless benchmark tool anyway, might as well make it a livestreamer while I'm at it.) It also makes it possible to support multiple protocol versions, by having different livestreamer modules for each one.

Another question is the livestream format. WebM is one possibility, but a simple custom format might not be a bad choice either.

For example, the format could be as simple as a stream of messages like this: {x, y, JPEG data}. Each message would paint the included JPEG image at the given coordinates. This would fit well with the way Drawpile works as, unlike video, most changes are either confined to small rectangles, or (more rarely) update the entire image. Occasionally, the livestreamer would send out an "I-frame" that repaints the whole screen so new users can catch up and any accumulated errors are cleaned out.

Call for participants

This project is a bit too big for me to handle alone, so to make it happen I need help. Specifically, I'm looking for:

After rewriting the listing server in Go, I feel the language would be suitable for this project, especially since goroutines and channels make it easy to work with web sockets.

KnicKnic commented 6 years ago

With QT & web assembly getting a little further along, you may want to consider that. http://blog.qt.io/blog/2018/05/22/qt-for-webassembly-examples/ . I am not up with web assembly (I do have a future project I want to tackle with it.) One big issue I know of is threading support https://github.com/WebAssembly/threads

askmeaboutlo0m commented 1 year ago

(I've taken over development on Drawpile, so I'm going through these tickets and organizing them.)

This project exists now in the form of drawdance-web: https://github.com/drawpile/Drawdance