简体   繁体   中英

Akka.NET + Photon Server

Is it possible to use Akka.NET with Photon Server?

Can't find any info about this.

How scalable this solution? Found some articles about Akka + Scala game servers, but nothing about Photon + Akka compatibility.

You can absolutely do that. Create a razor thin actor system in photon and have it collaborate via remoting/clustering with your backend services running Akka.

This should be a very scalable solution. If you design the system right, you'll get the scalability of photon on the frontend and then can create an elastically scalable backend cluster using Akka which should suit you very well.

UPDATE: Got more info from OP about intended use case: "to use Akka for our backend services communication while photon directly connected to game client."


ORIGINAL ANSWER:

tl;dr yes they appear to work together, although you'd probably use Akka for more core game logic than the networking layer in this case.

I haven't used Photon, but skimming the site, it looks like you could use Akka on a Photon server. What isn't clear is how the networking capabilities of Akka and Photon might clash, as it appears that Photon is primarily aimed at wrapping and managing the network for you. Akka.Remote & Clustering that too, but are lower-level (Akka modules aren't opinionated about what you do with them, whereas Photon's logic is aimed at specific game-related approaches). So pay close attention there as you move toward a multinode setup.

The networking/clustering layers of Akka, combined with the fact that Akka is a distributed/concurrent programming framework, suggests that you could actually use Akka to write your own game server. That is, you could create something like Photon using Akka. In fact, I've had conversations with several engineers doing just that over the last few months.

That said, I totally get that you might not want to do that if Photon is already doing what you want and you know it. It seems that Photon is wrapping the network and have built in logic for load-balancing and multiplayer interaction. So you should be able to use Akka on the receiving end of their RPC framework and model the rest of your application using actors quite easily.

Try it and tell us what happened in the community chat !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM