How a small program turned a small office into a federal company with a profit of 100+ million rubles / month

At the end of December 2008, I was invited to one of the taxi services in Perm in order to automate existing business processes. In general, three fundamental tasks were set before me:


  • Develop a software package for a call center with a mobile application for taxi drivers and automate internal business processes.
  • Everything had to be done in the shortest possible time.
  • Have your own, not purchased from third-party developers, software, which in the future, as the business developed, could be independently scaled to constantly changing market conditions.

At that time, I did not understand how this market works and its nuances, but nevertheless, two things were obvious to me. The call center must be built on the basis of the open source software PBX asterisk. The exchange of information between the call center and the mobile application is essentially a client-server solution with all the relevant patterns for designing the architecture of the future project and its programming.

After a preliminary assessment of the tasks, deadlines and costs of the project, having agreed on all the necessary issues with the owner of the taxi service, in January 2009 I started work.

Looking ahead, I will say right away. The result is a scalable platform running on 60+ servers in 12 cities in Russia and 2 in Kazakhstan. The total profit of the company was 100+ million rubles/month.

Stage one. Prototype

Since at that time I had no practical experience in ip telephony, and I was only superficially familiar with asterisk as part of "home" experiments, it was decided to start working with the development of a mobile application and a server part. Along the way, closing gaps in knowledge on other tasks.

If with a mobile application, more or less everything was clear. At that time, it could only be written in java for simple push-button phones, but with writing a server serving mobile clients, the issue was somewhat more complicated:

  • What server OS will be used;
  • Based on the logic that the programming language is chosen for the task, and not vice versa, and taking into account clause 1, which programming language will be optimal for solving problems;
  • When designing, it was necessary to take into account the expected high loads on the service in the future;
  • Which database can guarantee fault tolerance under high loads and how to maintain a fast response time of the database with an increase in the number of calls to it;
  • The determining factor was the speed of development and the ability to quickly scale the code
  • The cost of equipment and its maintenance in the future (one of the conditions of the customer is that the servers must be located in the territory under his control);
  • The cost of developers who will be needed at the next stages of work on the platform;

As well as many other issues related to design and development.

Before starting work on the project, I proposed the following strategic decision to the business owner: since the project is quite complex, its implementation will take a noticeable amount of time, so first I create an MVP version, which will not take much time and money, but which will allow his company to gain a competitive advantage on the market already β€œhere and now”, and will also expand its capabilities as a taxi service. In turn, such an intermediate solution will give me time to design the final solution more thoughtfully and time for technical experiments. At the same time, the implemented software solution will not be guaranteed to be correctly designed and may be radically redesigned or replaced in the future, but it will definitely perform the minimum necessary functionality to β€œbreak away from competitors”. The founder of the taxi liked the idea, so in the end they did it.

I spent the first two weeks studying business processes in the company, and studying the work of a taxi "from the inside". Conducted a business analysis of where, what and how can be automated and whether it is necessary at all. What difficulties and problems do employees of the company face? How they are decided. How the working day is organized for the employees of the company. What tools are used.

By the end of the third week after starting work and studying questions of interest on the Internet, taking into account the wishes of the business owner, as well as my own knowledge and capabilities at that time, it was decided to apply the following stack:

  • Database server: MsSQL (free version with database file limitation up to 2GB);
  • Development of a server serving mobile clients in Delphi under windows, since there was already a windows server on which the database would be installed, as well as the development environment itself contributes to rapid development;
  • Given the low Internet speeds on mobile phones back in 2009, the exchange protocol between the client and the server must be binary. This will reduce the size of the transmitted data packets and, as a result, increase the stability of the client's work with the server;

Another two weeks were spent designing the protocol and database. It turned out 12 packages that provide the exchange of all necessary data between the mobile client and the server, and about 20 tables in the database. I did this part of the work with the future in mind, even if you have to change the technology stack completely, the structure of the packages and the database should remain unchanged.

After the preparatory work, it was possible to proceed to the practical implementation of the idea. In order to speed up the process a little and free up time for other tasks, I made a draft version of the mobile application, outlined the UI, partly UX and attracted a familiar java programmer to the project. And he focused on the development of the server side, design and testing.

By the end of the second month of work on MVP, the first version of the server and client prototype was ready.

And by the end of the third month, after synthetic tests and field tests, bug fixes, minor protocol and database improvements, the application was ready for production. Which is what was done.

From this moment begins the most interesting and most difficult part of the project.

During the transition of drivers to the new software, round-the-clock duty was organized. Since not everyone could come during the day during working hours. In addition, it was administratively, by a strong-willed decision of the founder of the company, that the login / password was entered by the manager of the taxi service and they were not reported to the driver. For my part, I needed technical support for users in case of failures and unforeseen situations.

Murphy's Law tells us, "Anything that can go wrong, will go wrong." And that's not how things went... It's one thing when I and a few taxi drivers tested the application on dozens of test orders. And it’s a completely different thing when 500+ drivers on the line work in real time on real orders from real people.

The architecture of the mobile application was simple and there were noticeably fewer bugs in it than in the server. Therefore, the main focus of the work was on the server side. The most critical glitch in the application was the problem of disconnecting from the server when the Internet was lost on the phone and the session was restored again. And the internet went down quite often. Firstly, in those years, the Internet on the phone itself was not stable enough. Secondly, there were a lot of blind spots where the internet just didn't work. We identified this problem almost immediately and within a day eliminated and updated all previously installed applications.

On the server, there were mostly errors in the order distribution algorithm and incorrect processing of some requests from clients. Upon detection of glitches, corrected and updated the server.

In fact, there were not so many technical problems at this stage. The whole difficulty was that for almost a month I was on duty in the office, only occasionally getting out home. 4-5 times, probably. And I slept in fits and starts, because at that time I was working on the project alone and no one except me could fix anything.

A month, this does not mean that everything was constantly buggy for a month and I, without stopping, coded something there. We just decided that. After all, the business was already working and making a profit. And it's better to play it safe and relax later than to lose customers and profits now. We all understood this very well, so the whole team together paid maximum attention and time to introducing new software into the taxi system. And taking into account the current traffic of orders, in a month we will definitely eliminate all the shortcomings. Well, the hidden bugs that may remain will certainly not have critical consequences for the business process and, if necessary, they can be corrected in the working order.

Here it should be noted the invaluable help from the directors and foremen of taxi services, who, with the maximum understanding of the complexity of the situation of transferring drivers to new software, worked around the clock with drivers. In fact, after the installation of new programs on phones was completed, we did not lose a single driver. And they did not critically increase the percentage of non-delivery of customers, which was soon returned to normal levels.

This completed the first phase of the project. And it should be noted that the result was not long in coming. By automating the distribution of orders to drivers without human intervention, the average waiting time for a taxi by a client has decreased by an order of magnitude, which naturally increased customer loyalty to the service. This led to an increase in the number of orders. The number of taxi drivers also increased. As a result, the number of successfully completed orders also increased. As a result, the company's profit increased. Of course, here I'm getting ahead of myself a little, since this whole process did not take place instantly. To say that the management was satisfied is an understatement. I was given unlimited access to further financing of the project.

To be continued..

Source: habr.com

Add a comment