beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.86k stars 1.82k forks source link

API confusion #3537

Open waweic opened 4 years ago

waweic commented 4 years ago

I spent the last hours reading the documentation of the web plugin and discussions on the current state of the API. This confused me enough to decide to ask about the current state and the visions of the maintainers, which I am doing in this issue to hopefully clear things up a bit.

If I understood the conversations correctly, the only API for accessing the library is currently the API-part of the web-plugin and still the first web API that has been implemented in beets.

Later, the need for a more general and more widely adopted API was stated and development of aura began, as already existing APIs are more or less unsuited. Aura was decided to be really simple at first, similar to the web API, but apparently also extendable, which I did not find mentioned in the documententation, only in the discussion. Specification work on Aura seems to have stopped in a rather immature state, for example seemingly without a final decision whether to settle on GraphQL or on REST+json.

Are these observations correct?

I am somewhat interested in writing a new web frontend / making an already existing one compatible to beets, but I am unsure what to do. As for now, I see the following options:

This is why I would like to ask the maintainers what they would prefer me to do now. Is this an area that you would like to invest time in? Should I just minimize the effort and use the legacy approach? Is there maybe something on the Roadmap I have missed? I probably have to mention that my experience is rather limited and I am thus not confident with these things.

I would be glad to hear from you!

sampsyo commented 4 years ago

Hi, @waweic—thanks for the summary, and for starting this discussion!

Your recap is exactly right. We found ourselves outgrowing the ad hoc API that we invented for the web plugin, which was originally just kind of a one-off demo. We realized that we could be much more ambitious with an API that was actually designed to be an API rather than just an implementation detail—and that this API could go beyond beets itself. Hence Aura. And Aura had a promising start, but the truth is that I haven't been able to devote the time to it that it needs to be really complete.

I think any of the above options would be reasonable paths—the pragmatic option 1 makes sense just to get something done, but I would be super interested in working with a collaborator on some combination of 2 and 3 (the "actively participate" option). That is, I think the Aura spec as written is a probably a good foundation, but (a) it doesn't have a complete beets plugin implementation yet, and (b) as we implement it, we will undoubtedly find tweaks we want to make. If you're interested in forging ahead and helping Aura evolve, I would be thrilled to work together on it and accept any and all ideas about how to resolve any problems you discover.

waweic commented 4 years ago

Thanks for your answer, this sounds like something I could start investing some time into. Maybe I might start with implementing Aura on the Server side, helping it to work as the good idea that it is as a concept

sampsyo commented 4 years ago

Sounds great! Let me know if any questions come up.