microsoft / service-fabric-services-and-actors-dotnet

Reliable Services and Reliable Actors are Service Fabric application frameworks for building highly-scalable distributed cloud applications.
Other
269 stars 115 forks source link

I thinking about use Orleans or Service Fabric for a project #42

Closed gabomgp closed 6 years ago

gabomgp commented 7 years ago

I thinking about use Orleans or Service Fabric for a project, but I'm very new to both libraries. The question is: Orleans looks with a vibrant open source community (very active issues, commits and gitter). Orleans is implementing Transaction Support in v2 (issue 3369) and the only feature I really like (remember, i'm very new to the two) in Service Fabric that Orleans miss is support for reliable collections. Someone knows a updated comparison of the two frameworks (transaction support, and various features)?

Service Fabric' actors looks like the "official" actor-like library from Microsoft. Am i correct? Orleans is a insecure choice (exists the risk of abandonment from Microsoft)?

amanbha commented 7 years ago

Service Fabric is a platform and provides programming modes like Reliable Actors, Reliable Services, and container orchestration(to implement services for the platform. Orleans is a virtual actor implementation programming model and not the platform. Using the Service Fabric programming models will allow you to leverage the full power of the platform which includes locally replicated state, placement and load balancing, zero downtime upgrades, security, health reporting.

Jm-Fox commented 7 years ago

A while back I too was comparing Orleans to Service Fabric Actors. Ultimately I chose Service Fabric Actors as I see that Microsoft is heavily invested in it with little chance of walking away. While Orleans has community support now, there's not much of a guarantee of support in years to come.

Here's a helpful article I found while researching this: http://richorama.github.io/2016/07/08/orleans-vs-service-fabric/

I do not know how accurate that article is now, as it's more than a year old. For instance, Service Fabric Actors are now mostly (ish) open source, as you can see in this repository. From the article, there are only two things that bother me:

  1. Actor Events does not support actor to actor publisher / subscribers (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-reliable-actors-events)
  2. The article indicates that Service Fabric Actors must be written in Java to work on Linux

For 1, I have not seen any detailed explanation (and have not explored the source code here for the answer). My guess is that the implementation has the subscriber open up a TCP socket and talk to the publisher. That would explain why Actor Events ". . . should not be used for actor-to-actor communication" as TCP sockets wouldn't handle actor activation / deactivation in any way shape or form.

For 2, I had forgotten about this until now. I'm hoping that it's no longer the case, or soon not to be the case. I'm inclined to believe that this will be taken care of if not already with Service Fabric supporting .net standard 2.0. IIRC, one of the videos in the recent blog post (https://blogs.msdn.microsoft.com/azureservicefabric/2017/09/25/service-fabric-6-0-release/) says that Service Fabric will soon support .net standard 2.0.

Disclaimer: My research was not thorough; I am doing this for myself, not my employer. Just because I perceive Service Fabric to be best for me doesn't mean that it's best for you.

amanbha commented 7 years ago

@Jim-Fox You are correct about 2 above, with support for net standard 2.0 in SF, you can use Actors on Linux with dotnet core.

petroemil commented 7 years ago

@Jm-Fox I was just going through a very similar dilemma between Orleans and Service Fabric, and came to a similar conclusion as you did.

I'm also looking forward to see some of the more advanced features of Orleans (like Streams, Transactions or even the Dashboard) to show up in Service Fabric's Actors implementation.

Apparently we don't have to wait long before we get .NET Core support, which is a step ahead of Orleans.

I'd also like to hear about the roadmap for Open-Sourcing Service Fabric. I think nowadays it's a crucial requirement for strong community support, without it it's hard to take off. SF could be (actually is) a very strong competitor to Container orchestration systems like Kubernetes, but I think it could also serve as the foundation for Big Data frameworks like Spark or MBrace.

As of right now Microsoft's flagship backend product is ASP.NET (Core), which is great as a webservice framework, but in the world of Microservices, IoT, Big Data and Stream processing and "planet scale databases", it's just not enough, they have to push Service Fabric to be the next big thing for backend.

(Sorry for going a bit off-topic)

amanbha commented 6 years ago

@gabomgp Closing this because of no activity on this for a while, please feel free to reopen or start a new issue.

KTazayan commented 6 years ago

Service Fabric is open source now. Is there a chance that Orleans will be integrated more deeply with SF?

vipul-modi commented 6 years ago

https://github.com/Microsoft/service-fabric/issues/31