enmasseio / evejs Goto Github PK
View Code? Open in Web Editor NEWSimple, web-based agents running on node.js and in the browser
Home Page: http://eve.almende.com/
License: Apache License 2.0
Simple, web-based agents running on node.js and in the browser
Home Page: http://eve.almende.com/
License: Apache License 2.0
All coming from evejs, hypertimer & distribus.
could you please update evejs dependencies :
here is npm audit report : https://github.com/scenaristeur/spoggy-graph/blob/master/audit
when I try "npm install --save enmasseio/evejs#develop"
I got
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected]
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'evejs'
npm ERR! notarget
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!
Hello,
I am using the example : 'BabbleAgent' wich create an id for each agent and I am running my program on node red.
When I deploy the application again, the id still there, and an error occurs ... Is there a way to delete an agent after its creation?
In an old version here, there was a function (this.die()) but it doesn't work now (version 0.5.0)
Thank you :)
It took me quite a while to figure this out. It seems only possible to use a babble.then on an agent.decision, when you require the babble package from within evejs.
I guess somehow the connection is handled inside of babble.
var babble = require('./../node_modules/evejs/node_modules/babble');
I was about to make a pull request to remove the babble package from the package.json, but I am not sure, if it is the best approach, since then some tests might not work.
Btw: That was the error log:
TypeError: Block expected as choice
at Decision.addChoice (c:\Thomas\Projects\eve\eve-agents\node_modules\evejs\node_modules\babble\lib\block\Decision.js:136:11)
at c:\Thomas\Projects\eve\eve-agents\node_modules\evejs\node_modules\babble\lib\block\Decision.js:84:10
at Array.forEach (native)
To reproduce:
edit host2.js
agent2.sayHello('ws://localhost:3000/agents/agent1');
// into
agent2.sayHello('ws://localhost:3000/agents/agent1');
agent2.sayHello('ws://localhost:3000/agents/agent1');
agent2.sayHello('ws://localhost:3000/agents/agent1');
and edit HelloAgent.js line 26 to:
this.send(to, 'Hello ' + to + '!').done();
to see the error:
TypeError: Cannot call method 'push' of undefined
at C:\Dropbox\Almende\PHPstorm\Enmasse\evejs\lib\transport\websocket\WebSocketConnection.js:65:32
at doResolve (C:\Dropbox\Almende\PHPstorm\Enmasse\evejs\node_modules\promise\lib\core.js:91:5)
at new Promise (C:\Dropbox\Almende\PHPstorm\Enmasse\evejs\node_modules\promise\lib\core.js:71:3)
at WebSocketConnection.send (C:\Dropbox\Almende\PHPstorm\Enmasse\evejs\lib\transport\websocket\WebSocketConnection.js:64:16)
at HelloAgent.Agent._sendByProtocol (C:\Dropbox\Almende\PHPstorm\Enmasse\evejs\lib\Agent.js:233:25)
at HelloAgent.Agent.send (C:\Dropbox\Almende\PHPstorm\Enmasse\evejs\lib\Agent.js:169:19)
at HelloAgent.sayHello (C:\Dropbox\Almende\PHPstorm\Enmasse\evejs\examples\agents\HelloAgent.js:26:8)
at Object.<anonymous> (C:\Dropbox\Almende\PHPstorm\Enmasse\evejs\examples\transports\websocket\host2.js:18:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
Without the edit of HelloAgent, you will only see one reply.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.