route do from "<logical service name 1>" # occurs once to "<logical service name 2>" # occurs 0 or more times end
route from "<logical service name 1>" to "<logical service name 2>"
route do
from "<logical service name 1>" # occurs at most once
to "<logical service naem 2>" # occurs 0 or more times
broadcast do # occurs at most once within an enclosing route
route to "<logical service name 3>" # occurs 0 or more times
route to "<logical service name 4>" # occurs 0 or more times
end
end
Note that for route used nested inside a broadcast (and in turn top level route) there is an implicit "from" as the message is piped from the preceding keyword and no "from" declaration is used:
Nexted route:
...
route do
to "<logical service name 2>" # occurs 0 or more times
end
...
route "<my-route-name>" do to "<logical filter name 1>" # occurs 0 or more times to "<logical service name>" # occurs once end
The named route "endpoint" can be referenced in the other IFL construct like any other service, i.e. to call the above one or more other routes could state (assuming a name of my-route-name):
route do from "my-trasnport" to "some-transform" to "my-route-name" end
Example: an RSS service routes any new entries to an instant messaging server
route do from "cnnnewsfeed" to "IM" end
This declares the classic pipe and filter pattern; output from the preceding service (whether "from" or previous "to") it piped to the input of the next "to"
Example: an RSS service routes any new entries to filter implemented in JRuby, the output of the filter is routed to an instant messaging server
route do from "cnnnewsfeed" to "jrubyfilter" to "IM" end
Example: an RSS service routes any new entries to a broadcast enterpise integration pattern (composite construct), which sends a copy each in parallel to multiple services; in this case both to an instant messaging server and a file archive
route do
from "cnnnewsfeed"
broadcast do
route to "IM"
route to "filearchive"
end
end