Used car loan for 1 minute

3r33354. Used car loan for 1 minute 3r33357. 3r33333.  
Instead of introducing 3r33351. 3r33333.  
3r33354. Like all interesting stories, this one started long enough and unexpectedly. One day our partner bank came to us and said: “Guys, we learned how to score in our system in one minute. How about combining our efforts and integrating projects? With us - a solution and a loan, with you - cars. ” To say that we were inspired - to say nothing! We had every chance of becoming the first one in the world who can give a loan online for a used car in one minute (ONE MINUTE, KARL)! Below, I will tell you what came out of it, but for a start I will tell you who we are. 3r314.
3r33357. 3r33333.  
3r33354. 3r33357. 3r33333.  
3r33354. We are “Wheels | Roof | Market ”is the largest IT-company based in Kazakhstan. Every day, our products help six million Kazakhstanis to buy and sell cars, apartments, cribs and thousands of other things. Kolesa.kz is the largest auto resource and application, not the first year it takes the 1st place in the mobile rating of Kazakhstan. 3r33357. 3r33333.  
What is the project "Car loan"?
3r33333.  
3r33354. At the moment, the base of used cars is 10?400 cars, more than 60% of them are available on credit! 3r33357. 3r33333.  
What it looks like in pictures [/b]
3r340. 1. Choose a car that we want to borrow
3r33333.  
3r33354. 3r33357. 3r33333.  
3r33354. 3r3145. Figure 1. Search engine lending available on credit 3r3146. 3r33357. 3r33333.  
3r3355. 2. On the advertisement page we see the form for applying for a loan 3r3193. 3r33333.  
3r33354. 3r3145. Figure 2. The ad page screen 3r3146. 3r33357. 3r33333.  
3r366. 3. Select the period and the initial payment and click to get approval 3r3193. 3r33333.  
3r33354. 3r371. 3r33333.  
3r3145. Figure 3. Credit calculator for ad
3r33357. 3r33333.  
4. We get to the form where we need to enter our contact information
3r33333.  
3r33354. 3r33333.  
3r3145. Figure 4. Loan application initialization form 3r3146. 3r33357. 3r33333.  
3r33354. Here we enter your mobile phone number Name and IIN (in Russia it would be a TIN)
3r33333.  
5. Next you need to enter the SMS code that will come to the number you specified
3r33333.  
3r33354. 3r33333.  
3r3145. Figure 5. A form for confirming a phone number by entering sms 3r3146. 3r33357. 3r33333.  
6. After this, the scoring process itself begins, which lasts no more than 1 minute
3r33333.  
3r33354. 3r3114. 3r3145. Figure 6. Screen for the scoring process for application
3r33357. 3r33333.  
7. There are several options for scoring:
3r33333.  
3r33336.  
You approve loan
 
You are denied a loan
 
You are offered alternative conditions
 
You are asked for additional information, after which you are provided with one of the previous options (a, b, c) 3r3333345.  
3r33347. 3r33333.  
3r33354. 3r3142. 3r33333.  
3r3145. Figure 7. An example of an auto loan approval screen 3r3146. 3r33357. 3r33333.  
3r33354. After the person receives approval of his application, the manager from the bank calls him back within 10 minutes and informs the person about what actions he needs to take further in order to issue a loan. Convenient, isn't it? Let's see how it was all implemented. 3r33357. 3r33333. 3r33333. 3r33333.  
Do you remember how it all began
3r33333.  
3r33354. It was the first time and again! If earlier we had just a feedback form as a credit form, then our new idea was something completely new and incomprehensible. Since We had no analogues, we had to have a very exciting experience - to plan, design, distribute and implement. To begin with, we broke the whole process of our joint integration into 2 blocks, which were performed in parallel, namely: 3r33357. 3r33333.  
 
Infrastructure integration
 
3r33354. Software integration
3r33333.  
3r33354. Initially, we agreed with a partner bank that he (the partner bank) will provide us with some kind of API, to which we will send some data and receive some answers. On that and decided. We began to wait for the API documentation from the bank, brought our engineers and their network engineers together! In terms of software integration, a fairly simple scheme emerged, we send the data to the bank, the bank scrolls through it in its system, and returns it to us, and all this within the guaranteed 60 seconds. In case of a timeout (where without it), we agreed to display an emergency questionnaire in which we collect data that the bank may additionally need. 3r33357. 3r33333.  
3r33333.  
3r33333.  
3r3183. Networks
3r33333.  
3r33354. At that time, while the developers chose the tools for implementation, designed their system and waited for the documentation on the partner system, in the infrastructure department the work was already in full swing! We had two partners with our partner bank: 2 adjacent tsiska in one DC, cable connecting tsiski, VPN tunnel, safety certificates and access to work with them of all colors and sizes The plan was as follows, We pass the encrypted VPN channel between our servers, and build direct integration between our services. Schematically, this can be represented as follows: 3r33357. 3r33333.  
3r3192. Let's talk about the code
3r33333.  
3r33354. Below we will talk about how and what is arranged by our service. So, having received a document describing the partner's service ready for integration, we learned that, unlike us, the bank works only with SOAP requests, and does not want to hear about any RESTfull services. And since in our services we use SOAP a little less than never, we had many wonderful discoveries about how to learn how to prepare SOAP in our new product. Therefore, we needed to teach our service how to parse SOAP requests and convert our responses back to SOAP. 3r33357. 3r33333.  
Choosing a framework
3r33333.  
3r33354. To begin with, it was necessary to choose at least an implementation language, there were a lot of ideas, starting with C and C # ending with golang and erlang. We decided to go on a simple path. The system will need to be maintained, and in order not to run into the bus factor with the lack of specialists in the market, we decided to focus on the most common technology in our company - PHP. Thank God that the window was no longer 200? and the year 2017 and php frameworks are so numerous that they can satisfy the needs of even very sophisticated engineers. After going through a whole bunch, we chose one of the simplest and at the same time supported - Yii 2. 3r3333357. 3r33333.  
3r33354.
For this decision was:
3r33357. 3r33333.  
 
Easy to master, a whole bunch of literature; 3r33333.  
It is easy enough to build forms and validators; 3r33333.  
There is an Active Record and a car ready for work with all sorts of tools; 3r33333.  
He really is fast; 3r33333.  
At its base, the API is simply built, it is convenient to write console commands. 3r33333.  
3r33333.  
3r33354.
Against it: 3r33636. 3r33357. 3r33333.  
 
The framework is built on static methods - this is very inconvenient, including when writing tests 3–3–3345.  
It was not entirely clear what additional tools we would need in the near future after launch, and, as a result, there was a risk of not finding the necessary libraries 3r3333345.  
3r33333.  
Select storage
3r33333.  
3r33354. The framework has been chosen; now it is time to choose a repository for applications. There were several options, MySQL, mongoDB, postgreSQL On the one hand, the application is a document, for sure its structure can change, from time to time supplemented with new fields and getting rid of irrelevant ones. On the other hand, the use of non-relational databases will impose its limitations. After weighing all the pros and cons, we decided to sit on 2 chairs and use MySQL for the launch, and after launch we migrated to the mongoDB + ElasticSearch bundle. As a result, 2 MySQL replicas were raised as storage and bolted to the application using ActiveRecord. By the time we started the transition to mongoDB, the amount of data has grown tremendously and has taken such a growth rate that there is another need to separate requests for conditional storage. As a tool for near-realtime document indexing in ElasticSearch, we decided to use a service written in Golang - monstache. 3r33357. 3r33333.  
We build infrastructure
3r33333.  
3r33354. The infrastructure decided to do the following: 10 backends with an application ticket handler, 2 balancers, 2 MySQL replicas, 3 elasticsearch shards, 3 mongoDB replicas and 2 monstache replicas of the service. 3r33357. 3r33333.  
Process
3r33333.  
3r33354. In general, the auto loan process can be divided into 2 parts:
3r33333.  
3r33336.  
To get started, you need to find a suitable car available on credit. Most likely you will be guided by its condition and credit conditions. 3r33333.  
After you select a car, you need to get a loan approval, for this you will need to fill out an application
 
3r33347. 3r33333.  
3r33354. We have more or less told about the implementation of the second part, we will talk about the implementation of the first part. The implementation of the first part consists of several parts: 3r33357. 3r33333.  
3r33336.  
When searching for a car, a person should be able to focus, in addition to technical parameters, on the availability of a car for purchase on credit and on the minimum monthly payment. To do this, we need to know at the time of the announcement of the announcement whether the car is available on credit and what will be the minimum payment for it. 3r33333.  
After a person chooses a car, we need to provide him with a loan calculator, where he could choose the size of the down payment and the loan term, thereby choosing the most comfortable monthly payment amount. 3r33333.  
3r33347. 3r33333.  
3r33354. For this purpose, a special microservice in the go language was developed. Its essence was as follows: When submitting an advertisement, an object is sent to microservice with all the data for the car, microservice, based on the rules that are written separately for it, returns the minimum monthly payment for indexation in the search, and also returns the minimum initial payment and admissible terms credits that form the basis for building a loan calculator. 3r33357. 3r33333.  
3r33354. 3r3307. 3r33357. 3r33333.  
3r33354. We pre-cache the miscalculation options for the standard values ​​of the initial payment and the monthly payment. This is done for each of the available credit periods. If a person changes the down payment (within the limits of the allowable), then microservice will again calculate all the data. If the initial payment is specified less than the allowable, the calculator will display a validation error. 3r33357. 3r33333.  
3r33354. 3r33333. 3r33357. 3r33333.  
3r33354. Due to the high load on our service, the loan calculator has 2 degrees of caching: the first occurs on the back end, where customers initially go for the calculator, the second in microservice itself. 3r33357. 3r33333.  
3r3323. So what is the result?
3r33333.  
3r33354. We launched the project on September 1? 2017. From the moment on today's date (12/04/2018) ?97?868 applications have been submitted. We are in a continuous process of improving our service and simplifying the user path. Making it faster easier and more stable! Uptime of the project for the entire period since launch was ???%. 3r33357. 3r33333.  
3r33354. As a result, we have the following results:
3r33333.  
3r33336.  
Significantly shortened custom path
 
Expanded the volume of cars available for lending to 60% of the entire base
 
To date, the number of applications has increased by more than 7 times! 3r33333.  
3r33347. 3r33333.  
3r33350. Instead of concluding
3r33333.  
3r33354. For 3 months we managed to build a truly amazing and unique project. Its main goal was to give our customers the opportunity to purchase used cars without leaving our platform. In just 1 minute, the user can get a decision on his application, call the seller, and arrange all the necessary documents on the same day. 3r33333.  
Judging by the number of applications per year and 2 months, we can conclude that we manage to make the service really convenient and in demand. 3r33357. 3r33333.
3r33333. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () ();
3r33333.
PHP / Yii
+ 0 -

Add comment