Comments (4)
It comes down to the question of if most agents are stateless, and as such don't need to be reset, or if most agents are stateful and a common source of errors is forgetting to override reset
.
I'd tend to believe the latter - and having to override reset
to do # nothing
isn't too much of a burden. Given how really every agent is designed to be in a supervision tree, it might even be best to make reset
abstract and force everyone to implement it. It seems a bit of a drastic measure but it's hard to tell.
So for now I'd guess this is fine as-is, until more real-world experience of how often forgetting to override #reset
happens in production.
from earl.
I assumed that agents didn't need to reset something when they're recycled. This applies to most of the design: have noop methods that can be overridden if needed —except call
obviously.
But maybe I'm wrong.
from earl.
Agents don't need to be supervised, so an abstract #reset
feels too drastic.
Looking at a real application using Earl I have, only 1 out of the 4 agent types needs to reset it's internal state —reconnect to an AMQP server because it's likely what crashed the agent. Others are stateless.
from earl.
Flagged as wontfix for now. This needs more evidence from real applications.
from earl.
Related Issues (12)
- Bidirectional communication (replies) HOT 4
- Document Scheduler
- Improve Scheduler design HOT 3
- Rework Earl::Logger to use Log (stdlib) HOT 1
- Agent state should be an Atomic HOT 1
- Earl::Aplication on-exit behavior HOT 2
- CPU 100% with the pool HOT 4
- Unhandled exception in spawn: can't transition agent state from Starting to Stopping HOT 4
- Dynamic Supervisor HOT 3
- Rename Registry as Broadcast, PubSub or ...
- Repurpose Registry to be a named registry of agents
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from earl.