Bring the router service to engines
See original GitHub issueWould be really cool, if we could bring the RouterService
to engines as well. I propose keeping the exact same API, but adding an *External
variant for all methods, just like we are doing with the route extension:
Implementing a proper RouterService
for engines would also allow us to refactor the route-ext
and also add the missing *External
methods to Route
and Controller
for symmetry.
I’ve done a PoC service which I am using for my projects, but it would be great to have an official solution that does not rely on dirty hacks.
Links
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:15 (14 by maintainers)
Top Results From Across the Web
Cisco Integrated Storage System CLI Administrator Guide
Enters global configuration mode on the host router. Step 3. interface integrated-service-engine slot/0. Example: Router(config)# interface ...
Read more >Cisco ISR G2: Services Ready Engine - YouTube
Brief demonstration showing how services can be delivered ... Cisco ISR G2: Services Ready Engine ... On the Inside - Cisco 2811 Router....
Read more >Cisco 3900 Series Integrated Services Router - Configuring ...
... Services Router - Configuring Services Ready Engine (SRE) Service Modules ... Procedure to configure the SRE service module interface on the Cisco...
Read more >Use swarm mode routing mesh - Docker Documentation
Docker Engine swarm mode makes it easy to publish ports for services to make them available to resources outside the swarm. All nodes...
Read more >Routing Engine Overview - Technical Documentation - Support
The Routing Engine is a key component in the router. It is primarily responsible for the protocol intelligence of the router. Thus, it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@villander No worries, I understood you right the first time. ☺️
The idea behind engines is to encapsulate a part of the application from the rest. Any references / dependencies to the host app should be explicit and declarative. This is why services are explicitly injected into the engine. The same goes for routes (
externalRoutes
).Allowing users to
transitionToExternal
by URL would break with that principle. The fully qualified URL can only be known by the host app. This detail should thus not be exposed to / accessible by the engine. The engine only knows about theexternalRoutes
names.The need to transition by URL from inside an engine is an indicator for a leaky engine that is not fully encapsulated. Imagine it this way: You should be able to take that engine and drop it into any other app and be able to run it, as long as the expected external
services
andexternalRoutes
were passed into the engine.If you still, for whatever reason, need to trigger a transition by URL from inside the engine, you can pass the host app’s “real”
router
service into the engine asexternal-router
and calltransitionTo
on it directly.PSA for anyone subscribed to this issue: @SergeAstapov has submitted RFC 819 “Public router service”, which makes the
RouterService
available to engines in accordance with #691 “Merge internal and external route namespace, drop*External
methods &<LinkToExternal>
”.