Hi Bryn, On Thu, Oct 30, 2014 at 7:20 PM, Bryn Keller <[email protected]> wrote:
> Thanks, Endre. > > I'm not quite clear on what you're saying - I understand Akka wants to > work in peer-to-peer mode, but I don't understand this part: > It is not about Akka wanting to work in peer-to-peer mode, it is *Akka Remoting* wanting to work in P2P. > > This does not mean that you cannot use Akka in a Client-Server setup >>> though, but you will need to implement your own client-server connection. >>> This can be done over pure TCP using akka.io, but you can also make a >>> REST endpoint using Spray server and client. >>> >> > Are you saying that Akka *can* work client-server if I implement some > class or classes myself and configure Akka to use it/them, or are you > saying that I can't use Akka for communication between client and server in > this scenario at all (other than Akka I/O, which is not what I'm asking > about)? > No, what I wanted to say that Akka Remoting is not the only possible way to connect actor systems. The main goal of Remoting is to provide complete location transparency of ActorRefs, but that implies peer-to-peer operation. Clustering is also a P2P technology and works on top of Remoting. Remoting is recommended to be used in large cooperative backend systems where this P2P trust relationship is fine. If you want to have Akka systems in a pure client-server setting then you should use an *alternate *mechanism of communication between them instead of remoting. One option is to use Akka IO and build a TCP connection between the two systems. Other option is simply to use HTTP, and implement a restful service on the server which you connect to from the client. Spray provides all these tools and is working on top of Akka. > > If I need to implement some custom transport for Akka myself, how would I > go about that? "Akka custom transport" doesn't produce much in a Google > search, are there some other resources? > Custom transports will not work here. The assumption of complete symmetry between actors is deep in the underlying actor model and implies the P2P architecture. I.e. you cannot build a non P2P transport without breaking location transparency. > > To be clear, I have an existing third party application that uses Akka > actor systems for remote communication, so I would prefer a solution that > lets me simply configure Akka to use some custom built components rather > than having to completely change the interface between client and server. > Is this possible? > No, this is not possible. Also, due to location transparency if you use remoting to connect clients, then it can accidentally happen that an ActorRef from one client leaks to the other, or an ActorRef from the backend leaks (the sender field is enough for that to happen). By using a clearly demarkated interface: - you prevent leaks and decrease the trust between client and system - you are free to evolve your client-server protocol no longer tied to Akka, maybe exposing it to 3rd parties later -Endre > > Thanks, > Bryn > > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Akka Team Typesafe - The software stack for applications that scale Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
