How to "publish" a large number of participants in CAF?

I just found out about CAF, the C ++ Actor Framework .

One thing that surprised me is that the way to make an actor available over the network is to “publish” it to a specific TCP port.

This basically means that the number of participants you can publish is limited by the number of ports you have (64k). Since you need both one port for publishing an actor and one port for accessing a remote actor, I assume that each of the two processes will be able to share at best about 32 thousand actors each, while perhaps each of them will contain a million participants on the commodity server. It would be even worse if the cluster had, say, 10 nodes.

To make the publication scalable, each process only needs to open 1 port for each actor in one system and open 1 connection to each existing system that they want to access.

Is there a way to publish one actor as a proxy for all participants in the acting system (preferably without any significant performance loss)?

+4
source share
2 answers

Let me add some background. The middleman::publish/ parameter middleman::remote_actorperforms two functions: connecting two instances of CAF and providing a handle to communicate with the remote player. The actor that you "publish" for this port must act as an entry point. This is a convenient rendezvous point, nothing more.

, - . , - , . remote_actor - . , , , . .

, CAF TCP- . 10 A "" 10 B remote_actor, , CAF 10 ( node ), .

, publish/remote_actor, middleman::open middleman::connect. CAF . connect a node_id . , . .

( - )?

, . 1000 , .

, , - , .

: CAF . atom, 10 . , strong_actor_ptr . , , : (. actor_system::registry), middleman::remote_lookup ( node_id).

+1

() -

, ( , CAF ) { inproc:// | ipc:// | tcp:// | .. | vmci:// } , , .

- , , "" , , (eventloops , /// - - , - ...).

, CAF , TCP:

O/S ISO-OSI :

sudo ip address add 172.16.100.17/24 dev eth0

, IP- - /etc/network/interfaces ( Ubuntu) , :

iface eth0 inet static
    address 172.16.100.17/24

iface eth0 inet static
    address 172.16.24.11/24

, , CAF , TCP (: #) - .

+1

Source: https://habr.com/ru/post/1686065/


All Articles