ericholiveira / studio-cluster

Auto cluster for Studio framework
23 stars 4 forks source link

Pluggable balance modules #4

Closed avishnyak closed 8 years ago

avishnyak commented 8 years ago

First commit implementing the base of issue #3.

avishnyak commented 8 years ago

Travis failed on one of the existing tests (I think it's a timing issue with spawning child processes). 4/5 of the environments passed and my tests pass.

ericholiveira commented 8 years ago

Amazing work... i already experienced the problem with timeout on travis i will need to think on some way to fix this @avishnyak would you mind changing the mergesort and multiple_networks example. They both use the old "prioritizeLocal" flag. Let me know if you can do this or i can merge and fix by myself.

avishnyak commented 8 years ago

I can fix it, no problem. Just as an FYI, I maintained backwards compatibility with that flag so it should still work. I'll take a look tonight to make sure that is still the case.

Also, I'm thinking that I need to start contributing to the docs somehow. Do you have any preference how you would like to document all these things? Want me to create some wiki pages?

ericholiveira commented 8 years ago

Great @avishnyak i just think its better to have updated examples.

When creating studio documentation i've tried to make it look like Baconjs docs https://github.com/baconjs/bacon.js/ Right now im blogging about studio on medium and i plan to use this blog posts as a "hands-on" wiki session.

So, for me the best docs are those with a great Readme.md and wiki for advanced users. But we can discuss. You're being a great help on the project and i would like to hear your thoughts on it.

avishnyak commented 8 years ago

I think you're right on with your documentation approach. There should be a smooth ramp to get someone started, to productive, to expert level. For getting started, samples and the README are the best places. Productivity (I think) depends mostly on discoverability or the API surface and "Guides." Experts would probably want to dive into annotated code. Annotated code is also good for getting contributors (along with an easy "get started contributing with these tasks" list).

I think for now, I'll add a simple list to the readme describing how balance modules work and list them out with links to the wiki pages that go into more details on each one.

I'll update the examples today and I also have another balance algorithm ready for you...

ericholiveira commented 8 years ago

Thx @avishnyak merged

ericholiveira commented 8 years ago

@avishnyak just FYI i found a small bug on the fibonacci and mergesort examples with percent|Local , on the examples you used percentLocal:0 as all services have the same name they kept trying to send the message to the other machine and no one really processed it. So i just change it to 50, so users can see the data on both process working ok

avishnyak commented 8 years ago

Interesting... I'll have to look into this and maybe set up some test cases for it.