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

'Splitter Agent' #287

Open
0xdevalias opened this issue Apr 28, 2014 · 4 comments
Open

'Splitter Agent' #287

0xdevalias opened this issue Apr 28, 2014 · 4 comments

Comments

@0xdevalias
Copy link
Member

Moved this from #262 to a new thread at the request of @cantino

Along this line of thinking (but not necessarily related), is it possible to output multiple different types of events from the one agent? I've been meaning to look into a 'splitter' type agent, but haven't had the time to see if a) it's possible and b) if it already exists in some way.

I assume it's probably already possible to do, at least on an individual agent level (outputting different event types)

Along another similar line (sorry for hijacking the thread!), is there currently any concept of a 'global' event listener (that doesn't need to be manually wired up), and if not, does the event propagation architecture support this sort of thing easily/at all?

@cantino / anyone else who could answer my rambling thoughts :)


I will try and find some time today to clarify my thoughts a bit more. The tl;dr is that I want to emit distinctly different events from an agent in a clean way, and then be able to handle them downstream nicely. I was thinking at one stage along the lines of being able to define multiple different output streams/channels ('event type') from an agent, and then being able to wire up the downstream agents not only to the agent, but also a particular channel ('event type') on that agent.

The original note in my todo list:

Huginn - Can an agent create multiple events 'at once' (or split an incoming event, or output different types of events)

@cantino
Copy link
Member

cantino commented Apr 28, 2014

At the moment, you could add a event_type field to your created events, but then you'd need to send all events to a set of TriggerAgents, one for each type, that then sent the filtered events downstream to various Agents.

I could imagine a system where you could specify a pattern when subscribing to events, but that might get complex. What is your use case for this?

@0xdevalias
Copy link
Member Author

I think my original use case was for single 'large' agent that handles an entire service (eg. not split up like the twitter agent is)

So for example, a Facebook agent that can create distinct events for things like:

  • New Comment on Post
  • New Photo Uploaded by UserX
  • New Like on Page
  • Etc

They could all be made to work in a single event, or use an eventType field on it, but I feel like having a standard method for this would be useful (as I doubt this will be an isolated issue as the number of agents grows)

Having the standardised method would also allow easier chaining without the TriggerAgent/etc in the middle.

@snicker
Copy link
Contributor

snicker commented Apr 28, 2014

I think you're struggling with the same thing that I have been for a while: certain tasks require a complex group of agents, but there may be similar tasks with only slightly different configurations. I think this fits in with the "scenarios" idea that forms a more logical grouping of a collection of agents into manageable, duplicatable, self contained things with their own set of inputs and outputs.

@0xdevalias
Copy link
Member Author

On the 'scenarios' aspect just had a thought re: UI/etc. Could have them as 'meta agents', only display them as a single agent on the agents page/in the graph, but allow you to drill down further into them.

@cantino

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

4 participants