YouTube2Text

Anyone can build a bank: creating a new banking backend by Vlad Yatsenko — Transcript

by Devoxx · 7,047 words · 1,019 segments · language en · Watch on YouTube

Full transcript

  1. 0:00[Music]
  2. 0:05- thanks for coming over if it's a small
  3. 0:09room then you know the number of people
  4. 0:11want to attend so thanks thanks a lot
  5. 0:13for coming over even taking the space on
  6. 0:16on the floor it's so my name is Vlad
  7. 0:21Sankar like typically shot usually Lots
  8. 0:25it's hard to pronounce my full name for
  9. 0:27mature people
  10. 0:28I'm nan confounding city or evolute just
  11. 0:34the quick audience check how many people
  12. 0:36have heard of reveal it like crazy okay
  13. 0:41this is a good so I don't have to do
  14. 0:42long introduction of what River is today
  15. 0:47I'm gonna talk about building a bank in
  16. 0:51general what kind of challenges is there
  17. 0:52I'm gonna go even on the code level as
  18. 0:56well not too much in order to develop a
  19. 0:59conference so it's kind of a balance
  20. 1:03between domain and take some technical
  21. 1:05problems that's a typical for this
  22. 1:07domain as well so let's go so what is a
  23. 1:13bank in general in the past we used to
  24. 1:18like people used to imagine a bank like
  25. 1:21this building with insured columns and
  26. 1:25because banks needed to portray that
  27. 1:28they are very safe that can be trusted
  28. 1:29people bring money very physically and
  29. 1:33essentially there was the main purpose
  30. 1:35and then they started doing lending
  31. 1:37borrowing etc but this thing is changing
  32. 1:42right because it was very in efficient
  33. 1:44you had to cross distances you had to do
  34. 1:47a lot of physical content
  35. 1:49these days bank banks realizing that
  36. 1:52this is not working because of the wave
  37. 1:54of FinTech and we see a lot more of this
  38. 1:58happening with the old banks and it's
  39. 2:04because of rise of FinTech that happen
  40. 2:06due to different factors due to the
  41. 2:10financial crisis in 2008
  42. 2:13that regulate this allows me change the
  43. 2:16rules in such a way so that allows new
  44. 2:19engines to come into this market and we
  45. 2:23use that opportunity so but you know
  46. 2:26it's important to think what was the
  47. 2:29purpose of the bank in general right
  48. 2:31obviously like if it's of any almost any
  49. 2:34business is to make money as mentioned
  50. 2:39in the past people used to use banks as
  51. 2:42just trusted vault where they put money
  52. 2:45instead of keeping that money under
  53. 2:46their mattress and then the main
  54. 2:49business of the banks and it is still is
  55. 2:52boring at one extreme interest rates
  56. 2:56from some people and lending that money
  57. 3:00at high interest rates to other people
  58. 3:02and the business basically making this
  59. 3:04difference on on the interest rate these
  60. 3:10days with the thing it's etc and in its
  61. 3:14financial institutions yeah we do a lot
  62. 3:17moment not just borrowing and lending
  63. 3:20how we think about banking today it's
  64. 3:23card payments currency exchanges
  65. 3:25investments insurance all the controls
  66. 3:29to manage your money better like
  67. 3:31analytics budgeting saving accounts the
  68. 3:35security of your accounts expense
  69. 3:37management's all these things at least
  70. 3:39can go on the automation the API the
  71. 3:42open banking ones in Europe etc so
  72. 3:46there's a lot of things that are
  73. 3:47happening in banking in general and this
  74. 3:51is how we see today and you can even do
  75. 3:55some gifs with your with your money
  76. 3:59these days so but how we see it what
  77. 4:04what the the main purpose of the bank is
  78. 4:06to help you get most value are the money
  79. 4:10this is how we see our purpose in
  80. 4:13general despite we often used for mainly
  81. 4:18currency exchange travel this is our how
  82. 4:23we started with starting with that
  83. 4:25problem
  84. 4:26and I'm kind of naturally started
  85. 4:27growing I mean revolute as a business
  86. 4:30into other areas thinking about it's
  87. 4:33like how to help you to make more get
  88. 4:38more value out of your money
  89. 4:42hence yeah banks today look usually like
  90. 4:46vases and up and the cut and this is
  91. 4:49what what you see most of time this is
  92. 4:51the the new Association of the for the
  93. 4:53bank is not that big building as in the
  94. 4:56past just a little bit about revolu how
  95. 5:01we value our main cool thing is the
  96. 5:07multi currency our mission is to offer
  97. 5:10global multi-currency accounts with all
  98. 5:14the functionality around the accounts
  99. 5:17that's linked to your financial life we
  100. 5:22did at the moment by allowing you to
  101. 5:24hold up to 29 different currencies move
  102. 5:27them frequency without friction and fees
  103. 5:31and also we how to get exposure to five
  104. 5:37cryptocurrencies and we got to this
  105. 5:41point from when we launched in 2015
  106. 5:43those we support only three currencies
  107. 5:46through many currencies pounds euros and
  108. 5:48dollars and they have escalated and not
  109. 5:51working outside of Europe launching some
  110. 5:54in other markets in Asia in an America
  111. 5:57so we are heading towards this mission
  112. 6:01to making money frequency no truly
  113. 6:03frictionless truly all of us just to
  114. 6:09give you some perspective as well on our
  115. 6:11current skills so at the moment we are
  116. 6:13around five million users I put five
  117. 6:16million users because it's gonna hit
  118. 6:17probably the mark five million people in
  119. 6:20the next two days this is the volume of
  120. 6:25transactions with processing on the
  121. 6:26daily basis so it's it's quite sizable
  122. 6:31if you look at the industry in general
  123. 6:32just to give you again a perspective
  124. 6:34perspective the first payments in the UK
  125. 6:36the the biggest banks process
  126. 6:40that's many transactions a month so here
  127. 6:43we're talking about a lot of other
  128. 6:44transactions of course a lot of them are
  129. 6:46cut transactions but just in general get
  130. 6:48to give you perspective and how it looks
  131. 6:54now it's around ninety of bagging
  132. 6:58applications supporting all of this for
  133. 7:02mobile applications because we do i OS
  134. 7:05Android and we have products for retail
  135. 7:08and business and a bunch of web
  136. 7:12applications manually mainly for
  137. 7:13internal use and this all of this is
  138. 7:19built and supported by 220 people and
  139. 7:22this number is changing every week so
  140. 7:30how all this simple what you used to see
  141. 7:34a very simple interface right this is
  142. 7:37like how you imagine the bank at the
  143. 7:39back of it this is just a very
  144. 7:42high-level approximation of what's
  145. 7:45happening at the back end depending on
  146. 7:49size of institution like a financial
  147. 7:53solution would be doing just some of it
  148. 7:55delegating outsourcing to to partners
  149. 7:58a lot of it and within our case we do
  150. 8:02too much all of it
  151. 8:04we started initially with partnerships
  152. 8:07to our source things like compliance
  153. 8:10things like payment payment processing
  154. 8:16etc and people started bringing all of
  155. 8:19it in-house kind of getting closer to
  156. 8:22come to the last mile - now we have
  157. 8:26connectivity to many payment networks of
  158. 8:31cut cut payment networks like Visa and
  159. 8:34MasterCard its direct it's now in beta
  160. 8:37we're gonna be switching all of traffic
  161. 8:41to to our own connectivity soon then
  162. 8:45Faster Payments swift SEPA there's a lot
  163. 8:48of proprietary integrations with banks
  164. 8:50to make this whole system
  165. 8:53work efficiently and for you to just
  166. 8:56click a button and make it as soon as
  167. 9:00possible at no cost so but it was not
  168. 9:07that the big and complex from the
  169. 9:09beginning from the beginning was in the
  170. 9:11MVP right we called monolithic viable
  171. 9:14project product so it was in a way
  172. 9:19monolith which looked like this we are a
  173. 9:24Java house so we use the replicate we
  174. 9:30use relational databases for storage so
  175. 9:33many sounds too fancy like there's no
  176. 9:36scale etc but this is kind of the very
  177. 9:40foundational Salvage we do and we
  178. 9:42started just with this for applications
  179. 9:45one was the API that was powering
  180. 9:48powering the mobile apps used by users
  181. 9:51cut processing that would process the
  182. 9:55the cut transactions when you pay online
  183. 9:58or didn't point-of-sale and our
  184. 10:01back-office application and all of that
  185. 10:03was built kind of out of one code-based
  186. 10:06was mana rifle very simple the you're
  187. 10:09making changes through fracturing very
  188. 10:11simple when you have just one code base
  189. 10:13and just out of that it was just for
  190. 10:16applications built of deployments were
  191. 10:19like non don't I'm very fast 30 seconds
  192. 10:22to deploy any application so it was the
  193. 10:25life was very easy we would think we in
  194. 10:31from the beginning we went with
  195. 10:32PostgreSQL as a storage and we learnt
  196. 10:36learning early on how to scale progress
  197. 10:42as well have replication backups with it
  198. 10:45we purchased feels probably one of the
  199. 10:48best databases that exists today to
  200. 10:51which these things don't are not I would
  201. 10:55say not as difficult they may sound to a
  202. 10:57lot of application developers so yeah so
  203. 11:02we I mentioned for
  204. 11:04doing all of it with one codebase
  205. 11:08applications were stateless which
  206. 11:09allowed to do non time downtime
  207. 11:11deployments everything was easy to
  208. 11:14manage very easy to manage logs just
  209. 11:16from logging cessation doing your grab
  210. 11:20some logs the monitoring was very easy
  211. 11:24as well we would try to set up our own
  212. 11:27infrastructure with al haystack but
  213. 11:30eventually decided where when we started
  214. 11:32with only four people as the whole
  215. 11:34company so with only two technical
  216. 11:38people it was very very hard initially
  217. 11:40to manage all of that we decided to
  218. 11:43forego it and use nearly for monitoring
  219. 11:46which works pretty well usually to
  220. 11:50enable monitoring zero effort for Java
  221. 11:52applications with New Relic in yeah as I
  222. 11:59said we started this team with only two
  223. 12:02engineers including myself and then
  224. 12:03after almost a year of being in
  225. 12:05production we grew to four people and it
  226. 12:11was quite a change for us at the time
  227. 12:12and but we at the same time when we were
  228. 12:17building the product those known had
  229. 12:22experience building a bank before
  230. 12:24understanding different concepts what
  231. 12:28was important in general rights like
  232. 12:30where engineers usually are generalists
  233. 12:31we can know how to code and we can take
  234. 12:35any problem right give us enough time
  235. 12:37and we will solve it but there are
  236. 12:40certain areas so from financing industry
  237. 12:43what's important is correctness first of
  238. 12:45all like we always tend to think about
  239. 12:47complexity performance etc but the most
  240. 12:49important thing in in finance its
  241. 12:52correctness all right everything should
  242. 12:53be consistent that's why transactional
  243. 12:56behavior is like number-one priority and
  244. 12:58the typical way to do the transaction
  245. 13:01management if you know is to have this
  246. 13:04annotation based approach in Java right
  247. 13:06you put your annotations then do some
  248. 13:09IEP with spring or some other framework
  249. 13:11and very very easy right to define your
  250. 13:13transaction boundaries but as in this
  251. 13:17example you see
  252. 13:20this method like transfer money as for
  253. 13:23instance starts growing it this transfer
  254. 13:25money it's not just as easy just
  255. 13:28changing to balances with a lot of
  256. 13:29things you need to do do some
  257. 13:32validations fraud checks etc and that
  258. 13:35can become quite complex and then you
  259. 13:37say okay you know this is too much like
  260. 13:39why do I need to start transaction so
  261. 13:42early I need I want to optimize we
  262. 13:45release that connection sooner let's
  263. 13:49make the transfer logic block only
  264. 13:52transactional right and then we just do
  265. 13:54this we just unite your ID you did you
  266. 13:58say extract method for this block of
  267. 14:02code and this is what you get but what's
  268. 14:06wrong with it does anyone know what's
  269. 14:08wrong with this okay I'm glad there are
  270. 14:11people who we see the problem before the
  271. 14:16transactional notation was on the public
  272. 14:18method now it's in private and it
  273. 14:20doesn't apply anymore and if you don't
  274. 14:23have tests for every piece of logic we
  275. 14:26need to explicitly say this must be
  276. 14:28transactional you're gonna hit a big
  277. 14:30problem here as you like if we're
  278. 14:32talking about money then you start
  279. 14:33having consistencies and it seems
  280. 14:37initially oh why do we do this or
  281. 14:39because because it's it's very easy it's
  282. 14:43declarative way of doing it right that's
  283. 14:46what we're gonna generate and try to do
  284. 14:48not to be very empirical to use the
  285. 14:50declarative ways to do such things
  286. 14:52there's a more stable solution right is
  287. 14:57it less declarative but I don't think so
  288. 15:00but it always works there's no magic
  289. 15:02here at all right just explicitly say I
  290. 15:04want to call this block of code in
  291. 15:07transaction and since Java 8 it's very
  292. 15:09easy with lambdas the code doesn't look
  293. 15:12ugly anymore
  294. 15:13etc so this you know just using quote
  295. 15:20from Warren Buffett's rule number one
  296. 15:22never lose money but to never forget
  297. 15:25rule number one so in fairness it's it's
  298. 15:28super important we should never lose
  299. 15:31mine
  300. 15:32our money or customers money it's like
  301. 15:34it's like the most important thing
  302. 15:38especially consider these days all the
  303. 15:41money is in reality is virtual eyes it's
  304. 15:44like it's just numbers in some databases
  305. 15:47regardless on what the the financial
  306. 15:52institution is like unless you have that
  307. 15:54in cash this even that cash is still
  308. 15:56recorded some way to solve this problem
  309. 16:00on the other level as well you know we
  310. 16:04said we need to define a transaction
  311. 16:06button boundaries very clearly and in
  312. 16:09such a way so it doesn't so it's not
  313. 16:12fragile this something called free
  314. 16:16cancellation which is another important
  315. 16:17process because still there are too many
  316. 16:20different systems involved in processing
  317. 16:22financial transactions and we end up
  318. 16:25doing a lot of reconciliations
  319. 16:27especially when we cross borders when
  320. 16:29money goes out so of revolute to other
  321. 16:33banks and the other way around
  322. 16:35there is no transaction where right
  323. 16:38we cannot say okay let's do distribute
  324. 16:40transaction with a financial institution
  325. 16:42so we have another process called for
  326. 16:44cancellations which basically is about
  327. 16:46taking two data sets and making sure
  328. 16:48they they agree and of course due to
  329. 16:54this you know the story of SQL for us is
  330. 16:57like very obvious there's no
  331. 16:59considerations here for no SQL
  332. 17:02processing transactions no skill it is
  333. 17:05not really something you should consider
  334. 17:11just example of code that I wanted to
  335. 17:16show as well rational databases can do a
  336. 17:23lot of things that many java application
  337. 17:27developers are not aware of I've noticed
  338. 17:29one of these things is streaming on
  339. 17:34database level it's a called cursor in
  340. 17:36gdb sea level is called scrollable
  341. 17:39statements which means you don't have to
  342. 17:41create any complex batch processing if
  343. 17:44you want
  344. 17:45process efficiently a lot of data he
  345. 17:49just opened scorable statement behind
  346. 17:52the scenes I'm not showing the details
  347. 17:55of this because it's kind of in our case
  348. 17:56is hidden behind framework but here in
  349. 17:59this piece of code in this line here
  350. 18:03final processed standing always on a
  351. 18:06specific date it can be a lot of them
  352. 18:09and these things this is not a process
  353. 18:12that requires your immediate processing
  354. 18:16of the whole population on standing
  355. 18:18orders created by the users we need to
  356. 18:20post them on a specific date and that's
  357. 18:21important we can do it even sequential
  358. 18:24if want is but generally to process them
  359. 18:27efficiently so we don't have you know
  360. 18:29put all of that in memory you know or
  361. 18:32have very complex process bashing that
  362. 18:34just streaming from database and process
  363. 18:37as we go and whether we use will rely a
  364. 18:45lot on a library of you can call it
  365. 18:48framework as well
  366. 18:49it's called Juke if you've never tried
  367. 18:53it and you do SQL like I recommend Lucas
  368. 18:56is awesome is once you start using joke
  369. 18:58you never have mistakes in your SQL
  370. 19:02statements it's probably like I'm a big
  371. 19:05fan of of Juke and Lucas adder who is
  372. 19:09creator of it's in Montana right and
  373. 19:26another interesting problem in finish
  374. 19:28the domain is currencies of seems to be
  375. 19:34kind of simple it's you have one number
  376. 19:36to convert to another currency just
  377. 19:37multiply it by rate and you have amount
  378. 19:40in a different currency the rarity is
  379. 19:43how translation works there are always
  380. 19:47two rates bid and offer also called buy
  381. 19:50and sell and what I know if any of you
  382. 19:53still see or use the you know the brick
  383. 19:56and motar exchange bureaus
  384. 19:58apples they show you two rates right two
  385. 20:01columns and well see a lot of people
  386. 20:03even people would experience in infants
  387. 20:06an urgency they sometimes when they
  388. 20:07start thinking about this let's take a
  389. 20:09pause which one do I need to use like it
  390. 20:13can get tricky some but generally people
  391. 20:17make mistake all the time about this so
  392. 20:22we may be of course super simple for you
  393. 20:26is yes you put a number one one side it
  394. 20:29multiplied by the rate shown it will be
  395. 20:33the other number all right in the we
  396. 20:35kind of tried try to make it bit more
  397. 20:38clear to to our users and you know you
  398. 20:41don't have to have your own calculations
  399. 20:43in your head for us finally in the
  400. 20:48beginning and when we were building this
  401. 20:49like just currency exchange it's
  402. 20:54probably just the exchange rate class in
  403. 20:58our code base it has probably around 300
  404. 21:02lines just just that class and the whole
  405. 21:05area of currency exchange ended up
  406. 21:08because of kind of developers in the
  407. 21:11beginnings learning this space making
  408. 21:14mistakes in the back end and in the
  409. 21:17front end code so we ended up having
  410. 21:21probably more than hundred tests just
  411. 21:24around currency exchange so just to
  412. 21:31cover all the possible cases runnings
  413. 21:33etc and around crisis as well another
  414. 21:38problem that we have in this space is as
  415. 21:41we have this is another difference
  416. 21:44between the US and a lot of other
  417. 21:46fintechs Bank challenges etc where we
  418. 21:49kind of we try to solve this problem of
  419. 21:52currency coupla complexity and you know
  420. 21:56operating in different markets with
  421. 21:58different payment channels currencies
  422. 22:01they seem to be like a stable thing like
  423. 22:03they exist like in total are less than
  424. 22:06200 currencies in the world the royalty
  425. 22:08when we started in 2015
  426. 22:11we had few events where currencies were
  427. 22:14changing to would be a denomination
  428. 22:16event when the government decided you
  429. 22:18know this currency you know it's to blow
  430. 22:20that now we need to issue new currency
  431. 22:23that will replace it and we period of
  432. 22:25some there will be transaction coming in
  433. 22:27in both currencies those kinds this
  434. 22:30would get new isocodes etc and you can
  435. 22:33have to follow this adopt so you this
  436. 22:37transaction don't come and you like oh
  437. 22:39we cannot get exchange rates Buddhist
  438. 22:40currency because we don't know about it
  439. 22:42yet all right or some Connie cases like
  440. 22:45have you heard of that that I love men
  441. 22:49of Jersey against the Channel Islands
  442. 22:53they have their own pound currency it's
  443. 22:58generally we think it's it's it's a
  444. 23:00British pound but actually it's a
  445. 23:01different currency it's pegged to pounds
  446. 23:04it's always one-to-one it doesn't have
  447. 23:05its own exchange rate because of this
  448. 23:08market data providers Bloomberg etc they
  449. 23:10don't provide rates for those cars it's
  450. 23:12just they just tell them can you give me
  451. 23:14like I'm P is a love man pounds in give
  452. 23:17me right for it so even know I don't
  453. 23:19know what I'm P is but there is ISO code
  454. 23:22for this currency and transactions can
  455. 23:23come in in this currency so we end up
  456. 23:26having a lot of logic kind of this on
  457. 23:29this edges trying to you know put adopts
  458. 23:32all these two patrols as saying hey
  459. 23:35these pounds actual very same as British
  460. 23:37Pound right another thing that we've
  461. 23:46made mistake here things many startups
  462. 23:49they try to go fast and stuff we ended
  463. 23:52up has said it was monolith and we ended
  464. 23:55up in the beginning with this spaghetti
  465. 23:59architecture was called service
  466. 24:02spaghetti a lecture where you know this
  467. 24:06example here shows that it was a point
  468. 24:09when I said you know I don't want this
  469. 24:12automatic injection I need to run some
  470. 24:14something simple I I'm gonna just
  471. 24:17initialize it manually rights just
  472. 24:20explicitly and I started unrolling and
  473. 24:22rolling and rolling depending
  474. 24:24and I didn't get to the end of it I I it
  475. 24:26didn't work so because I hit a cyclic
  476. 24:30dependency because we use jook jook
  477. 24:34results depends this for you you don't
  478. 24:36even know you know it doesn't tell you
  479. 24:38that you have some better design code so
  480. 24:42this kind of thing made matters realize
  481. 24:47we shouldn't do this anymore
  482. 24:49we serve a spaghetti key texture like
  483. 24:53this is an example how you you like more
  484. 24:56explicitly you can get in this situation
  485. 24:58right you have dependence or something
  486. 25:00in change it's injected but then another
  487. 25:03thing also has dependency on it and it's
  488. 25:05like and you can get very complicated
  489. 25:06you don't even know so basically my
  490. 25:10advice will be especially a new world of
  491. 25:12micro services when we say we're gonna
  492. 25:15fill this very focused on some piece of
  493. 25:18functionality small applications
  494. 25:20services just injection of the injection
  495. 25:23doesn't give you any benefits really
  496. 25:25like there's not much blood that you
  497. 25:28actually create by doing it manually so
  498. 25:30by not doing this you making sure that
  499. 25:32your code is actually was simply and you
  500. 25:34are able to then to CC when it becomes
  501. 25:36too complex so we then switch because of
  502. 25:44this spaghetti code we switched into
  503. 25:49even driven mana let's face okay all
  504. 25:53these services like to process the
  505. 25:55transaction it's not just explicitly
  506. 25:57moving money from one account to another
  507. 25:59it's sort of other things maybe we need
  508. 26:01to do some checks injects one service we
  509. 26:04need to do fraud detection you inject
  510. 26:06another service then at the end we want
  511. 26:07to check out maybe we need to trigger
  512. 26:09some promotion here or when this send
  513. 26:11the push message it's a lot of stuff
  514. 26:12going on when one transaction happens
  515. 26:15and kind of this becomes as on that
  516. 26:18picture very very complicated so for
  517. 26:20then we resolved it by billing only in
  518. 26:25house even during framework here's just
  519. 26:29a fragment of you know we started
  520. 26:32defining logic in just smaller pieces
  521. 26:36it's it's a secret like framework where
  522. 26:39this that commands and there are
  523. 26:41repositories to to fetch dates are kind
  524. 26:43of a certain separation and those more
  525. 26:47compact pieces of logic commands we call
  526. 26:50them actions they the whole frame of
  527. 26:53bills aren't again as I said DDG
  528. 26:56concepts everything ends up being every
  529. 27:00changes up issuing an event and then you
  530. 27:03can do on top of those events create
  531. 27:06things like this and whatever you want
  532. 27:09any side effect you want to do you don't
  533. 27:11have to inject anything anymore you just
  534. 27:13create it it works independently anyway
  535. 27:15and just because of principle is
  536. 27:17everything issues an event just not to
  537. 27:21confuse it's not
  538. 27:23sakura-san the sense of the see us model
  539. 27:26where there is even sourcing where
  540. 27:27everything starts with an event and of
  541. 27:30that we create our we'd not don't we
  542. 27:33didn't do that this because we didn't
  543. 27:34have it first of all from the very
  544. 27:36beginning we and we didn't want to
  545. 27:39switch because even thousand has a lot
  546. 27:42of own problems with latencies etc
  547. 27:45there's all of complexity we decided to
  548. 27:47have dual model in a way we consistently
  549. 27:50always write in even log and at the same
  550. 27:53time your new state so which allows us
  551. 27:58quickly the next decision on the state
  552. 27:59could be done without calculating it and
  553. 28:02events are used for have to have audit
  554. 28:06log of everything and have even driven
  555. 28:09architecture so initially was I said
  556. 28:12it's even driven monolith because all of
  557. 28:14this was still within the code base but
  558. 28:16the code was already segregated into
  559. 28:18these kind of smaller modules which
  560. 28:22allows us then to move into next phase
  561. 28:25of check or even druvan services I don't
  562. 28:30I don't like using micro service system
  563. 28:32because it's kind of it's the name
  564. 28:36itself is maybe a bit exaggerated
  565. 28:39because when we say micro before we had
  566. 28:42service oriented architecture and those
  567. 28:43were services now we have micro services
  568. 28:46was mean there
  569. 28:48million times smaller or in what senses
  570. 28:51when is this problem because of this not
  571. 28:55everyone agrees on what how big that
  572. 28:57micro service should be etc so if we
  573. 29:00just say our services should perform you
  574. 29:05know if they separate by domain
  575. 29:09boundaries and you know they linked
  576. 29:13through three events and so in that
  577. 29:17previous thing by the way on the
  578. 29:21previous slide was on the front that we
  579. 29:23used angular at the time react was not
  580. 29:26seen fashion yet and then in 2016
  581. 29:29everything was was written into react
  582. 29:33which is a good thing angular was first
  583. 29:37of all it was not done by people
  584. 29:39specializing that was done by Java
  585. 29:41developers it was a nice so now
  586. 29:45everything is on racks is a lot cleaner
  587. 29:47on the front end as well so and the
  588. 29:50whole thing this ops this done being
  589. 29:54more applications in fact I didn't show
  590. 29:57here the whole thing at that stage
  591. 29:59already was there was 2016 there was a
  592. 30:04lot more services but they too was small
  593. 30:07only see like bit of monolithic code one
  594. 30:10one code base and we introduced this
  595. 30:13even store where we started assisting
  596. 30:15all these events and which allowed us
  597. 30:16not to have this even driven model just
  598. 30:19within this monolith application but
  599. 30:21start moving this modules into just
  600. 30:24separate services separate code means
  601. 30:27because we started sending these events
  602. 30:29to even stove assisting them there and
  603. 30:31stream from there and then it would
  604. 30:33allow us to do things like this which is
  605. 30:36out of trying to explain what was going
  606. 30:39here so what one of the problems will
  607. 30:43have because we allow you to exchange
  608. 30:46currency instantly but reality is we
  609. 30:53become like a broker for you really is
  610. 30:55nothing happens instantly in real world
  611. 30:58like somewhere in the bank this there
  612. 31:00are accounts and then
  613. 31:02the money should actually move from on
  614. 31:03layer below it search and lie below the
  615. 31:05set model processes around this etc so
  616. 31:08what it means when we as a user you have
  617. 31:13a contract with us I mean we tell you we
  618. 31:15give you the service we exchange money
  619. 31:17quickly and start using it we cannot
  620. 31:21pull back like okay we it means we're
  621. 31:24accumulating risk the risk that we when
  622. 31:27you safe exchange hundred pounds to two
  623. 31:30euros we need to get this euros from
  624. 31:32some who you will gave it to you now
  625. 31:34but we don't have it at that moment
  626. 31:36potentially right because it's not like
  627. 31:39people have all in equal amount of
  628. 31:42pounds and euros if they are constantly
  629. 31:44exchanging between themselves it's not
  630. 31:46balanced in this way but there is this
  631. 31:49offsetting effects anyway which helps
  632. 31:51but so we this kind of even driven model
  633. 31:55allowed us to so initially how we did it
  634. 31:57all our risk calculations happening was
  635. 32:00just one big query on transactions table
  636. 32:04on our ledger and it would produce like
  637. 32:07this and the numbers these our how
  638. 32:08sending risks and our finance department
  639. 32:12would go and act innate initially it was
  640. 32:14not big volumes that's why it was okay
  641. 32:17and but I'm falling started growing that
  642. 32:19calculation that crews are being slower
  643. 32:21slow and hit a point we're doing some
  644. 32:24optimizations on a career level and
  645. 32:26doing caching as I said was all
  646. 32:28pointless
  647. 32:29it was timing out in we wanted to have
  648. 32:32instant reaction to this so even driven
  649. 32:36allowed us to have this thing the risk
  650. 32:40calculation started happening in a
  651. 32:42separate application which on every
  652. 32:44event every literally transaction every
  653. 32:47financial movement it would update it
  654. 32:49risk online pretty much would be with
  655. 32:53delay probably of up to 100 milliseconds
  656. 32:58and that allowed us them to build this
  657. 33:01whole hedging of our risk in automated
  658. 33:05manner as well so which you know of
  659. 33:10volumes I was bigger and our finance
  660. 33:13you don't have to go on and go and trade
  661. 33:17it on the market that's accumulated risk
  662. 33:23another big problem in finance when you
  663. 33:26starts moving money around especially
  664. 33:28with us when we move with around the
  665. 33:31world
  666. 33:31and we try to make it as simple as
  667. 33:33possible is the financial crime which is
  668. 33:39one of those things is money laundering
  669. 33:42so as any financial institution using
  670. 33:48responsible food taking care of this
  671. 33:50problem and the biggest issue that is
  672. 33:53it's not deterministic it's you cannot
  673. 33:57just say one day we've fully solved it's
  674. 34:00like we clearly can say this is money
  675. 34:03laundering
  676. 34:04this is geniune transaction like there's
  677. 34:07no ever a hundred percent guarantee on
  678. 34:10anything this problem ends up being
  679. 34:12probabilistic and this is where a lot of
  680. 34:15our data scientists they build much
  681. 34:18machine learning models Concilium etc
  682. 34:23because we gonna have very complex
  683. 34:26business model all of different users
  684. 34:28different currencies country says it's
  685. 34:30very complex and guys it's amazing jobs
  686. 34:35they're our levels so on this it's hard
  687. 34:40to measure what say on fraud size which
  688. 34:43is a similar problem where the different
  689. 34:47types of for when people process still
  690. 34:49people's card details and then try to
  691. 34:51make transactions on behalf etcetera so
  692. 34:54for us to say with introduction of
  693. 34:58machine learning models filiz we
  694. 35:01decreased the level of fraud from
  695. 35:08recalls so it went down probably about
  696. 35:1140 times like the level like we probably
  697. 35:16about eight times so below the standards
  698. 35:20industry standards so it's it's quite
  699. 35:26quite impressive I know if you--if
  700. 35:27and you ever had a notification from
  701. 35:29system called shellac so it's like our
  702. 35:32in system based on this ml Allegan that
  703. 35:37detects the card card fraud and as I
  704. 35:41said it's very public problem and it's
  705. 35:43two-sided problem so on one side we want
  706. 35:46to catch these bad guys on the other
  707. 35:47side we don't want to affect the gene in
  708. 35:50users right and it's it's very hard
  709. 35:52problem is kind of the teams working on
  710. 35:54this they constantly try to optimize to
  711. 35:58decrease this so-called false positive
  712. 36:01right so that's and it's not possible to
  713. 36:05decrease it to zero unfortunately but in
  714. 36:09addition to this there are just more
  715. 36:11items in process when someone gets into
  716. 36:13that situation a genie the user gets
  717. 36:15caught into this trap process how to get
  718. 36:18them out who it's you know quickly
  719. 36:23through certain things like you may be
  720. 36:26asked or you may be asked on the up to
  721. 36:28upload documents proving maybe your
  722. 36:31transactional session so that it avoids
  723. 36:34this kind of way you deal with
  724. 36:36traditional bank I happened to be in the
  725. 36:40situation quite a few times when you do
  726. 36:42an international transaction it just
  727. 36:45binds just by default blocks it and you
  728. 36:47sits in anyways and then you have to
  729. 36:49call them and then it takes days
  730. 36:51sometimes week which is resolved you
  731. 36:53without kind of even being able to do
  732. 36:57anything at the end you just go to the
  733. 36:58branch so it's very very complex you can
  734. 37:01get very complex so how we dealt this
  735. 37:05with this promise in the beginning for
  736. 37:07that monolithic actually there was just
  737. 37:10within transaction processing there were
  738. 37:12all these checks and they were not the
  739. 37:15work because of this they were limited
  740. 37:17and we couldn't do too much while we
  741. 37:20process transaction at that point to do
  742. 37:23much of smart calculations to figure out
  743. 37:25like okay based on the transaction
  744. 37:27history do we think this is authorized
  745. 37:30by you or not so this was not obviously
  746. 37:35scaling and we went into this machine
  747. 37:41learning this algorithms and that allows
  748. 37:45us to do something this this kind of
  749. 37:46architecture where our transaction
  750. 37:50authorization engine it would ask this
  751. 37:53code brains this most of that stuff is
  752. 37:57written in Python because that's what
  753. 37:59data science is usually the most yeah
  754. 38:03that's the best fit for that kind of
  755. 38:05problem
  756. 38:07gets an answer but an answer here will
  757. 38:09be really prepared already this for
  758. 38:12detection system it will already know
  759. 38:16before the next transaction happens and
  760. 38:19in addition with this new information
  761. 38:21will be able to kind of to give an
  762. 38:23answer very quickly learn based on that
  763. 38:24there will be an event generated based
  764. 38:28on you know you were successful
  765. 38:29transaction or was a decline due to
  766. 38:31suspicion and fraud would go through our
  767. 38:34even stall which would stream back into
  768. 38:36the system it will updates everything
  769. 38:38and then this how it knows them for the
  770. 38:40next transaction already to give you a
  771. 38:42quick answer because in some cases is
  772. 38:46very critical
  773. 38:46where on card transactions we don't have
  774. 38:50that much time to do a lot of smart
  775. 38:52things and that's why we have come to
  776. 38:53have this model pre calculating all of
  777. 38:55things because we would be limited with
  778. 38:57like 500 milliseconds to do all of it
  779. 39:08slowly I'm gonna touch quickly on the
  780. 39:14process itself on the culture how we do
  781. 39:16these rights it's we known as a company
  782. 39:21of growing fast building order features
  783. 39:24fast etc how does it how does it work
  784. 39:27how do we do it without breaking stuff
  785. 39:30so the basic principles people who do
  786. 39:36this stuff they they're responsible
  787. 39:39there is no pipeline how it would be
  788. 39:41typical in big organizations and begin
  789. 39:44the price the business only is preparing
  790. 39:48requirements and developers coding that
  791. 39:51and
  792. 39:51the testers testing and then the release
  793. 39:55manager etc some organizations can be
  794. 39:57very complex and they may call it agile
  795. 40:00as well
  796. 40:00what father Jaya was something something
  797. 40:03else growing like from just few people
  798. 40:06developers become these kind of multi
  799. 40:10faceted all rights you use code just as
  800. 40:13a tool you your programming skills to
  801. 40:15solve problems so engineers because
  802. 40:19we're on the cloud nose while dealing
  803. 40:21with the fractious actually is more
  804. 40:23about coding you then you know actually
  805. 40:27as in the past dealing with physical
  806. 40:28Hardware etcetera the all the complexity
  807. 40:31of the hardware is hidden from you just
  808. 40:33work with these abstract notions you
  809. 40:35know VPC sub networks etc which are in
  810. 40:39anyone who studied computer science
  811. 40:43should understand at least on the high
  812. 40:45level this wife in in our case we have
  813. 40:48specialized DevOps guys who do very
  814. 40:52specialized projects and they would do a
  815. 40:54lot of heavyweight stuff maybe doing
  816. 40:59some working on scalability of this
  817. 41:01infrastructure on on skill build of
  818. 41:05databases on on network layer physical
  819. 41:10connectivity will have some physical
  820. 41:12connectivity to to payment networks in
  821. 41:15physical data centers around security
  822. 41:19etc and huge thing which which is like
  823. 41:26in 2017 when we started growing fast and
  824. 41:30a team of ten people quickly turned into
  825. 41:33a team of 50 developers people coming
  826. 41:37from different places from different
  827. 41:39understanding of HL processes was
  828. 41:44interesting as well to hear about one of
  829. 41:46the common answers to would is what it a
  830. 41:50gel is for you what do you mean by agile
  831. 41:51process from a genius to here oh it's
  832. 41:54scrum which is you know we don't see
  833. 41:58scrum is a gel and if it is because it's
  834. 42:02kind of rigid process in a way and
  835. 42:05from my experience evolved in many
  836. 42:07organizations in the past teams struggle
  837. 42:10to adopt scrum which shouldn't be
  838. 42:13initialized so how agile is about people
  839. 42:15and processes right process should be
  840. 42:17helping not saying in a way so we're
  841. 42:20kind of not focused on scram or scrum
  842. 42:22just do things that work and one thing
  843. 42:27that definitely works and that face when
  844. 42:30we started growing fast and developers
  845. 42:34DG was set as like a engineering
  846. 42:39strategy like TDD is for everyone who
  847. 42:43does coding everyone has to do TDD like
  848. 42:47not everyone does it on the same level
  849. 42:48of I'll be honest new people as well and
  850. 42:52realized in some organizations TDD
  851. 42:56understanding of TDD is just having
  852. 42:58tests which is surprising to me at the
  853. 43:01time what was made it very clear DD
  854. 43:06means you have to test first if you talk
  855. 43:08about quality you have to put quality
  856. 43:09first and so you have to write your
  857. 43:11tests first and then focus on the
  858. 43:13problem describe it and then you go into
  859. 43:14implementing it like very important
  860. 43:17concept this is why because of this vs.
  861. 43:21we didn't have historically test this we
  862. 43:22had mobile justice would test UI in the
  863. 43:26beginning and that didn't work well
  864. 43:29because the absolute time as well the
  865. 43:34weight of box was a lot higher because
  866. 43:37engineers didn't have culture of
  867. 43:39test-first development always kind of
  868. 43:43lay off loaded this responsibility of
  869. 43:46quality to to testers right
  870. 43:48which wasn't scaling well so we decided
  871. 43:52to change this and this is like we
  872. 43:56stopped hiring here.i testers it's
  873. 43:58completely and those who left those
  874. 44:01people they focused on creating
  875. 44:04frameworks and infrastructure so no one
  876. 44:08would often is called a software
  877. 44:10engineer in test so they would do
  878. 44:12automation help developers to focus on
  879. 44:15solving the determine problems
  880. 44:19them tools to write tests efficiently
  881. 44:22and run them and since since then
  882. 44:26so the like we started tracking the red
  883. 44:30of box crashes in the ABS in both areas
  884. 44:33Android it's that it's give motivation
  885. 44:36to develop it's actually to protect
  886. 44:38themselves from these problems because
  887. 44:41they come back to them at the end of the
  888. 44:43day so they started focusing on testing
  889. 44:46a lot and builds all the friends for
  890. 44:48this and as kinda mentioned a few times
  891. 44:55through the talk we one of the how
  892. 45:01shallow things is we're very problem
  893. 45:03driven not solution driven what it means
  894. 45:06is solution becomes secondary for us
  895. 45:10when we like the arguments what we do
  896. 45:13this way this way to use this technology
  897. 45:16or that when you start putting this
  898. 45:20around the problem definition when you
  899. 45:22define problem well but everyone who
  900. 45:25works on it understands it the same way
  901. 45:26then this becomes a criteria does it
  902. 45:29something work there or not and are the
  903. 45:32differences that outside of this process
  904. 45:34kind of become we're less important than
  905. 45:37and like the this Hollywood's generally
  906. 45:39don't don't happen in company between
  907. 45:41engineers and of course another very
  908. 45:48important aspect is peer reviews it's a
  909. 45:52way to challenge each other and learn
  910. 45:53from each other so it's General General
  911. 45:56Lee looks like everyone is a way of code
  912. 46:02review process with full requests etc
  913. 46:06we kind of would do this as part of this
  914. 46:10peer review but focus again on the
  915. 46:12problem not on the code what it means is
  916. 46:15in this process engineers are actually
  917. 46:18they have a slide where we coded is a
  918. 46:20specification just again to focus you
  919. 46:24have this focus on ddd describing first
  920. 46:27the problem with test where it starts
  921. 46:30from understanding the problem
  922. 46:32thinking about it designing some
  923. 46:34solution discussing it with your
  924. 46:35reviewers so that's where they Sam you
  925. 46:38prepare some code a pull request they
  926. 46:41wouldn't know what it is about and they
  927. 46:44spend a lot less time you know they ask
  928. 46:46you question they expect to see
  929. 46:47something in the code by the time and
  930. 46:49they focus on this thing if you solve
  931. 46:51the problem first not on you know second
  932. 46:54syntactical things that are resolved by
  933. 46:57introducing conventions and it's like
  934. 47:00not the main focus and I'm gonna speak
  935. 47:09because not much time this and yeah and
  936. 47:14really obviously all of those things
  937. 47:17they're part of in provinces but without
  938. 47:19people involved in this not having drive
  939. 47:22to create the great experience for fully
  940. 47:24customers to be involved and you know
  941. 47:28understanding the impact engineers crazy
  942. 47:31this all of that wouldn't matter really
  943. 47:33so this is probably the main thing in
  944. 47:37the whole yeah and as a pin is a
  945. 47:41conclusion to conclude so you a problem
  946. 47:45driven you learn and apply new learnings
  947. 47:48fast you work as a team you can build
  948. 47:50anything not not just buying as
  949. 47:53engineers as a nation we we have these
  950. 47:55benefits of knowing the tools
  951. 47:58understanding abstraction we can apply
  952. 48:01these skills pretty much to any domain
  953. 48:03which is possessing in awesome position
  954. 48:06really compared to to some other people
  955. 48:10so what yeah don't don't just try to do
  956. 48:13all your ideas at once just for be
  957. 48:15focused that's what I was saying any
  958. 48:23questions
  959. 48:33I'm sorry so we're talking about a
  960. 48:48giving example of cap transaction
  961. 48:50authorization what means this signal
  962. 48:53when you say you touch the controllers
  963. 48:58payment attach terminal movie cards from
  964. 49:01their signal go through multiple parties
  965. 49:04we will go through some payment gateways
  966. 49:06acquiring banks it will go through
  967. 49:08central network or senator service of
  968. 49:11MasterCard or Visa then we'll go to
  969. 49:13process it to us and this is what I mean
  970. 49:16I bet point when we receive this message
  971. 49:18we have this 500 milliseconds to say
  972. 49:22okay this we can authorize it
  973. 49:24yes so the inside the direct end-to-end
  974. 49:29yes it takes longer the before cut
  975. 49:31transactions there is certain limit most
  976. 49:33economies they have some differences
  977. 49:35depending on the market as well
  978. 49:37depending how all the system is in
  979. 49:39different countries but as far as
  980. 49:42remember it's about five five seconds or
  981. 49:465 seconds and like this and end to end
  982. 49:48yeah sure yeah so the question is how we
  983. 49:56handled technical debt over time so
  984. 50:00technical debt is something we don't
  985. 50:03define it as a separate thing so focus
  986. 50:08on things like refactoring and since we
  987. 50:11moved to this architecture of you know
  988. 50:16even architecture with secure s with
  989. 50:19small components this becomes more
  990. 50:22problem driven like you make the
  991. 50:25technical debt becomes at certain points
  992. 50:27is just a new requirement we say okay
  993. 50:31now we which in certain level of
  994. 50:34customers we need to think how to scale
  995. 50:36for the next year like well can we scale
  996. 50:39with the current solution can we process
  997. 50:41the transactions what do we do just
  998. 50:43scale out by you
  999. 50:46you know allocating more resources
  1000. 50:48processing resources always should we
  1001. 50:50change something in the code and we make
  1002. 50:51this decision we don't look at it as a
  1003. 50:53technical debt technical debt was at the
  1004. 50:56point when we transition to that those
  1005. 50:58literally arising all the code and that
  1006. 51:01happened and we have technical that
  1007. 51:04probably define it so yeah it's just not
  1008. 51:07give me absolute answer there is
  1009. 51:09technical debt in mobile apps so in on
  1010. 51:14Android app that has been closed
  1011. 51:16everything was written from Java 6 to
  1012. 51:19Kotlin which made all Android developers
  1013. 51:23lives a lot easier
  1014. 51:24and then on is it still these mix of
  1015. 51:28Objective C and Swift so there's a bit
  1016. 51:30of technical debt and rewriting of
  1017. 51:34internal frameworks thank you
  1018. 51:42[Applause]
  1019. 51:46[Music]

About this transcript

This page contains the full transcript of Anyone can build a bank: creating a new banking backend by Vlad Yatsenko by Devoxx, generated from the public captions YouTube serves with the video. The transcript has 7,047 words across 1,019 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.