Choosing Go to implement the new GOV.UK router(gdstechnology.blog.gov.uk) |
Choosing Go to implement the new GOV.UK router(gdstechnology.blog.gov.uk) |
I have nothing against Go (in fact I like it) but they seem to have built GOV.UK with every damn bit of technology there is available. I've seen Varnish, Go, Ruby, Python, Scala, Java, Mongo, MySQL, nginx, rails, sinatra, Django and PILES of Not Invented Here.
Also I'm not sure it's a great use of public money to build stuff like this when they should have nginx/apache up front and some configuration.
In fact this whole thing stinks of crappy information architecture resulting in a massive front end router hack that they did in Scala, binned and moved to Varnish, then binned and moved to Go.
This is not one "cohesive" web front end. It's a rat's nest and an increasingly expensive one.
This is all outlined in the blog post - perhaps not as clearly as I would have liked, though!
Varnish is different as that requires restarting.
We do the same with commercial kit (Riverbed) with over 140 HTTP application endpoints and that is higher friction than the equivalent setup yet we manage it with a mere 1 person...
Deployment is a solved problem. No offense but you're not Google!
It seems they're allowing team members to play with "language of the week" (lotw), build something that's then used in production without the rest of the team knowing the lotw, that member moving on and then rebuilding it in a new lotw 6 months later. no doubt this GO implementation will go the same way at a later date.
I'm not opposed to using a lotw in production with other languages and such, but it needs to be done in a thought out manner with the whole "what if the project lead gets hit by a big red double decker" mentality.
source: I used to work for local government
However it doesn't excuse people working on a web site funded by the taxpayer using it as a technology playground.
Establishing technical standards and homogenity is important on projects of this scale.
Though they do seem to be using all the new toys maybe a bit more thought about which technology to use rather than jumping from technology to technology.
We publish several huge legacy applications, several huge new applications, several integrations, public web site, documentation, online support. A mere 80-100 million HTTP transactions a day.
Not once have we built something to do it all.
People make changes to their infrastructure. The govuk team are at least brave enough to blog about it, and offer the code up for inspection. Can you post links to similar public contributions you have made?
I'm sure if you joined the team you'd wave your magic wand and everyone would fall in line, and things would be beautiful. Right.
Oh, and I'm sure the golang community are really, really pleased that "in fact, [you] like it" - very charitable of you!
I can't wait to see what you've been up to.
Uk.gov is just the cherry on the top of an old and creaky enterprise design that hasn't kept pace with changes to its mission or the world around it.
The same applies to people working under me.
... something something blub something something agile rockstar ...
Scala is a large and complex language, encompassing multiple programming idioms. Teams programming Scala (as with C++ and many other "large" languages) often have difficulties nailing down what portion of the language they are going to use. "Java-without-semicolons" all the way through to idiomatic, functional Scala.
Go is a relatively small, simple language. You could easily learn Go's basic syntax and semantics in an afternoon or two. Simplicity and suitability for programmers is an explicit design goal.
Switching away from Scala due to lack of experience while simultaneously picking up Go is not as illogical as everyone seems to be implying.
I think the argument in the blog post is weak because it does not quantify what makes Go more suitable for learning than say, Erlang or Clojure, which are dismissed outright, before moving on to discuss some of the advantages of Go in depth.
* No one having a deep knowledge of Scala is mentioned as a problem,
but they will learn Go.
* They rule out a language because of its syntax.That and I suspect there was some wishlists on what people wanted to do in the mix, like COBOL, still used but people just do not want to learn that as it is deemed so last century in comparsision to say java, though they are altogether different fish. Bit like the difference between a proxy and a router, what sounds better on a CV.
I suspect that from a maintenance aspect that the GO code will be much easier to support and grow as and when needed as well as scaleability.
Still it is most encouraging to see such a young language like GO get so much respect and use so quickly in a enviroment that has to many in the past and present been slow to adapts new technology. But there again many Govermental departments still have XP, albeit used as a fancy terminal to some old mainframe application that just ticks along.
* Reverse proxy, forwarding requests to and serving responses from multiple backend servers on a single domain.
* Redirector, serving HTTP 301 and 302 redirects to new URLs.
* Gone responder, serving HTTP 410 responses for resources that used to but no longer exist.
Does anyone know why they have this as a separate piece of software instead of getting nginx to do it?Looks like they didn't actually try it or know about it which is worrying.
Either that or it was more interesting to do it in Go which is not a valid reason in a taxpayer funded site.
"Scala is great for performance, but quite bad at resource usage"
Maybe it's directly related to the next statement: "No-one in the core GOV.UK team had a deep knowledge of Scala, and particularly how the old router worked"
But the first statement, literally, does not make sense on its own.Oh, then it's OK. It's always reasonable and a safe bet to rewrite something instead of understanding how something works, because after all, your predecessors were a dumb bunch and you (using Go! how cool is that!?) obviously know much more.
Why? There are other resources than CPU time, e.g. memory.
Is there a different definition I'm missing? I think, a car can be "fast" and take too much fuel, but (in my book) a programming language cannot be "great for performance" while being bad at resource usage.
If it's good enough for Cloudflare it probably is good enough here.
Besides, Varnish also would have excelled (yes I read the first post in the series) if they had just stored the configuration in a saner format and then output the required VCL when the config changed and reloaded on the fly.
Both of the technologies I would've picked (nginx and Varnish) were in their stack.
I love working in Go, but reading this feels like a reinvention of the wheel. Go would be my choice only if these other things didn't exist already and you had to start from scratch.
The biggest pain identified was the writing, maintaining and loading of the router config. Openresty could've solved that.
Also I'd Erlang is state of the art, even though it is so old (Haskell too), but I wouldn't call it an entirely safe bet because it requires quite a different style of programming and experience, so might not work well for certain developers.
They lack an architectural oversight, that they should really be using one(ish) language rather than a big mix of languages so that this doesn't occur again when no one on the team knows GO because the project leads taken a new job.
A crappy PHP dev will learn Go a hell of a lot quicker than Scala, IMO. A safer choice, for their team and position, IMO.
There are good arguments for trying new technologies, but this particular instance seems to be a very good example of how such a strategy can go terribly wrong.
[Edit] On second thought, I might be jumping to conslusions as I don't know anything about how successful they are in actually achieving their goals, doing it on budget or how fun it is to work there. Their actual approach may be less confused than the blog post makes it sound.
Hell, some people like Perl! :p
I've lost count of the amount of times I've seen Oracle products bought based off the back of Oracle's keen sales people overstating the value of their post sales support.
Plus since there's so many redundancies happening in local government, they don't like train and retain skilled in house staff who would have been able to offer the same level of support. So 3rd party support is seen as more reliable than in house.
Lastly, many project managers push for such contracts because it means they can deny responsibility (ie if Oracle fucks up, they can blame Oracle. But if the system goes down and they're responsible for their own support, then the buck stops at the project managers). So you often get project managers push for such contracts just out of laziness.
There might be a case that this legislation might see more contracts signed with open source vendors who provide support, but local governments will always still have the argument that MS / Oracle are big trusted names where as a less known (outside of the world of IT) open source vendor may not be able to provide the scale of service that the government wants (complete BS of course, but all to often these decisions are made by project managers who know jack shit about IT)
Overwhelmingly the core information management and processing is on the local IT infrastructure of each department. GDS is unifying the web presence and some of the citizen identity systems, its not fundamentally taking over the core information systems of state.
EDIT: To be clear, I think something like GDS should take a long hard look at the core information systems of state and start again with a clean slate breaking the technology and the data out of the policy silos.
Getting publications together in one place will be a great start (which is being helped by the public bodies transition).
If your site is volatile enough that the routing needs to change that often then there is something wrong either with your information architecture or your development process.
It really sounds like a dynamic front-end that is aware of the routes would be a much better idea, far less that can go wrong.
1. take s01 out of pool.
2. migrate config on s01 to new config.
3. put s01 back in pool.
4. take s02 out of pool
5. migrate config on s02 to new config.
6. put s02 back in pool.
Ansible can handle this quite happily. Scales up to any number of boxes. For an (n-1)/n capacity reduction during deployment.
I've got a 450k apache config somewhere that takes <1 second to reload so I don't think that's a major issue.
Also if you have THAT much config, something is wrong with your information architecture (see my other points).
The biggest point of failure is always humans and you're basically handing them a gun there.
There's significant thawing of that attitude (and gov.uk, for their imperfections, is definitely a very positive part of the trend) but the idea is alive and well.
Unless you clearly say you're not just some enterprise business that aren't exactly known for their technical competence this comment is totally ambiguous.
Do you just think you know what you're talking about, or do you actually?
Where as developing stuff in house means that you're employing significantly cheaper labour (namely, the rubbish salaries that most get in the public sector vs the private sector) and as a bonus the cost is more likely going to stay within the UK (ie you're not paying multinational companies nor their overseas consultants (Oracle was particularly bad for this as they dumped our stuff in a US data centre and our support contacts were all living somewhere in eastern Europe. So very little - if anything - provided was UK based).
Sadly our government doesn't seem to understand about doing anything in between - or at least not that I observed when I used to work there. It was either entirely bespoke or entirely bought, developed and set up by some overpriced conglomerate (or worse yet, outsourced completely). So going by the trends that I've witnessed, I'd rather the technology playgrounds just so long as they remain developed in house.
Just because the organisation uses open-source software doesn't excuse them from public and professional scrutiny.
An MP spending £1645 on a duck house under expenses got a lot more attention than this little bit of waste. Just redressing the balance.
You don't have to take my opinion seriously. I could work in Tescos and be splurging false information out on the Internet. I could be an elaborate hoax!
However, please don't write off people as "just some enterprise business that isn't exactly known for its technical competence" because we all know that startups get it right all the time as well...
As for do I know versus do I think, there is the third option do others know and that is all that is important when it comes to getting paid...
And at least they have avoided any healthcare.gov and RBS fiascos - Though I suspect that Universal credit is going to be a real CF
Efficiency is a major problem in government. Government should have a low financial impact on society where possible. A government entering a market with an already solved problem is wasteful at best. If they'd contributed time to Nginx or mod_proxy then they would have a net positive social effect.
But they didn't. They built an inferior product at great cost to the taxpayer.
Is this some sort of Markov-chained free-market/El-Reg-at-its-most-prolix/libertarian experiment in satire? Well played!
Various governments are already throwing money at Open Document Foundation (France, Germany come to mind) to support LibreOffice so why shouldn't we throw a few quid at nginx/apache?
Or should we go and write our own office suite?