Ideas on further API change
See original GitHub issueThere are several ideas I have on potential changes concerning current API, some of them are breaking changes:
- Move away from returning effects. I still need to evaluate on that, but I think, it might be better to leave effect-free code in user hands. Requiring to return effect is pretty ugly in longer run, and it looks bad in terms of composition with user-defined code. Simple
unit
return may be enough. - Move away from
AskResult<>
: by default we should be able to interop with ask pattern just by usinglet! response = ref <? request
and not having to unwrap the code each time if not necessary. If someone wants to have it presented in form of an object, he could use try pattern linelet 'try block = try Success <| block() with e -> Failure e
. - Since we expose actor context directly as function parameter, we might want to simply provide a mock for it in TestKit, that will record all method calls in form of list of events that we could use for assertions later. This way we could make unit tests on actors without need of creating a whole actor system, just passing context mock.
- Look forward If we are able to fully integrate with
async { ... }
computation expression. The idea here is to be able to define actor not only fromactor { ... }
but directly from async look as well.
In general I’d like to reduce a footprint of Akkling API in user code in a way that user could potentially define his/her domain logic with minimal dependencies to Akka.NET/Akkling libraries.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:7 (4 by maintainers)
Top Results From Across the Web
API Change Strategy
Asbjorn describes a new approach to API versioning, outlining five aspects of smart API change management. Learn to adopt an API change ......
Read more >API Versioning: A Marketer's Guide
A breaking change is any change to your API that may cause client applications to fail. Breaking changes require the API consumer to...
Read more >5 Golden Rules for Great Web API Design
Web APIs that are cleanly-designed, well-documented, and easy-to-use are rare. Here's how to design a great web API that is much more likely...
Read more >Addressing the community about changes to our API
First, let me share the background on this topic as well as some clarifying details. On 4/18, we shared that we would update...
Read more >Best practices for REST API design
There are many kinds of caching solutions like Redis, in-memory caching, and more. We can change the way data is cached as our...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Neftedollar most of the API will remain intact, while things like Effects and AskResult will probably be simplified, this won’t be as noisy change as one would except in user code. I.e. while I want to get rid of
Effect<>
, user intent will still be possible to declare directly via returned behavior (see how akka-typed introduced behaviors).Sample code:
This looks exactly like existing code however,
Stop
andUnhandled
won’t be instances ofEffect<>
interface any more, they will be behaviors (just like theloop
function itself).I like 2nd, 3d and 4th points. I like your general idea. But what about effects? I understand that they are not following the idea of reducing API, but they are still very useful. Maybe they can be an optional extension library? (sorry if I’ve made mistakes in the text)