"Wildcard" for Akka configuration file
Need a "wildcard" syntax for Akka configuration file.
Example: Deploy a "Creator" actor on local machine, which then deploys "Master" actors on several remote machines. Each "Master" then deploys several "Worker" actors on their own machine to do the computation. The path for each of these Worker actors then looks something like:
/creator/masters/c1/workers for the first remote machine
/creator/masters/c2/workers for the second remote machine
etc...
If you do not specify the /c1, 2, 3, .../ you will get an error message like:
Caused by: akka.config.ConfigurationException:router Actor[akka://Listener/remote/Application@<MY LOCAL IP>:2552/user/creator/masters/c1/workers] needs external configuration from file (e.g. application.conf)
Having a wildcard notation would help so users could do something like
/creator/masters/*/workers
to indicate all "Worker" actors that are lower in the hierarchy that has a "Creator" as root and "Master" as Creator's child.
-adelbertc
Example: Deploy a "Creator" actor on local machine, which then deploys "Master" actors on several remote machines. Each "Master" then deploys several "Worker" actors on their own machine to do the computation. The path for each of these Worker actors then looks something like:
/creator/masters/c1/workers for the first remote machine
/creator/masters/c2/workers for the second remote machine
etc...
If you do not specify the /c1, 2, 3, .../ you will get an error message like:
Caused by: akka.config.ConfigurationException:router Actor[akka://Listener/remote/Application@<MY LOCAL IP>:2552/user/creator/masters/c1/workers] needs external configuration from file (e.g. application.conf)
Having a wildcard notation would help so users could do something like
/creator/masters/*/workers
to indicate all "Worker" actors that are lower in the hierarchy that has a "Creator" as root and "Master" as Creator's child.
-adelbertc
Leave a comment
Updating tickets (#520, #852, #857, #874, #935, #950, #1364, #1508, #1542, #1559, #1734, #1744, #1755, #1782, #1812, #1824, #1831, #1858, #1871, #1880, #1886, #1892, #1896, #1899, #1929, #1930, #1950, #1952, #1953, #1962, #1966, #1969, #1972, #1973, #1977, #1978, #1986, #1988, #1993, #1999, #2000, #2003, #2005, #2006, #2015, #2016, #2019, #2021, #2022, #2023, #2024, #2025, #2029, #2031, #2032, #2036, #2046, #2048, #2051, #2055, #2059, #2061, #2062, #2064, #2065, #2068, #2072, #2074, #2076, #2078, #2079, #2085, #2087, #2088, #2089, #2090, #2091, #2092, #2093, #2095, #2098, #2099, #2100, #2101, #2102, #2119, #2129, #2134, #2135, #2136, #2144, #2147, #2148, #2156, #2166, #2168, #2172, #2174, #2178, #2183)
Hi,
Thanks a lot for this improvement.
I tried this in 2.1.0-RC6, and it works for substitution of a whole path element, like "/creator/masters/*/workers", while does not work for part of that, like "/creator/masters/prefix_*/workers", while in this document: http://doc.akka.io/docs/akka/2.0/general/addressing.html#Querying_the_Logical_Actor_Hierarchy, it states that it could be part of the path element.
So here it feels like inconsistent.
Thanks a lot for this improvement.
I tried this in 2.1.0-RC6, and it works for substitution of a whole path element, like "/creator/masters/*/workers", while does not work for part of that, like "/creator/masters/prefix_*/workers", while in this document: http://doc.akka.io/docs/akka/2.0/general/addressing.html#Querying_the_Logical_Actor_Hierarchy, it states that it could be part of the path element.
So here it feels like inconsistent.
on 2012-12-27 20:18 *
By viktorklang
First of all, you must not confuse an ActorSelection with a DeploySelector, as the ActorSelection is a 1-N mapping and a DeploySelector is a N-1 mapping.
If you can spec the behavior and make it performant and intuitive, I'm all ears.
Only one deploy directive can be applied, how will you solve:
/foo/*a*
/foo/**a*
/foo/ba*
/foo/*ar
/foo/*
/foo/***
now imagine I try to create the actor "/foo/bar", keep in mind that we cannot search ALL deploy directive for every actor creation, since that'd be an O(N) operation (i.e. too slow), and what does the user expect to be applied to /foo/bar?
Cheers,
√
If you can spec the behavior and make it performant and intuitive, I'm all ears.
Only one deploy directive can be applied, how will you solve:
/foo/*a*
/foo/**a*
/foo/ba*
/foo/*ar
/foo/*
/foo/***
now imagine I try to create the actor "/foo/bar", keep in mind that we cannot search ALL deploy directive for every actor creation, since that'd be an O(N) operation (i.e. too slow), and what does the user expect to be applied to /foo/bar?
Cheers,
√