Skip to content

Configurable Beehive#1819

Open
neskk wants to merge 1 commit into
RocketMap:developfrom
neskk:beehive-rework
Open

Configurable Beehive#1819
neskk wants to merge 1 commit into
RocketMap:developfrom
neskk:beehive-rework

Conversation

@neskk

@neskk neskk commented Feb 13, 2017

Copy link
Copy Markdown
Contributor

This PR provides more configuration options for scanners running in beehive mode, giving the ability to disable or force a worker count in specified hives.

Description

  • --beehive is now an integer representing the number of leaps desired, e.g. -bh 1 produces a beehive of 7 hexes (leap 1). Default is 0 - disabled.
  • --workers-per-hive is now used to force the population of each hive, meaning that if it's set to a value greater than zero it will throw an error if there aren't enough workers available to ensure that each active hive gets the desired amount of workers. Default is 0 worker per hive.
  • --beehive-workers this is the new addition, it's a list of pairs <hive index>:<worker count>, e.g. beehive-workers: [1:0, 2:3, 3:0] (config.ini) / -bhw 1:0 -bhw 2:3 -bhw 3:0 will disable index 1 and 3 and force 3 workers in hive index 2. Default is [] (empty list).

Warning: Hive indexes start at 0.
beehive_workers-indexes

Motivation and Context

Beehive mode is great because it saves a lot of memory when compared to using a separate instances to achieve this kind of map coverage. Currently we're unable customize the beehive worker distribution and this limits what we can do in our setups leading to some frustration and resources wasted when trying to setup a "beehive of beehives".

How Has This Been Tested?

Local server - Win7 x64 - Python 2.7.12 - Clean pull

Screenshots (if appropriate):

-st 4 --workers 7 -bh 1 -bhw 0:0 -bhw 1:0 -bhw 2:3 produces:
Beehive worker distribution: [0, 0, 3, 1, 1, 1, 1]
beehive_workers-4

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@drallieiv

Copy link
Copy Markdown

This is nice but becca's pgm-multiloc, that many people use, does not order the hex the same way then you. 0 middle, 2 on top of it rotating clockwise.

Your 2 should be a 1, and your 9 should be the 7

@neskk

neskk commented Feb 14, 2017

Copy link
Copy Markdown
Contributor Author

@drallieiv I didn't changed the way we generate hives location, they were being generated this way: counter clockwise starting from the North-East position. Currently if you use -bh without sufficient workers to fill the beehive, i.e. -bh -w 5 - the positions 5 and 6 won't be populated.
I'm not changing this since it would require the rework of some functions I don't want to touch on.
Note that beccasafan's pgm-multiloc can be used to setup a "beehive of beehives" but it requires manual work as it is not designed to be used with --beehive.

@sLoPPydrive

Copy link
Copy Markdown
Contributor

This is really awesome! :-) I acknowledge your -bwh parameter offers the most flexibility but have you thought of a parameter that just gets a list of hives to be used and in the end evenly distribute all workers among the used hives? For example --beehive-include 0,3,6,11,17 --workers 15 will produce a diagonal list of hives according to your numbering assigning each hive 3 workers. Might be easier to setup. :)

Anyways, this is great and long overdue. ;)

@neskk

neskk commented Feb 14, 2017

Copy link
Copy Markdown
Contributor Author

@sLoPPydrive You can achieve what you're asking with this PR. If you don't force workers-per-hive it will distribute available workers evenly across enabled hives ;) You just need to disable the hives you don't want populated and everything goes as you're thinking.

@SiteEffect

SiteEffect commented Feb 14, 2017

Copy link
Copy Markdown
Contributor

You could renumber your hives. First, starting with 1 (so 0->1) might be bad programming but is probably a better user experience. Further, iirc beccasafan location hive generator orders them clock-wise so 2->2, 1->3 and so on for each leap, this feels also the most intuitive for me.

@sLoPPydrive

Copy link
Copy Markdown
Contributor

How so? I have to give parameters like -bhw 0:0. Do you mean I just have to mention those who shall be empty and all workers will be distributed among the non-empty hives?

@neskk

neskk commented Feb 14, 2017

Copy link
Copy Markdown
Contributor Author

@aRengo Please read what I've said... it's not "my hives" and as I said in the post before: I won't change this because it affects code I didn't do and wasn't required to be modified to implement the new features.

@sLoPPydrive Yes, exactly what you said... disable unwanted hives with -bhw <index>:0 and then supply how many workers -w you wish to be split between the remaining hives.

@mpw1337

mpw1337 commented Mar 2, 2017

Copy link
Copy Markdown
Contributor

Hope to see this soon merged, will be awesome to distribute workers more where they belong 👍

@Qualimiox

Copy link
Copy Markdown

Is this still being looked at? A bunch of people are still using pgm-multiloc (including me) but this PR has some inherent benefits. neskk already mentioned the memory usage (my server uses 10GB with 35 -st 14 instances at this point)

But more importantly, if #1980 or something similar gets merged, people using pgm-multiloc won't be able to use it since you'd need seperate level 30 accounts for each instance, this could be a fix.

@neskk

neskk commented Apr 26, 2017

Copy link
Copy Markdown
Contributor Author

@Qualimiox, you want something done? Talk to @sebastienvercammen... he's the dictator around here.
I've submitted this PR a very long time ago and I will maintain it since I'm currently using it.
Seb's probably been too busy writing blog posts or working on devkat to review it... Plus, he was very rude to me and kicked me out Discord just because I talk about stuff he doesn't like or want to. This made me lose the remaining motivation to keep giving back to RM, specially considering he's getting paid on devkat to work on RM.

@sebastienvercammen

Copy link
Copy Markdown
Member

@neskk A reminder to stay professional, or at the very least not spread unnecessary lies that other people then have to correct.

You were kicked out of #pr on Discord due to your rude behavior. It wasn't because "I was being rude to you" or because you "just talk about stuff". It was even put to a vote and it was unanimously agreed that it was better not to have you around anymore. You've only been behaving irrationally and you can't stay professional when confronted with a decision that disagrees with your opinions.

If you find it necessary, I'm sure @FrostTheFox will confirm. His Discord bot logs all chats.

As for devkat, it has been explained several times what devkat is exactly, and it's disappointing to see a fellow open source contributor react so strongly against an organization that was set up to contribute to open source in a sustainable manner. But your opinions are yours to have, I'll just have to ask you to either be more professional about them or to keep them for yourself entirely.

@neskk

neskk commented Apr 26, 2017

Copy link
Copy Markdown
Contributor Author

@sebastienvercammen I would post some print screens of your "professionalism" in that discussion, but then you would probably remove them. I've already saw that you edited multiple phrases from that discussion so don't try to spin this around. I wasn't rude, you kicked me out without notice. I don't care about the poll you did, most people don't know me so why would they vouch for me and risk going against the all might, all powerful dictator Seb, knowing that their fate would probably be the same as me.

@FrostTheFox

Copy link
Copy Markdown
Member

@neskk Reminding you to please stay professional on GitHub (including outside this thread), otherwise I will have to prevent you access on the repository.

'--beehive' controls the size of the beehive - number of leaps.
'--beehive-workers' controls the population of each hex individually, potentially disabling certain hives or forcing a specific number of workers.
If there's not enough accounts to populate the beehive RM will display a error message and exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants