Hacker News Comments on
Building a Bank with Go
Matt Heath
·
InfoQ
·
131
HN points
·
1
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.⬐ danesparzaGreat presentation on use of Go to build large distributed apps. Good open source tech developed there (see https://github.com/monzo). Also -- They appear to be hiring (located in the UK): https://boards.greenhouse.io/monzo⬐ johnmarcusi wish my company was using Go for it's SOA instead of node.js. so much less overhead to run that neatly compiled binary than the dependency hell which is node.js. probably because node.js is hardly a language and almost every basic function needs to be imported from some third party, which also feels not so safe, as a sys admin. go is also easy to use.⬐ LunaSea⬐ mattheathAt least Node.js has a built in package manager and not Github link hell like Go.⬐ bpicolo⬐ Bombthecatnpm isn't a built-in package manager. It's commonly packaged alongside node, sure.⬐ LunaSea⬐ bigdubsIt's separate to the language but there is actually an NPM version inside the Node.js repository if you build from source.we use `govendor` to inline dependencies in tree; removes npm as a critical path when deploying, also means we can review dependency code changes like normal code changes.⬐ notheguyouthinkFwiw, Go has an official package manager in development. Granted, they'll still be using repos rather than a central host.There is no soap library in go.Or at least it is so basic, that it is useless (at leat I couldn't find any)
If you are a bank (or any old firm) . You need soap.
A lot.
⬐ masom> almost every basic function needs to be imported from some third party, which also feels not so safe, as a sys adminGo (and most languages) also supports importing a lot of packages from third-parties. Just pin your dependencies to specific known versions and do hash verifications.
Hi, author here. Happy to answer any questions!⬐ lifty⬐ rubatugaHi there, I scrolled through the video and also read the blog post describing your stack and couldn't find anything about your data modeling and persistence layer. To me that is the most interesting part since you are a bank but at the same time you are using a micro service based architecture. Is there any information available about what database you use and how you manage your data?⬐ mattheath⬐ jucooWe store the vast majority of our data in Cassandra, which gives us tuneable consistency and high availability given its master-less architecture. Those properties suit the rest of our architecture perfectly, though there are of course trade offs involved. Each service then has its own keyspace and is unable to access the data of other services.⬐ bsaulI'd be much more interested in understanding how you managed to handle banking level transaction on a non rdbms system like cassandra, than how you coded some logic in go.Thanks for the talk Matt. Lots of really good detail there. Working with both Go/Java and Microservices. One question I have is how critical is linkerd to having a dependable microservice mesh? Another question is what did you use for async services?⬐ mattheath⬐ dmixYou're welcome! In our case linkerd is critical to this, as we've offloaded load balancing, circuit breaking, and retry policies etc to linkerd. If we hadn't then we would need to implement this functionality in multiple languages (though we mainly use go) and keep these in sync as we developed our platform, which from my experience is quite difficult. Using linkerd largely removes this from us, meaning we have a well tested method of inter-service RPCs, and we get free feature development ;) For async processing we're using Kafka, which powers the majority of our event sourced architecture.For some reason https://monzo.com/ crashes in both Chrome and Firefox before the pages loads on my linux desktop machine. Never seen anything like that before...⬐ noir_lord⬐ HighlandSpringBoth browsers is unusual (I have the occasional Firefox crash sometimes though not on Mondo and not for a while).It works on both here (FFDE and Chrome 58).
⬐ NoneNoneMonzo sounds like a really fun bank to work!I suspect the technological baggage in finance to be one of the main deterrents for young developers, the people who want to engineer modern, elegant systems and not go into the business of maintaining legacy spaghetti. I imagine you guys are attracting some really high end talent.
My questions are a little more about Monzo as a workplace in general as I will be applying for an internship with you guys.
Is there any Scala in your infrastructure? If not, was it a language that was given much consideration earlier on?
I see Kafka as part of your stack. Are stream processing frameworks like Samza, Spark and Flink found in your infrastructure?
How many developers? What would you estimate the backend/frontend split to be at?
⬐ asherwoodThis might help, Monzo published a blog detailing their technology stack a while ago -https://monzo.com/blog/2016/09/19/building-a-modern-bank-bac...
⬐ HighlandSpringThanks for the link!I just wanna add that I think it's beyond cool that there's a bank out there that's publishing a dev blog and detailing their tech stack.
⬐ oblioMost of the other banks are too ashamed to publish their tech stack. After all, it's kind of hard to attract 25-30 year olds with technologies that had their last major updates before the candidates were born :pA bit off topic, but I'm delighted by the live updating of the slides below the video. This is something all conferences should be copying.⬐ walterbell⬐ londevIs that done with PPT/PDF conversion to images? Are there tools to help generate time codes for slide transitions?⬐ pronoiacI play AV Geek sometimes; I think I first saw Defcon do this, only within the video. I've been trying this out, partially for laziness; it's much quicker to edit the video if you don't have to transition from the speaker to the slides.I met a couple of their team at Golang UK last year, some great tech leadership there by the sounds of things.⬐ alissonI always dream of something that would make easier for foreigners to open an US bank account, I now people that went to the US as tourist and could open an account there, but there's no way to do that via internet without actually visiting a branch in person. Don't seems to be so difficult is it? Seems very much its just a internal political thing.⬐ NoneNone⬐ kzismeCan anyone recommend Go learning resources for someone coming from a c# background?⬐ geodel⬐ shiv86I'd say tour.golang.org is quite good. But the most important thing I feel for C# devs is to know that there is no Visual Studio like fancy IDE for Go.People may be debate merits/demerits of this situation with valid arguments. However if you are in everything IDE camp Go might just not suit you.
⬐ towndrunk⬐ mattlondonIntellij has one in the works. You can download and run the betas now.⬐ literallycancerVS Code with the extension has nice autocomplete and navigation features (peek definition and such).⬐ mring33621As a Java guy who has dabbled in Golang and I have had good luck with VSCode IDE + command line for compilation/build options. If you're in Windows, get Git Bash or similar for a unixy command line.⬐ kzismeWhich editor do you prefer?⬐ geodel⬐ mattlondonI use VIM or Sublime with Go plugin.⬐ blhack+1 for sublime.⬐ kzismeAny specific VIM plugins for Go you can suggest?⬐ geodelhttps://github.com/fatih/vim-goVisual Studio Code is a free text-only "IDE" with very good support for Go (as well as other things like C#, TypeScript etc etc etc). Autocomplete/Intellisense, peek-/goto-definition, error-highlighting, git-integration, visual debugger, tabs, mini-map, extensions etc etc. Not sure what else you need really? Sure there is no GUI-builder, but then GUI in golang is in a very early stage.I use it a lot for my work (Linux & Mac OSX) and personally at home too (Win10). I am not in any way connected to VS Code or MS, but I think it is a really good editor both for Go, but also for all of the other stuff it supports.
tour.golang.org is a good start to get familiar with the language's features. After that it is just worth picking a mini-project and getting cracking. The website https://gobyexample.com/ is a great place to see some simple, real-world examples once you start to actually try and do something.There will be a lot that is familiar to a C#/Java dev, but also a lot of the stuff you might have got familiar with in C# is missing (famously generics are not there, but also other things like Linq etc has no native equivalent in go, although there are libraries that offer similar functionality).
Good luck! :-)
⬐ kzisme⬐ sAbakumoffPicking a mini-project (without completely re-inventing the wheel) was the harder part for me - I did start out with tour.golang.org, and just reading their docs too.I'll still checkout https://gobyexample.com/ - thanks for the link!
Golang is really, really easy to learn. And as always the key is practicing. Just pick up some medium size project and start building it. Stack overflow will help with the learning curve. This is how I learned to love Golang having 10+ years c# background​.⬐ kzisme⬐ literallycancerWhat sort of mini-projects have you done thus far?That's the biggest hurdle I've been trying to overcome currently with learning Go (or any new language). Other than re-writing small problems, but that isn't terribly exciting.
⬐ sAbakumoffThere was a nice example of such a project recently in HN https://news.ycombinator.com/item?id=14073042I was happy with the GOPL by Kernighan & Donovan, but I'm not a C# person, so I'm not sure what you want to skip/focus on?⬐ oblioNot that I'm against learning new languages, but your question piqued my interest.Are you thinking about transitioning from C# to Go? If so, is it because you think the language is cool or is it because in your region there are more/better paying Go jobs?
I ask this because I can't really imagine someone transitioning from C# to Go, especially these days that dotnet core is available. Hell, I'd first try to transition to F# :)
(Yes, I know that these are loaded questions and that I'm biased against Go..., but I think the questions are valid even in these conditions)
⬐ kzismeI'm still a "recent" grad, so my answer might be a bit strange.I've been doing full time C# for almost 2 years now, and while I enjoy it one of my biggest fears is getting stuck into only knowing one technology/stack.
I don't have a professional need for using Go currently, but I've always had an interest in learning new languages.
Aside from those aspects - the people who implemented and worked on Go (Rob Pike and Ken Thompson in particular) I find very interesting.
⬐ oblioIf I'd want to diversify I'd probably look away from another Algol-inspired language. That's why I mentioned F#.Go is an extremely practical language, maybe too practical, almost like C#. I'd rather look at something which takes a different approach, something which includes programming language research from the 90s, at least :)
⬐ kzismeSo - functional languages are what you are referring to then?My goal was/is to find something to work on in my spare time using a new language. Just to keep learning as well as broaden my horizons :)
⬐ oblioFunctional languages and advanced type systems.⬐ notheguyouthinkAs an aside, i love Go, and use it fulltime at work. With that said, i agree with the view that Go is boring, and not likely to expand you in the way you seek.It's usually less rails oriented than C#, so you will figure out a lot of stuff for yourself, but in general it's quite boring (i like that). If you're interested in something interesting, i am in love with Rust, and definitely recommend it.
I don't personally use it these days, as i am not sure i want to invest in the tradeoff of safety vs prototyping speed. However i definitely recommend it as a cool language.
Any reason why you went then Kubernets as opposed to Docker Swam ?⬐ lykronHe didn't talk much about this, but I find it very hard to believe that they were able to make their own deposit application and get it certified for use (unless the UK has vastly different banking regulations than the US). 32-bit/64-bit systems have small rounding errors that are show-stoppers for banking from what I've heard. There is a reason why COBOL and Big Iron rain supreme in Finance.⬐ obeattie⬐ micah_chattI'm the Head of Engineering at Monzo. We don't use floating point at all in our core banking systems, which are all written in Go by our own engineering team :)⬐ runevault⬐ chefandySo is all the math just in cents and then you display it with the decimal if a user needs to see it?⬐ obeattieYep, that's exactly how it works.⬐ 53475⬐ tclancyAny chance you could go into detail on this regarding data types? How do you handle exchange rates & such that can be to more precision than 100ths of a $ or other currency for instance?⬐ dharma1I don't know how it works under the hood but when I use Monzo for Euro payments the conversion is shown in cents - they probably round it and pocket the difference. But the actual rate is very good, interbank ratesThat is typically how you handle it (in my limited understanding). If you're going to make an error, let it be in the presentation layer and not the actual math.⬐ runevaultI now wonder if that is what c# does under the hood for currency type which is a rather safe way of dealing with a limited number of decimal places for money. Hm.⬐ oblioWarning: I don't program applications for finance. However... I'm not sure that representing things in cents works. Mostly because of exchange rates. These can have quite a bit of decimals and go beyond cent-precision.My money's on BigIntegers: https://msdn.microsoft.com/en-us/library/system.numerics.big..., using some sort of subdivision of cents as the base unit (1/1000ths of cents?)
I'm probably horribly wrong and I hope someone who actually knows what he's saying corrects me :)
⬐ 53475> My money's on BigIntegers: https://msdn.microsoft.com/en-us/library/system.numerics.big..., using some sort of subdivision of cents as the base unit (1/1000ths of cents?)I was thinking something along these lines too. Would love to know what they used and the justifications behind their decision.
Trying to be helpful and not a smug grammar nazi, so I hope it doesn't come across the wrong way: it's "reign supreme," not "rain supreme."⬐ amouatWell they got a banking licence recently https://monzo.com/blog/2017/04/05/banking-licence/I don't really understand why you pick on 32-bit/64-bit. I assume you wouldn't touch floating point with banking. What is it you think Cobol and big iron can do that Go and AWS can't?
I had to click around to find the video, but here it is: https://www.infoq.com/presentations/bank-go⬐ lprdThanks!