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

Improve the agent setup/configuration experience #4

Open
vlthr opened this issue Sep 14, 2015 · 1 comment
Open

Improve the agent setup/configuration experience #4

vlthr opened this issue Sep 14, 2015 · 1 comment
Labels

Comments

@vlthr
Copy link
Member

vlthr commented Sep 14, 2015

Currently, setting up agents is done in main.py and is a bit of a pain. What can we do to improve this?

One possibility is to make a small domain specific language. In the long term we could make a nice GUI as well.

Are there any simple changes we can make now that would improve things?

@danestig danestig added the story label Sep 14, 2015
@vlthr
Copy link
Member Author

vlthr commented Sep 15, 2015

As of 48af5dd, the API for creating agents that operate in a sequence is:

Dispatcher().chain(initial_event, [sequence of agents])

For example, in the chunker demo:

dispatcher.chain("button" , Chunker(5), SimLampHandler("http://localhost:9090/"))

This is a vast improvement on the previous API using just the constructors of the agents, but is still a bit simplistic.

One significant issue is that currently, if you make two seperate chains with a common start, there is no actual sharing of agents. This could be addressed by adding a sort of "value hash" to the agents, where two separate agent objects with the same parameters would hash to the same value, preventing them from being duplicated in the agent manager.

Another issue is that the current API doesn't easily allow for expressing branches in the event flow, even if the above solution is implemented to avoid duplicate agents. How should we best solve this?

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

No branches or pull requests

2 participants