{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/orleans/issues/2246","repository_url":"https://api.github.com/repos/dotnet/orleans","labels_url":"https://api.github.com/repos/dotnet/orleans/issues/2246/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/orleans/issues/2246/comments","events_url":"https://api.github.com/repos/dotnet/orleans/issues/2246/events","html_url":"https://github.com/dotnet/orleans/pull/2246","id":180472542,"number":2246,"title":"Ability to specify interleaving per message type","user":{"login":"yevhen","id":107726,"avatar_url":"https://avatars.githubusercontent.com/u/107726?v=3","gravatar_id":"","url":"https://api.github.com/users/yevhen","html_url":"https://github.com/yevhen","followers_url":"https://api.github.com/users/yevhen/followers","following_url":"https://api.github.com/users/yevhen/following{/other_user}","gists_url":"https://api.github.com/users/yevhen/gists{/gist_id}","starred_url":"https://api.github.com/users/yevhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yevhen/subscriptions","organizations_url":"https://api.github.com/users/yevhen/orgs","repos_url":"https://api.github.com/users/yevhen/repos","events_url":"https://api.github.com/users/yevhen/events{/privacy}","received_events_url":"https://api.github.com/users/yevhen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/orleans/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-01T18:41:05Z","updated_at":"2016-10-01T23:11:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dotnet/orleans/pulls/2246","html_url":"https://github.com/dotnet/orleans/pull/2246","diff_url":"https://github.com/dotnet/orleans/pull/2246.diff","patch_url":"https://github.com/dotnet/orleans/pull/2246.patch"},"body":"Hi guys!\r\n\r\nAs you know Orleankka provides a functional message-based style API for Orleans and all grains have a uniform interface like: \r\n\r\n```cs\r\ninterface IActor\r\n{\r\n    Task<object> Receive(object msg);\r\n}\r\n```\r\n\r\nTo support some advanced scenarios like ability to specify message interleaving in a more granular way (per-message type) which is incredibly valuable feature we extended this interface with additional method:\r\n\r\n```cs\r\ninterface IActor\r\n{\r\n    Task<object> Receive(object msg);\r\n    [AlwaysInterleave] Task<object> ReceiveReentrant(object msg);\r\n}\r\n```\r\nSo when sending a message via actor reference we were selecting one method ot the other depending on the configuration for this message/actor type.\r\n\r\nI'm preparing next big and updated release (1.0, ya finally!) and most anticipated feature is to be able to send messages from clients without need to reference server-side libraries (containing actor definitions). Basically, proper client-server separation.\r\n\r\nUnfortunately, current implementation of per-message reentrancy requires to have that information on client (so that we can choose either `Receive` or `ReceiveReentrant`). Which is a leak of server-side knowledge and is very illogical.\r\n\r\nI haven't found any other way then to extend implementation upstream. It's just a rough sketch not a final code, something to discuss further. I will highly appreciate you help on this issue. Please advice, mesage reentrancy is very important (and used) feature in Orleankka and now this stops me from releasing 1.0 😞 "},"comment":{"url":"https://api.github.com/repos/dotnet/orleans/issues/comments/250943224","html_url":"https://github.com/dotnet/orleans/pull/2246#issuecomment-250943224","issue_url":"https://api.github.com/repos/dotnet/orleans/issues/2246","id":250943224,"user":{"login":"yevhen","id":107726,"avatar_url":"https://avatars.githubusercontent.com/u/107726?v=3","gravatar_id":"","url":"https://api.github.com/users/yevhen","html_url":"https://github.com/yevhen","followers_url":"https://api.github.com/users/yevhen/followers","following_url":"https://api.github.com/users/yevhen/following{/other_user}","gists_url":"https://api.github.com/users/yevhen/gists{/gist_id}","starred_url":"https://api.github.com/users/yevhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yevhen/subscriptions","organizations_url":"https://api.github.com/users/yevhen/orgs","repos_url":"https://api.github.com/users/yevhen/repos","events_url":"https://api.github.com/users/yevhen/events{/privacy}","received_events_url":"https://api.github.com/users/yevhen/received_events","type":"User","site_admin":false},"created_at":"2016-10-01T23:11:11Z","updated_at":"2016-10-01T23:11:11Z","body":"I can imagine something similar to how stream filters are defined now, like putting on the method:\r\n\r\n```cs\r\n[AlwaysInterleave(\"SomeClass.SomeStaticCallbackMethod\")]\r\nTask SomeMethod(object msg)\r\n```\r\n\r\nWhere `SomeClass.SomeStaticCallbackMethod` points to method having following signature:\r\n\r\n```cs\r\nbool Predicate(Type grainType, object msg);\r\n```"}}
{"actor":{"display_login":"yevhen"}}