Comments (10)
+1
This is more straightforward approach I like it
from orleans.
I like the straightforward approach. Maybe the naming for some categories will be a different.
from orleans.
@gabikliot sure, it was just an example
from orleans.
Should we catch such violations at compile/codegen time, just like we do for grain interface rules?
from orleans.
@sergeybykov hmmm, but isn't codegen only operates on interface project? And those attributes target grain class implementations ...
from orleans.
Codegen runs for grain implementations too, to generate state classes from state interfaces.
from orleans.
To clarify, I meant to say that in addition to structuring attributes into categories and having compiler enforce AllowMultiple=false, which I think is a great suggestion, we can also catch any violations that pass that filter at codegen time.
from orleans.
Another +1 for grouping attributes.
On Tue, 10 Feb 2015 22:10 Sergey Bykov [email protected] wrote:
Codegen runs for grain implementations too, to generate state classes from
state interfaces.—
Reply to this email directly or view it on GitHub
#107 (comment).
from orleans.
@sergeybykov ah, sorry, forgot about that. I don't use built-in persistence :) Ye, it would be great, since grouping into category attributes with backed choice enums is not enough to catch invalid combinations across categories, such as StatelessWorker + Placement, or Reentrant + AlwaysInterleave
from orleans.
From my PoC, I've think that best way to group attributes is by having a configuration attribute for each type of activation. That will elegantly restrict what could be configured for each type of activation:
public enum Placement
{
Auto,
PreferLocal,
DistributeEvenly
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class GrainAttribute : Attribute
{
public readonly Placement Placement;
public GrainAttribute(Placement placement = Placement.Auto)
{
Placement = placement;
}
}
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class StatelessWorkerAttribute : Attribute
{
// no additional configuration options at the moment
}
That only leaves us with mixing Reentrant
and AlwaysInterleave
but that not a big deal at all.
from orleans.
Related Issues (20)
- Change CanConvert method of JsonConverter(s) in OrleansJsonSerializer HOT 1
- Atomic rollouts HOT 3
- Orleans 7.0 About Memory stream usage help HOT 1
- Provide GrainCancellationToken in RequestContext HOT 2
- Any plan to upgrade KubernetesClient to version 12x for Orleans v3 HOT 1
- `GrainDirectoryOptions` are ignored when using `IGrainDirectory` HOT 1
- Feature - Allow grain type name to be set at startup HOT 7
- BroadcastChannel and Transactions
- Explicit subscription messages are dropped at consumer when producer is implicitly subscribed to itself
- "Activation access violation" with grain timers in Orleans 8 HOT 4
- Calls to grains never complete on cluster change HOT 1
- Serialization issues - Orleans 8.0.0 HOT 1
- [Clustering] Support cleaning up abandoned ClusterIds
- Orleans Streaming: in [SetCursor] method, If last purged token does not exists, do not throw an exception, just start from the oldest message in cache HOT 1
- Function Suggestion: RedisGrainStorage
- After upgrading Orleans8. x, Reminder cannot reliably trigger ReceiveReminder() HOT 9
- `orleans-grains` counter gets incremented multiple times by stateless worker grains
- Running Orleans via project references for debugging HOT 3
- Proposal: Support TTL for purging grain state for inactive grains HOT 1
- Orleans 7.x does not support multiple stateless worker grain types with different `StatelessWorkerPlacement.MaxLocal` values 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 orleans.