dotnetomaniak.pl - Artykuły z tagiem akkadotnetomaniak.pl - Artykuły z tagiem akka2024-03-29T14:20:57Zhttps://dotnetomaniak.pl/Tags/akkaCopyright (c) dotnetomaniak.pldotnetomaniak.pl Atom Generatordotnetomaniak.pl webmasteradmin@dotnetomaniak.plhttps://dotnetomaniak.pl/Assets/Images/fav.icohttps://dotnetomaniak.pl/Assets/Images/dotnetomaniak_logo-negatyw_small.png10025https://dotnetomaniak.pl/AkkaNET-7-Creating-and-accessing-Actor-System-with-Dependency-Injection-Container-HryniewskiNETAkka.NET #7: Creating and accessing Actor System with Dependency Injection Container – Hryniewski.NET2017-10-01T21:20:57Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_hi751D_Hu0mDh24fdPFPKQ.png"/></div><div>A while ago I wrote about creating Actor System and top-level actors. Sadly it was stored in a static field. And keyword static is … let’s say it’s not one of my favourites. Today I’ll show you how I’m doing the exact same thing but in Dependency Injection container.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AkkaNET-7-Creating-and-accessing-Actor-System-with-Dependency-Injection-Container-HryniewskiNET"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fhryniewski.net%2f2017%2f10%2f01%2fakka-net-7-creating-and-accessing-actor-system-with-dependency-injection-container%2f" style="border:0px"/></a></div></div>Rafał Hryniewskihttps://dotnetomaniak.pl/Users/gCipifzCGUGnNtWDwLo7kg2017-10-11T06:13:10Zhttps://dotnetomaniak.pl/AkkaNET-7-Creating-and-accessing-Actor-System-with-Dependency-Injection-Container-HryniewskiNET2840A while ago I wrote about creating Actor System and top-level actors. Sadly it was stored in a static field. And keyword static is … let’s say it’s not one of my favourites. Today I’ll show you how I’m doing the exact same thing but in Dependency Injection container.http://hryniewski.net/2017/10/01/akka-net-7-creating-and-accessing-actor-system-with-dependency-injection-container/http://dotnetomaniak.pl/Data/Thumbnails/small_hi751D_Hu0mDh24fdPFPKQ.pnghttps://dotnetomaniak.pl/AkkaNET-6-Persisting-actors-state-snapshots-HryniewskiNETAkka.NET #6: Persisting actors state – snapshots – Hryniewski.NET2017-05-17T22:36:06Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_G0G3v95hfEiLJp6Rcw3MDw.png"/></div><div>In the previous post, I’ve briefly described part of a process of persisting state of our actor. I’ve told you about storing events and I’ve mentioned things called snapshots. This post is entirely about them.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AkkaNET-6-Persisting-actors-state-snapshots-HryniewskiNET"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fhryniewski.net%2f2017%2f05%2f17%2fakka-net-6-persisting-actors-state-snapshots%2f" style="border:0px"/></a></div></div>Rafał Hryniewskihttps://dotnetomaniak.pl/Users/gCipifzCGUGnNtWDwLo7kg2017-05-20T11:02:48Zhttps://dotnetomaniak.pl/AkkaNET-6-Persisting-actors-state-snapshots-HryniewskiNET3240In the previous post, I’ve briefly described part of a process of persisting state of our actor. I’ve told you about storing events and I’ve mentioned things called snapshots. This post is entirely about them.http://hryniewski.net/2017/05/17/akka-net-6-persisting-actors-state-snapshots/http://dotnetomaniak.pl/Data/Thumbnails/small_G0G3v95hfEiLJp6Rcw3MDw.pnghttps://dotnetomaniak.pl/AkkaNET-5-Persisting-actors-state-events-HryniewskiNETAkka.NET #5: Persisting actors state – events – Hryniewski.NET2017-05-11T21:37:53Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_-mLsq-nEkUe-Coj3OPGfEA.png"/></div><div>As I’ve mentioned in previous posts about Akka.NET, everything that actor knows is stored in memory. While we can skip any database or IO related bottlenecks because things in memory are generally speaking very fast, we must remember that memory is not a place where you can store your data for an extended period of time and keep it. So let’s talk about persisting it.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AkkaNET-5-Persisting-actors-state-events-HryniewskiNET"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fhryniewski.net%2f2017%2f05%2f11%2fakka-net-5-persisting-actors-state-events%2f" style="border:0px"/></a></div></div>Rafał Hryniewskihttps://dotnetomaniak.pl/Users/gCipifzCGUGnNtWDwLo7kg2017-05-15T20:29:42Zhttps://dotnetomaniak.pl/AkkaNET-5-Persisting-actors-state-events-HryniewskiNET4450As I’ve mentioned in previous posts about Akka.NET, everything that actor knows is stored in memory. While we can skip any database or IO related bottlenecks because things in memory are generally speaking very fast, we must remember that memory is not a place where you can store your data for an extended period of time and keep it. So let’s talk about persisting it.http://hryniewski.net/2017/05/11/akka-net-5-persisting-actors-state-events/http://dotnetomaniak.pl/Data/Thumbnails/small_-mLsq-nEkUe-Coj3OPGfEA.pnghttps://dotnetomaniak.pl/AkkaNET-3-Actor-selections-paths-and-references-where-should-you-send-your-messages-HryniewskiNETAkka.NET #3: Actor selections, paths and references – where should you send your messages – Hryniewski.NET2017-04-02T20:30:29Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_Rbpb0Akk10yH_fG-wwsVuQ.png"/></div><div>One of the concepts of actor model that could be hard to grasp at the begining is fact that we will not operate on direct reference to actor instance. This can be a bit confusing before you’ll get used to it but by not using any direct references you’re sure to achieve very good level of encapsulation.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AkkaNET-3-Actor-selections-paths-and-references-where-should-you-send-your-messages-HryniewskiNET"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fhryniewski.net%2f2017%2f04%2f02%2fakka-net-3-actor-selections-paths-and-references-where-should-you-send-your-messages%2f" style="border:0px"/></a></div></div>Rafał Hryniewskihttps://dotnetomaniak.pl/Users/gCipifzCGUGnNtWDwLo7kg2017-04-08T04:55:22Zhttps://dotnetomaniak.pl/AkkaNET-3-Actor-selections-paths-and-references-where-should-you-send-your-messages-HryniewskiNET3440One of the concepts of actor model that could be hard to grasp at the begining is fact that we will not operate on direct reference to actor instance. This can be a bit confusing before you’ll get used to it but by not using any direct references you’re sure to achieve very good level of encapsulation.http://hryniewski.net/2017/04/02/akka-net-3-actor-selections-paths-and-references-where-should-you-send-your-messages/http://dotnetomaniak.pl/Data/Thumbnails/small_Rbpb0Akk10yH_fG-wwsVuQ.pnghttps://dotnetomaniak.pl/AkkaNET-2-A-day-in-the-life-of-an-Actor-HryniewskiNETAkka.NET #2: A day in the life of an Actor – Hryniewski.NET2017-03-26T21:12:36Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_ILjpj-L2c0mG8P4uBD5Uzg.png"/></div><div>Let’s take a closer look at our actors, how their life looks like, what exactly they’ve been doing and what they can do. As they are basic building block of applications built on actor model it’s crucial to understand and being able to communicate with them.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AkkaNET-2-A-day-in-the-life-of-an-Actor-HryniewskiNET"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fhryniewski.net%2f2017%2f03%2f26%2fakka-net-2-a-day-in-the-life-of-an-actor%2f" style="border:0px"/></a></div></div>Rafał Hryniewskihttps://dotnetomaniak.pl/Users/gCipifzCGUGnNtWDwLo7kg2017-03-27T18:51:33Zhttps://dotnetomaniak.pl/AkkaNET-2-A-day-in-the-life-of-an-Actor-HryniewskiNET2340Let’s take a closer look at our actors, how their life looks like, what exactly they’ve been doing and what they can do. As they are basic building block of applications built on actor model it’s crucial to understand and being able to communicate with them.http://hryniewski.net/2017/03/26/akka-net-2-a-day-in-the-life-of-an-actor/http://dotnetomaniak.pl/Data/Thumbnails/small_ILjpj-L2c0mG8P4uBD5Uzg.pnghttps://dotnetomaniak.pl/AkkaNET-1-Creating-Actor-System-and-making-first-contact-HryniewskiNETAkka.NET #1 – Creating Actor System and making first contact – Hryniewski.NET2017-03-22T22:40:55Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_NugWbGA2MEO-311-yQtiAQ.png"/></div><div>In previous post I’ve explained briefly what actor model is and why it’s so fun. Today we’ll create our ActorSystem instance, learn what it is and send first messages to them. I hope it will be nice and easy start.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AkkaNET-1-Creating-Actor-System-and-making-first-contact-HryniewskiNET"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fhryniewski.net%2f2017%2f03%2f22%2fakka-net-1-creating-actor-system-and-making-first-contact%2f" style="border:0px"/></a></div></div>Rafał Hryniewskihttps://dotnetomaniak.pl/Users/gCipifzCGUGnNtWDwLo7kg2017-03-23T13:33:09Zhttps://dotnetomaniak.pl/AkkaNET-1-Creating-Actor-System-and-making-first-contact-HryniewskiNET2420In previous post I’ve explained briefly what actor model is and why it’s so fun. Today we’ll create our ActorSystem instance, learn what it is and send first messages to them. I hope it will be nice and easy start.http://hryniewski.net/2017/03/22/akka-net-1-creating-actor-system-and-making-first-contact/http://dotnetomaniak.pl/Data/Thumbnails/small_NugWbGA2MEO-311-yQtiAQ.pnghttps://dotnetomaniak.pl/AkkaNET-0-Actor-Model-Basics-HryniewskiNETAkka.NET #0 – Actor Model Basics – Hryniewski.NET2017-03-19T10:36:57Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_ma9a9JN4b06TZ2PhpK6csA.png"/></div><div>Actor model concept fascinated me since I’ve heard about it for the first time. It’s been on my todo list ever since and Get Noticed 2017 is great opportunity to give it a try. That’s why there is an actor responsible for almost anything in Me2.0. But, what is an actor, actor model and are benefits of using it in our projects? You’ll find out in a minute.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AkkaNET-0-Actor-Model-Basics-HryniewskiNET"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fhryniewski.net%2f2017%2f03%2f19%2fakka-net-0-actor-model-basics%2f" style="border:0px"/></a></div></div>Rafał Hryniewskihttps://dotnetomaniak.pl/Users/gCipifzCGUGnNtWDwLo7kg2017-03-22T07:40:04Zhttps://dotnetomaniak.pl/AkkaNET-0-Actor-Model-Basics-HryniewskiNET41380Actor model concept fascinated me since I’ve heard about it for the first time. It’s been on my todo list ever since and Get Noticed 2017 is great opportunity to give it a try. That’s why there is an actor responsible for almost anything in Me2.0. But, what is an actor, actor model and are benefits of using it in our projects? You’ll find out in a minute.http://hryniewski.net/2017/03/19/akka-net-0-actor-model-basics/http://dotnetomaniak.pl/Data/Thumbnails/small_ma9a9JN4b06TZ2PhpK6csA.pnghttps://dotnetomaniak.pl/AKKANET-zdalni-aktorzyAKKA.NET – zdalni aktorzy2016-02-08T19:27:42Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_jrkBwdJ7lUC_6U9AUisUvg.png"/></div><div>Jak wspomniałem w jednym z wcześniejszych już wpisów, nie ma znaczenia, gdzie aktor jest zlokalizowany. Dzięki AKKA.NET jest to szczegół konfiguracyjny. Jeśli pewnego dnia, stwierdzimy, że wykonywanie obliczeń na jednym komputerze nie wystarcza, wtedy po prostu zmieniamy konfigurację, aby hostować danego aktora gdzieś indziej. Framework zadba o komunikację (TCP) między węzłami znajdującymi się w innych sieciach. W ten sposób, bardzo łatwo jest sk...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AKKANET-zdalni-aktorzy"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fwww.pzielinski.com%2f%3fp%3d3071" style="border:0px"/></a></div></div>rroszczykhttps://dotnetomaniak.pl/Users/2o4PgKTTaUiL_ds1o3Nhxg2016-02-15T17:09:19Zhttps://dotnetomaniak.pl/AKKANET-zdalni-aktorzy1790Jak wspomniałem w jednym z wcześniejszych już wpisów, nie ma znaczenia, gdzie aktor jest zlokalizowany. Dzięki AKKA.NET jest to szczegół konfiguracyjny. Jeśli pewnego dnia, stwierdzimy, że wykonywanie obliczeń na jednym komputerze nie wystarcza, wtedy po prostu zmieniamy konfigurację, aby hostować danego aktora gdzieś indziej. Framework zadba o komunikację (TCP) między węzłami znajdującymi się w innych sieciach. W ten sposób, bardzo łatwo jest sk...http://www.pzielinski.com/?p=3071http://dotnetomaniak.pl/Data/Thumbnails/small_jrkBwdJ7lUC_6U9AUisUvg.pnghttps://dotnetomaniak.pl/AKKANET-Przyklad-obslugi-bledowAKKA.NET – Przykład obsługi błędów2016-01-06T09:50:26Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_IjXkScbt-Uisq2VDCeWrMQ.png"/></div><div>W poprzednim wpisie pokazałem, w jaki sposób możemy zaprojektować obsługę błędów. Jak widać mamy do dyspozycji sporo opcji. Z punktu widzenia AKKA.NET nie jest to jednak tak skomplikowane. Wystarczy przeładować jedną metodę i zwrócić odpowiedni obiekt.
Tak jak w poprzednim wpisie będziemy testować kod na następującym “systemie”:
Dla przypomnienia nasz ApplicationUserActor wygląda następująco:
public class ApplicationUserActor : UntypedActo...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AKKANET-Przyklad-obslugi-bledow"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fwww.pzielinski.com%2f%3fp%3d2986" style="border:0px"/></a></div></div>rroszczykhttps://dotnetomaniak.pl/Users/2o4PgKTTaUiL_ds1o3Nhxg2016-01-15T08:48:52Zhttps://dotnetomaniak.pl/AKKANET-Przyklad-obslugi-bledow11020W poprzednim wpisie pokazałem, w jaki sposób możemy zaprojektować obsługę błędów. Jak widać mamy do dyspozycji sporo opcji. Z punktu widzenia AKKA.NET nie jest to jednak tak skomplikowane. Wystarczy przeładować jedną metodę i zwrócić odpowiedni obiekt.
Tak jak w poprzednim wpisie będziemy testować kod na następującym “systemie”:
Dla przypomnienia nasz ApplicationUserActor wygląda następująco:
public class ApplicationUserActor : UntypedActo...http://www.pzielinski.com/?p=2986http://dotnetomaniak.pl/Data/Thumbnails/small_IjXkScbt-Uisq2VDCeWrMQ.pnghttps://dotnetomaniak.pl/AKKA-NET-definiowanie-sciezki-aktoraAKKA .NET – definiowanie ścieżki aktora2015-12-10T08:25:50Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_Tk4MHmXiskO6ddE_6yBAOQ.png"/></div><div>W poprzednim poście użyliśmy metody ActorSelection w celu uzyskania referencji do aktora:
var actor1 = system.ActorSelection("/user/ApplicationUserControllerActor/Piotr")
Dzisiaj chciałbym bardziej skupić się na definiowaniu ścieżki do aktora. Pełna ścieżka może zawierać następujące elementy:
– protokół
– nazwa systemu
– adres ip aktora
– seria nazw aktorów opisująca hierarchie np. ApplicationUserControllerActor/actor1/actor2 itp.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/AKKA-NET-definiowanie-sciezki-aktora"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fwww.pzielinski.com%2f%3fp%3d2949" style="border:0px"/></a></div></div>rroszczykhttps://dotnetomaniak.pl/Users/2o4PgKTTaUiL_ds1o3Nhxg2015-12-19T13:28:20Zhttps://dotnetomaniak.pl/AKKA-NET-definiowanie-sciezki-aktora2610W poprzednim poście użyliśmy metody ActorSelection w celu uzyskania referencji do aktora:
var actor1 = system.ActorSelection("/user/ApplicationUserControllerActor/Piotr")
Dzisiaj chciałbym bardziej skupić się na definiowaniu ścieżki do aktora. Pełna ścieżka może zawierać następujące elementy:
– protokół
– nazwa systemu
– adres ip aktora
– seria nazw aktorów opisująca hierarchie np. ApplicationUserControllerActor/actor1/actor2 itp.http://www.pzielinski.com/?p=2949http://dotnetomaniak.pl/Data/Thumbnails/small_Tk4MHmXiskO6ddE_6yBAOQ.png