[DO NOT MERGE] Proof of concept for Content Store operating as publishing router #1306
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been thinking about how we might simplify publishing documents from Whitehall, so that we aren't consistently experiencing distributed transaction failures between Whitehall (and other publishing apps) and GOV.UK frontend.
One way we could solve this problem is to serve the content directly from the Publishing application. This would solve our distributed transaction failures, but lead to other problems such as performance, authorisation and routing. I think the latter set of problems are probably easier to solve.
This proof of concept shows a rough way we could use content store as a proxy to Whitehall for news articles. In reality we would need to be very careful about how we deliver this, probably making use of the scientist gem to ensure performance is satisfactory. Caching could easily be done much closer to Whitehall though to the cache easier to invalidate than it is via Publishing API.
The nice thing about this is that it can be implemented content type by content type and doesn't require the introduction of any new services or technologies into our system.
Accompanying Whitehall PR: alphagov/whitehall#9345