enmasseio / evejs

Simple, web-based agents running on node.js and in the browser
http://eve.almende.com/
Apache License 2.0
56 stars 17 forks source link

Broadcast, finding agents #4

Open georg90 opened 8 years ago

georg90 commented 8 years ago

Hello!

I'm happily using eve for my bachelor project. I use pubnub to connect agents wherever they are to my network. They offer smart home capabilities to work together to get smart home logic working. But then I'm stuck. How can I dynamically find agents? I need something where I can find agents that offer a specific method. At the moment I can only hardcode the agentId. I use a special agent class to send actions to actors/sensors. This class should be accessed without knowing the Id. So a broadcast (or something like it) could send the request out and one of them sends an answer.

Especially this part of @josdejong answer is interesting: When one agent is created by another agent, they can remember each other. When an agent is made part of some group or organization, it can see the other agents in the same group. How does this work?

I also like the Publish-subscribe model described here: http://eve.almende.com/concepts/protocol.html Are there any examples for that? I didn't seem to find any :-(

Thank you in advance!

josdejong commented 8 years ago

Eve doesn't have built in support for discovery mechanisms, but here are a few ideas:

As for subscribing on events on other agents: this functionality is still missing in the JavaScript implementation.