Here Development Genuine Java: How AliExpress Works After Moving Development to Russia





Hello, Habr! My name is Anatoly Orlov and I am the CTO of AliExpress Russia. The service has been available to Russian-speaking users for 11 years, while the company's office in Moscow opened only five years ago, and a local development team appeared only last year. Its main task is to adapt the platform, initially sharpened in the Chinese way, to the realities of Runet and make it clearer and easier for Russian-speaking users.



Why the Chinese search engine is not suitable for Runet, how to help local sellers get more orders, what technologies and why you need to adapt for this - in the first article on our blog on Habré, we will talk about the process of transferring development, difficulties along the way, the first projects and engineering plans. teams. Go!



Why did you postpone development at all?



The decision to transfer the development to Russia was made after the creation of a joint venture (JV), in which Alibaba, Mail.Ru Group, Megafon and RDIF took part. This was done in order to develop an e-commerce platform in accordance with the rules and laws of the Russian market and for the convenience of Russian users and sellers.







It's me



In recent years, the Russian-speaking part of AliExpress has developed intensively and required more resources and focus. At the same time, the Russian business for the Alibaba Group as a whole is too small a segment in comparison with any Chinese service of the company, so it was very difficult to get the resources for making changes. When the development of a Russian-language platform is not located in Russia, then the project needs to wait for its turn for development resources. And given that the queue is prioritized in terms of market size, Runet users had to wait for improvements for a long time. If engineers worked in Russia and constantly dealt with Russian AliExpress, understanding how to make a product that is in demand here, this would open up more room for development.



After the creation of the joint venture, the situation shifted in this direction, we actively began to build up our technical team. So, if in January 2020 there were about 40 of us, then in January 2021 the number of engineers increased to almost 400. What are all these people doing?



Adaptation of the global service for the runet



Everything sounds quite simple: you just need to "take" parts of the system that are important for the local market (for example, search) under your control, adapt them and develop the site in the future. In practice, things are not so easy at all.



The infrastructure of AliExpress was not originally designed for the fact that in the future projects may appear in different countries, which will develop according to the rules of the local market and by the efforts of local specialists. The code was written by Chinese developers, using tools that are convenient for them, including Alibaba's internal technologies, which are difficult to apply outside of China. For example, there might be a great technology with Chinese-only documentation and requiring a two-character login to get started.







Photo: Oleg Lozovoy / RBC



Despite the fact that Java is one of the main programming languages ​​in the entire ecosystem, almost all environments and tools are proprietary. Forks of popular well-known open source solutions are quite common, but there are not so many of them in the total infrastructure. Often such systems are heavily "finished" and have little in common with the original project. For example, Alibaba has a wonderful MaxCompute technology, which is outwardly almost indistinguishable from hadoop and apparently was once forked from hadoop, but the size of the clusters under its control would make hadoop developers eyes twitch with envy.



A typical localization of the development of something looks like this: we take a part of the AliExpress system and make its local fork - in the sense of copying services, deploying a second copy of applications and switching traffic. After that, we get the ability to change the code without affecting the Chinese parts of the system in other countries.



Interacting with fellow Chinese engineers is also an unusual experience. There are cultural characteristics of the approach to work and the work ethic itself, and the big time difference cannot be discounted. Plus, the fact that engineers in China and Russia are used to working with different technologies makes itself felt - and it takes time for people with different backgrounds to tune in to the same wavelength in discussions.



In Chinese culture, indirect feedback is adopted. This is when the interlocutor is not directly pointed out the shortcomings in his work, and even publicly - so as not to upset and humiliate - but carefully hint. There is usually no difficulty in understanding. For example, the word suggest (in Russian "to offer") for the Chinese has a different meaning. If such a "proposal" comes from the head - you should take it as an order that must be executed. When a colleague from another team “suggests” to change something, this means a rather persistent request.



This is not always clear to Russian-speaking developers, with their habit of giving direct feedback, and Chinese colleagues are often shocked by the standard Russian call “you did the wrong thing, you need to redo it”. Results can be achieved in any case, but negotiations and discussions can take a little more time than we are used to.



Even the very process of communicating with Chinese colleagues looks different: they very actively use emoticons, even in purely business correspondence. No matter how serious the issue you are discussing, the chat will be full of emoji:







Change of technology stack, replacement of search engine, promotions of local sellers



For AliExpress in Russia, we made the decision to ultimately ditch the proprietary technology stack in areas where it makes sense. For example, where in open source there are analogues comparable in quality and where the transition can be made with relatively little blood.



Often, instead of Java, we use Kotlin, write separate services in Go and .Net, use Kubernetes, GitLab, k8s, Prometheus, Grafana, Opsgenie, etc.


At the same time, many Alibaba Group projects will remain on the stack because they are good and / or necessary. For example, the source of knowledge about cross-border goods (that is, which can be bought from foreign suppliers) will always be the Alibaba system; we can write our own, but it will be quite difficult to force 100 million Chinese sellers to go there.



One of the first changes: we started to replace the Chinese search engine. Now it is by no means always applicable for Russian queries, for example, in some places a search query is truncated to 30 characters - at the same time in the middle of a word. At first glance - some kind of horror, but for the Chinese engine this is quite logical, because there are no spaces, and queries with a length of 30 characters (i.e., hieroglyphs) are not found in real life. Actually, it is not difficult to fix this feature, but when there are many defects, it is more reliable approach to make your own search engine. With all this, Alibaba's search platform is technologically close to the state of art.



Another important change: we have begun work on highlighting local sellers in the delivery of goods. The problem with global AliExpress was that even if there was a product that could be bought from a Russian seller and paid less for delivery, Russian users might not have found out about it.







Photo: Oleg Lozovoy / RBC



Alibaba's machine learning algorithms are geared towards promoting products with the highest sales volume, and the chicken and egg problem naturally arises: the Russian segment of the platform here cannot compete with China, and as a result, local sellers do not get sufficient positions in the search. After a series of unsuccessful attempts and experiments, we managed to improve the position of Russian goods, but the system is still far from ideal, we will improve it.



As a result, the Russian engineering team took over the development of the aliexpress.ru website, a Russian mobile application, and soon all other aspects, such as the loyalty program, will be included in its sphere of responsibility.



What's next: completely your own search, even more traffic to local products, bug fixing



We are actively "piloting" a new search, which will include an algorithm for promoting local products for the most popular queries and provide recommendations for them so as not to lose sales. And of course, it will search the way Russian-speaking users are used to. Current status: we have performed the first a / b test, the results of which are pleasing to us.



We know about some of the "birth injuries" of AliExpress, which annoy everyone, in particular the constant logout on the site, bugs in localization, which we have not yet managed to win, since we have not yet "taken away" the required code, but we are working on it.



Obviously, some parts of the AliExpress system will never be fully localized, but we want to achieve a state in which the platform will be as convenient as possible for the user and the seller, without restrictions. We will be actively engaged in this and talk about our experience in the blog on Habré. So subscribe and write in the comments, what to tell us about in the following articles.



All Articles