TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reactive Cloud Actors: No-nonsense micro-services

41 pointsby aliostadabout 11 years ago

8 comments

bananasabout 11 years ago
My bullshit detector was tripped by the number of buzzwords.<p>What does this actually solve versus say traditional MQ (EIP stuff), service bus systems and normal SOA?<p>I&#x27;ve dealt with NServiceBus extensively and really big scale .Net stuff and if it&#x27;s anything remotely close to that architecture, I&#x27;d rather hang myself than use it again.
评论 #7581630 未加载
mmlabout 11 years ago
He&#x27;s certainly on to something. As he pointed out, it&#x27;s been around since about &#x27;73, and many people are happy with the design of such systems. Amazon even has an actual for-real implementation of one (see Simple Workflow), he should probably try it out before rolling his own.<p>It really is an elegant way to do things from what I can tell. It forces you to keep your state in one, carefully managed place (hairball), rather than sprinkled around god-knows where, being poked and prodded by god knows what....<p>IMHO, There should be more talk about the design of actor based systems than the glut of OO yammering we are all exposed to.
zenbowmanabout 11 years ago
Another case of reinventing the wheel and calling it something new. This is just a reimplementation of what used to be called the &quot;blackboard architecture&quot;.<p><a href="http://en.wikipedia.org/wiki/Blackboard_system" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Blackboard_system</a><p>I don&#x27;t see how broadcast is more &quot;reactive&quot; than singlecast. And the solution to tight coupling in actor systems has already been thought of - it is a message broker. This is just an actor system where every actor shares a single message broker.<p>Its cool that you built your own system for actors, and I certainly wouldn&#x27;t discourage people from reimplementing something for the sake of learning, but every criticism you have of traditional actor systems is inaccurate. Strangely enough, you criticize Orleans in particular, which is especially good about tackling the coupling problem by making actor references virtual.<p>&quot;Perhaps the central problem we face in all of computer science is how we are to get to the situation where we build on top of the work of others rather than redoing so much of it in a trivially different way.&quot;<p>-Richard Hamming
mamcxabout 11 years ago
The big problem with this kind of stuff is how debug them. Also, that despite the intention, all is really coupled: Don&#x27;t make sense to cancel a order before create it, so the order of the actions are important.<p>The benefit is (only ?) easy of scaling, IMHO. How solve this? I understand that GO keep the ordering of the calls and is not harder than doing imperative...
评论 #7582700 未加载
th0br0about 11 years ago
Isn&#x27;t this what <a href="http://akka.io" rel="nofollow">http:&#x2F;&#x2F;akka.io</a> does?
评论 #7582970 未加载
mercurialabout 11 years ago
Fun. I accidentally used this pattern (minus the timestamp, since it wasn&#x27;t relevant for my use case) to implement a non-distributed data processing framework on top of POE. It does work pretty well, however, you need to have a way for the actor to block until enough messages have arrived (sometimes buffered operations are the most efficient). I&#x27;m not sure how you would do that with the model proposed here.
mantrax4about 11 years ago
This guy seems uneasy with Actors. His example is wrong and then he tries to solve it with a solution that&#x27;s worse than the problem he thinks he has.<p>Let&#x27;s untangle that stuff. Actors are about conversations between folks organized, like you would find in a good company. So let&#x27;s use the conversation metaphor.<p><i>His example of &quot;classical&quot; actors:</i><p>- PaymentActor (to herself): Someone told me to process a payment from this order. I&#x27;m done.<p>- PaymentActor: Hey, FraudCheckActor, check if this order I&#x27;m giving you is a fraud.<p>- FraudCheckActor (to herself): Damn, this is a fraud.<p>- FraudCheckActor: Hey, CancelOrderActor, cancel that order I&#x27;m giving you!<p>- CancelOrderActor (to himself): I canceled the order.<p>Now I see an immediate problem here. This is anarchy. No one is in charge of the whole process, everyone runs to talk to someone else, and passing around that order data and there&#x27;s no conversation happening here. Would someone in a real company organize things this way? Not in a good company, for sure!<p><i>Let&#x27;s see what his solution is:</i><p>- PaymentActor (to herself): Someone told me to process a payment for this order.<p>- PaymentActor (screaming): Everyone! Payment is complete for this order! (screams the order info to everyone)<p>- FraudCheckActor (to herself): I heard that, I&#x27;ll check it. Damn, this is a fraud.<p>- FraudCheckActor (screaming): Everyone! This order is a fraud! (screams the order info to everyone)<p>- CancelOrderActor (to himself): I heard that, I&#x27;ll cancel that order.<p>- CancelOrderActor (to himself): I cancelled it.<p>Now I see an even bigger problem here. It&#x27;s still a god damn anarchy, but now also <i>everyone is screaming at everyone</i>, including the entire order data, or <i>talking to themselves</i>. How is this better again?<p>Plus notice, there&#x27;s still state in the system - the subscription setup. The only thing achieved here is that it&#x27;ll be nearly impossible to reason about how this thing works once it becomes more like a real-world scenario.<p><i>Here&#x27;s how you design it with Actors, once you have some experience:</i><p>- OrderActor: Hey, PaymentActor, process this payment and tell me what happened.<p>- PaymentActor: Hey, OrderActor, I processed it. It&#x27;s good!<p>- OrderActor: Hey, FraudCheckActor, check this order for fraud and tell me what you found.<p>- FraudCheckActor: Hey, OrderActor, damn! This is a fraud!<p>- OrderActor: Hey, CancelOrderActor, cancel that order and tell me when done.<p>- CancelOrderActor: Hey, OrderActor, I canceled it!<p>Now what do we see here? We see structure. We see clear responsibilities. We see teamwork. No screaming and no chaos. Only OrderActor has the entire order data. He&#x27;s passing along only the needed bits to each actor according to their responsibilities.<p>And best of all, PaymentActor, FraudCheckActor and CancelOrderActor are not coupled to each other. They just respond to their events, limited to their own responsibilities.<p>Good job OrderActor &amp; co.<p>OrderActor is a supervising actor (that&#x27;s an actual term). In my example, he&#x27;s managing the workflow and he is <i>stateful</i> and as you see it&#x27;s not that scary and out-of-order as the author is telling you. After all, he needs to know the payment went through, and then remember to ask for a fraud check and know what to do after that.<p>(Note: technically the supervisor in this example doesn&#x27;t have to have state, he can just react to the events by Payment, FraudCheck, and Cancel, but this only works in this very simple example. Real world scenarios never fit into a completely stateless world. We&#x27;re talking about the order <i>state</i> here!)<p>The other actors have no state (that is seen in this example). So proper design isolates concerns, and may have stateless actors, but stateful actors <i>are</i> essential to the model.<p>Of course, the linked article demonstrates how you can shoot yourself in the foot even with the best model out there. I find it ironic that the author was unhappy with over-complications and coupling, yet coupled everything in a complicated way with his &quot;subscriptions&quot; model, instead of simply using a supervisor.
评论 #7584354 未加载
评论 #7583880 未加载
orasisabout 11 years ago
Sorry, I couldn&#x27;t get past the terrible whitish text on blackish background. Instant headache.