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

Redirect efforts into Anki desktop "--syncserver" option? #113

Open
omarkohl opened this issue Nov 24, 2021 · 7 comments
Open

Redirect efforts into Anki desktop "--syncserver" option? #113

omarkohl opened this issue Nov 24, 2021 · 7 comments

Comments

@omarkohl
Copy link

Since Anki 2.1.41 (https://github.com/ankitects/anki/releases/tag/2.1.41) the Anki desktop application contains a "sync server" (--syncserver option).

Documentation: https://github.com/ankitects/anki/blob/main/docs/syncserver.md

Currently it does not support "media syncing", which is a major missing feature. https://forums.ankiweb.net/t/media-syncing-with-syncserver/15172

My question / suggestion is whether it makes sense to redirect effort that goes into this "anki-sync-server" into improving that Anki desktop feature.

@dobefore
Copy link
Contributor

dobefore commented Nov 24, 2021

This seems a little bit challenging. as they have different disign structure.
syncserver in ankitects use built-in sync APIs which vary according to anki versions and don't bring breaking changes
.While anki-sync-server doesnt,as ankisyncd only implement behaviours ankiweb server will do,As @AntonOfTheWoods said,

An API should be a black box, and we really shouldn't care how upstream implements something on the client - we just want the same result for Ankiweb.

that means it may bring breaking changes and need bug-fixing once pylib anki makes changes

And @dae also shed light on this https://forums.ankiweb.net/t/custom-anki-server-ios/7011/4?u=ankibaby

@omarkohl
Copy link
Author

I don't understand what you are trying to say. The purpose of "anki-sync-server" is to provide a server API with which you can synchronize different clients (Anki desktop, Ankidroid, ...), correct? If Anki desktop includes such a feature (syncserver) then having a separate project is unnecessary and what is more, since it will be built in, it won't break compatibility with itself.

What I am suggesting is redirecting the development effort that would go into the current project "anki-sync-server" into making the Anki desktop syncserver better instead.

@VikashKothary
Copy link
Member

VikashKothary commented Dec 5, 2021

If I understand correctly, is what you're saying that since Anki now includes a sync server to sync between different clients, this project is now redundant. As you see it, it makes more time to push developers from this project to the new sync server hence this issue?

I can see where you're coming from. Here's my 2 cent. This community is here to support developers who wish to create and maintain projects in the Anki ecosystem. I personally have no opinion on which these projects will be and am here to help anyone who reached out. Therefore I plan to continue to support this project and others like it while we receive contributions. I believe this is important because from what I can see, a lot of users use this sync server as part of their Anki experience.

That being said, if the community wishes to help support the development of this new sync server, then I'm happy to support in any way I can. Maybe it'll be worth documenting this existence of the new sync server in the wiki? Or maybe you could collaborate with other members in our fork to see how you can contribute.

Finally, I want to end with that the acknowledgement that this new server doesn't make this current ones redundant. There are many reasons why users would still choose this server over the new Anki one. Some may be: it doesn't support media-syncing, it's very new and considerably less battletested, it's likely considerably larger due to including the full AnkiDesktop application, it's got a much higher barrier to entry, etc. I know I myself am going to need a full REST API (see Djankiserv) as part of my sync server as such probably won't be making the switch any time soon.

Does this make sense? What are your thoughts?

@dobefore
Copy link
Contributor

dobefore commented Dec 6, 2021

it's likely considerably larger due to including the full AnkiDesktop application,

there may be another way that is not that large by installing python module anki with pip as syncserver is intergrated into it.

Even though snycserver in ankitects may not bring breaking changes with anki' update,I prefer to use a currently valid server rather than switch to a new one whicn must need more efforts.If someone takes the lead and finishes basic functions a server will have ,then I'm willing to help if issues occur.

And appreciate @VikashKothary and other early-day contributors' work,due to their efforts,we can continue to develop.

@omarkohl
Copy link
Author

omarkohl commented Dec 6, 2021

This community is here to support developers who wish to create and maintain projects in the Anki ecosystem.

That's fantastic and it's people like this who contribute their time and energy what makes open source such a wonderful thing!

I want to end with that the acknowledgement that this new server doesn't make this current ones redundant

I agree that right now you are absolutely right, in particular because of two things a) without media syncing "anki --syncserver" is not at all usable in my opinion and b) it's new and therefore untested, so it could contain a large number of severe bugs.

That being said, the fact that upstream Anki is finally embracing including a "syncserver", which is something people have been asking for for years is a huge opportunity! Everyone who installs Anki would automatically have a syncserver at their fingertips (even though I fully realize only a tiny subset of those users would ever need it). Just for this simple fact the user- (and therefore tester-) base is by one or several orders of magnitude bigger. It would be fantastic if the people who have the knowledge, time and energy to help could rally around the feature to make this possible. In the end what we (the people reading this ticket and contributing to anky-sync-server) is having a stable way of syncing Anki with our devices, don't we?

Maybe it'll be worth documenting this existence of the new sync server in the wiki?

That would be great!

I know I myself am going to need a full REST API (see Djankiserv) as part of my sync server

That is totally understandable and for people who need these kinds of feature separate projects definitely make sense. For someone like me statements like these "This is alpha software with some occasional data loss bugs" are just too scary to even try 😉 plus I don't need those feature, I just want to avoid using Ankiweb. "anki-sync-server" also never tried to be more than a simple sync server as far as I could tell.

If someone takes the lead and finishes basic functions a server will have ,then I'm willing to help if issues occur.

That's good to hear! I don't have any say in any of the projects, I'm just trying to build a bridge for the purely selfish reason of wanting a good sync server for myself 🙂. Maybe you already have the knowledge required to implement the "media syncing"? Damien Elmes wrote that it would still take a few months until it's implemented, but maybe if someone helps...

@VikashKothary
Copy link
Member

I apologise for the delay.

Could you reach out and help us understand what is needed? I'd be happy to assist of the effort if our visions are in-line. But improving the stability of our current offerings is at the forefront of my priorities.

And regarding the rest of your comments:

That being said, the fact that upstream Anki is finally embracing including a "syncserver", which is something people have been asking for for years is a huge opportunity!
In the end what we (the people reading this ticket and contributing to anki-sync-server) is having a stable way of syncing Anki with our devices, don't we?

100%. I remember when it was said that it would never become a reality. I'm glad he changed his mind. It actually bodes well for us as well because hopefully it will mean a more stable internal design which would make our lives a lot easier.

For someone like me statements like these "This is alpha software with some occasional data loss bugs" are just too scary to even try

I'm sorry about that. I'll try and look into that issue. I understand how important stability is when it comes to our data and it is my number 1 priority right now.

I just want to avoid using Ankiweb.
"anki-sync-server" also never tried to be more than a simple sync server as far as I could tell.

Anki-sync-server originally started out as an API server, but due to the maintainable effort was reduced to what you see now. But I think that's a good thing because that was the core feature that most our users wanted and that's not going to change. Hopefully it should just get faster, safer and more stable.

But we also have users who want to build integrations on top of Anki but are unable to do so. This is because, in the past, Damien has been against implementing an API server. This is why we have the anki-api-server. Which is new but we hope to develop further.

So if we can align ourselves with Damien, then that's great. Otherwise we'll continue to support the developers in our community with all things Anki.

@dobefore
Copy link
Contributor

@omarkohl , the author of Anki project has implemented a full sync server,thus including media syncing. details see https://docs.ankiweb.net/sync-server.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants