Ikabot-Collective / ikabot

A Python-based bot designed for automating tasks in the game Ikariam
https://discord.com/invite/3hyxPRj
MIT License
97 stars 65 forks source link

8.0.0 Changes #258

Open ikagod opened 5 months ago

ikagod commented 5 months ago

Ikabot Version 8.0.0 Codebase Changes

Hello Ikabot Contributors,

We have decided that the Ikabot codebase is due for a rework. This means that after this update, Ikabot should be more stable and work better on different platforms. It will also mean, unfortunately, that many breaking changes will be necessary. Your forked repositories will probably need a refactor as well, and you might have to log into Ikabot again after a long time of not logging in. It also means that you will have to set up your Telegram bots with Ikabot again.

Key Points

Action Items for Contributors

Final Notes

We encourage all contributors to actively participate in this exciting phase of Ikabot's development. Your insights and assistance are invaluable, and we look forward to collaborating on version 8.0.0.

Share Your Feedback: If you have any thoughts, suggestions, or concerns, please feel free to share them in the comments. Your feedback is crucial in making Ikabot even better.

Thank you for your continued support and contributions!

susikaman commented 5 months ago

I support the rework of the session data system. It just feels pointless to have it encrypted while there's no reason to. Instead, it would be a great benefit to be able to modify it by hand if one wishes to do so, this would also make it possible to identify an .ikabot file from a multitude of backups.

Using commandline arguments instead of user predetermined input does sound like a more optimal way to launch Ikabot with preferred tasks. Although the rework of existing predetermined input commands sounds horrifying (I have like 15 of these to modify, of which nearly all of them are more or less different), it would make things a lot more stable as a commandline argument can't go wrong due to misplaced order. Therefor, I support that as well despite the fact that this will cause me a lot of additional work lol.

The rest, I'll wait and see how it looks like before I can say anything. Overall the 8.0.0 changes sound really promising and fresh!

coecharlin commented 4 months ago
susikaman commented 4 months ago
  • [x] Decide whether to use asyncio or threading for concurrent task execution Between the two options, which one did you choose? I ask because I am improving a feature that will have this type of need and, to maintain the project standard, I may need to adjust my choice.

Which would you personally prefer? Give your thoughs

ElieTaillard commented 4 months ago

Yes, don't hesitate to give your opinion @coecharlin

ElieTaillard commented 4 months ago

@ikagod Do you want to create a separate branch for the 8.0.0 changes?

susikaman commented 4 months ago

I'll give a vote for threading. I've experienced with threading and it's lock feature to prevent duplicate functioning between threads. Threading lock would be the perfect solution for concurrent tasks switching towns which is occationally causing problems. This would be an easy way to have tasks perform operations one at a time.

coecharlin commented 4 months ago

Threading lock would be the perfect solution for concurrent tasks switching towns which is occasionally causing problems.

I'm using Threading so that each execution in a different city doesn't interfere with each other, but as I don't have experience in the area, I'm not sure which one would be ideal for the project.

coecharlin commented 4 months ago

One difficulty I am currently having with using Threading is the issue of dealing with the timer to execute the next task after finishing, it seems that Threading does not respect the timer that is being executed haha, I still haven't understood this

ElieTaillard commented 3 months ago

One difficulty I am currently having with using Threading is the issue of dealing with the timer to execute the next task after finishing, it seems that Threading does not respect the timer that is being executed haha, I still haven't understood this

Indeed, managing timers with threading can be tricky. Threading operates by managing multiple execution threads, which can sometimes lead to synchronization issues and timing mismatches, such as missing scheduled timeouts.

Switching to asyncio could potentially resolve these issues. Unlike threading, asyncio uses a single thread and cooperative multitasking, which makes it easier to handle tasks that depend on precise timing. With asyncio's async def coroutines and asyncio.sleep, tasks can be scheduled to run after a specified delay without blocking the main thread.

Asyncio could be a better option, however, this requires structuring the code around the asynchronous model (async def, await, etc.), which may require some additional thought

ikagod commented 3 months ago

We will be using threading mainly because of simplicity.

susikaman commented 3 months ago

We will be using threading mainly because of simplicity.

Lol honestly, I was just working on a private project trying to utilize asyncio in it. Holy hell, it literally forced me to re-write the entire project to get things working properly, and it made the whole thing so confusing and messed up that I just gave up on it. I also vouch for threading, it seems way easier.

BigMax23 commented 1 month ago

Hi everyone! What’s the current status of version 8.0? Are you making progress? Is there any hint of a release date yet?

ikagod commented 1 month ago

Hi everyone! What’s the current status of version 8.0? Are you making progress? Is there any hint of a release date yet?

Unfortunately not yet because I've been busy with work but I am looking to pick up development on it soonish.