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

Reduce load spikes (load balancer addon) #2943

Closed
hssm opened this issue Jul 28, 2015 · 22 comments
Closed

Reduce load spikes (load balancer addon) #2943

hssm opened this issue Jul 28, 2015 · 22 comments

Comments

@hssm
Copy link
Member

hssm commented Jul 28, 2015

Originally reported on Google Code with ID 2046

Please, consider implementing load balancer addon: https://ankiweb.net/shared/info/1417170896.

Author's description: "Checks amount of cards due and average ease of cards in ±X days
of intended due date and schedules accordingly." It is a tool which has great potential
to reduce daily load and improve learning performance. It takes into account due reviews
and average easiness factors in order to smooth/reduce daily load.

Reported by useranki on 2014-03-28 11:47:04

@hssm
Copy link
Member Author

hssm commented Jul 28, 2015

Issue 2047 has been merged into this issue.

Reported by perceptualchaos2 on 2014-04-02 15:07:26

@hssm
Copy link
Member Author

hssm commented Jul 28, 2015

Issue 2152 has been merged into this issue.

Reported by perceptualchaos2 on 2014-09-25 10:58:53

@hssm
Copy link
Member Author

hssm commented Jul 28, 2015

In the tracker for Bug #2152 Jake Probst mentions that he has already implemented the
feature in an Ankidroid fork:
https://github.com/jakeprobst/Anki-Android

Reported by dotancohen on 2014-09-30 18:44:59

@hssm
Copy link
Member Author

hssm commented Jul 28, 2015

Will the anki droid fork with the load balancer be merged with the main branch? It is
a very useful add on to spread the load intelligently.

Reported by yarinkel on 2014-11-05 16:06:35

@hssm
Copy link
Member Author

hssm commented Jul 28, 2015

Probably not... but if he can reactor it into a hook then it should be compatible in
the plugin architecture we intend to make, where users can can install modules  separately.

Reported by perceptualchaos2 on 2014-11-05 18:12:24

@jsalatiel
Copy link

Was the plugin architecture implemented ?

@timrae
Copy link
Member

timrae commented May 3, 2016

No, unfortunately I couldn't get my idea for the plugins architecture to work. In the meantime we implemented an API for 3rd party apps to access the AnkiDroid database, so the urgency of a plugins architecture is much lower (since now you can create your own app that does whatever it wants using the AnkiDroid data).

I hope in the future someone will implement a plugin architecture for us... It would be very useful, but I don't think I'll have time to do it, as I'm busy now with a new job.

@jsalatiel
Copy link

Hum, i see.
In this case, wouldn't be possible to implement/merge the load balancer plugin directly in ankidroid ? This plugin is really useful since it reduces the spikes without changing the learning curve for the cards.
I see there is a pull request for it.

@timrae
Copy link
Member

timrae commented May 3, 2016

If the changes were refactored into a hook like was done in #4070 and the quality of the code was very good then merging directly into the codebase could definitely be a possibility. This would make it easy for us to take make it a separate plugin if / when that becomes a possibility.

@jvanprehn
Copy link
Contributor

Hi. I've improved code quality, but its on my laptop at home (I'm now on holiday). I'm thinking about how to get this working as a plugin.

I'm thinking about something like this:
https://enplug.com/blog/loading-classes-dynamically-on-android-particularly-when-you-have-to-use-them-in-a-third-party-framework-like-libgdx

It seems to be consistent with hssm's suggestion here:
#675

And it seems to be consistent with the ideas here:
#2982

Before I'm going to try this, to prevent me wasting time on something that doesn't work, can you describe shortly your idea for the plugin architecture and why it didn't work?

If it takes me too much time I'll just do like I did in #4070 but if I can do it in the right way without spending too much time, i'd prefer that.

@timrae
Copy link
Member

timrae commented Jul 19, 2016

It seems to be consistent with hssm's suggestion here

That thread is imported from the old Google Code issue tracker. All of the imported comments show up as being by @hssm, but you'll see a Reported by xxx on yyy string at the bottom of the comments which shows the original author and comment time stamp. "perceptualchaos2" is me.

Can you describe shortly your idea for the plugin architecture and why it didn't work?

My first idea for the plugin architecture was to use DexClassLoader as you have already read about. Unfortunately I wasn't able to get the split build process working properly with gradle in the end. I added a feature request that would help with this, and kind of found a workaround but realized later that wasn't really working as intended either. At some point I got busy and stopped working on it before understanding exactly what was wrong with my workaround, or coming to a definitive conclusion about whether or not the idea in general is possible / practical.

A different approach that I think would probably be more suitable is briefly described here. I haven't really looked into this at all however.

@anandsnair-java
Copy link

Hi Tim,

Is this on your radar at all?

@timrae
Copy link
Member

timrae commented Jan 1, 2017 via email

@Doodle-Med
Copy link

So did a "load balancer" get merged with the ankidroid main branch?

@mikehardy
Copy link
Member

If so this issue would be closed. The status here is the status. Not in main anki so it won't be a default feature and no one has implemented a plugin architecture so no plugin. There is an API and I suppose you could use that to fiddle with card scheduling but no one has proposed a PR for anything

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2020

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Jun 3, 2020
@dotancohen
Copy link

still searching for solutions

@david-allison
Copy link
Member

Bad bot

@david-allison david-allison reopened this Jun 12, 2020
@github-actions
Copy link
Contributor

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

@xrishox
Copy link

xrishox commented Sep 28, 2020

it would be nice if ankidroid could add this functionality.

@mikehardy
Copy link
Member

@xrishox if it is not in the upstream scheduler, it will not happen here I don't think.

@david-allison
Copy link
Member

Agreed - we'll need this to be implemented upstream before we can work on it.

https://forums.ankiweb.net/

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

No branches or pull requests

10 participants