Comments (2)
I like the phrasing of "transient" and "permanent" actors a lot. That's a great idea.
As for API, the actor state is the part that "knows" if the state will ever terminate or not. This will allow us to restrict the scheduler accordingly. But more importantly, you should not be able to create a client that thinks it's talking to a permanent actor when it's talking to a transient actor (or, somewhat less importantly, visa versa). This is certainly possible. My larger concern is code duplication between different client types.
As for extension traits, see the Itertools
trait in the itertools crate or the FutureEtx
, StreamEtx
, and SinkExt
traits in the futures crate.
from squirecore.
Thanks for the detailed description of the problems. Here are my initial thoughts and questions
-
Calling the persistence of the actors
lifetime
might get confusing in the long run. Should we consider an alternative? I proposetransient
andpermanent
actors andpermanence
of actors. -
For the API, could we allow the users to define what kind of an actor they want while building the actor (as a method on
ActorBuilder
)? The following seems like a good, intuitive syntax that might reduce cognitive load.
ActorBuilder::new().transient().launch();
ActorBuilder::new().persistent().launch();
// or we could get rid of `new` constructor in these cases
ActorBuilder::persistent().launch();
ActorBuilder::transient().launch();
ActorBuilder::new().launch(); // defaults to `persistent`
ActorBuilder::new().sink().launch();
ActorBuilder::new().stream().launch();
// as before, briefer constructors
ActorBuilder::stream().launch();
ActorBuilder::sink().launch();
// we could combine:
ActorBuilder::transient().sink().launch();
I haven't heard of extension traits before. I will check into them.
from squirecore.
Related Issues (20)
- [Feat]: Default tournament names
- [Bug]: Byes can be given to players that aren't in the tournament
- [Dev]: Clean up squire_web
- [Dev]: Clean up squire_sdk
- [Dev]: Add tests for the TournamentManager
- [Bug]: Player can be pair against themself
- [Feat]: Compressed WASM package HOT 1
- [Dev]: Session Expiry
- [Dev]: Reauth Guests
- [Dev]: Operation Filtering via Sessions HOT 1
- [Dev]: Session Promotion
- [Dev]: Broadcast Session Updates
- [Dev]: Client Session Management Actor
- [Dev]: Stale gathering detection HOT 1
- [Dev]: Automatic WebSocket reconnections
- [Dev]: Improvements to pairings/standings tables
- [Dev]: Improved WS connection endpoint HOT 1
- [Spike]: Making tournament UI prettier/more user friendly
- [Dev]: Websocket refactor HOT 1
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 squirecore.