Goodbye Oracle! Exclusive Insights into PrestoMall’s Transition to Alibaba Cloud
By: Alibaba Cloud
Tags: Database, Postgresql, Alibabacloud, Architecture, Oracle

This article is based on another post by Tian Xiaoxu.

Many people say today’s Southeast Asia is like a time machine going back to the Chinese market of the 1990s. Well, this is definitely true in the Internet arena of several Southeast Asian countries, as we can often see a reflection of China’s Internet development mirrored there. In this post, we’re going to take a special look at how Southeast Asian companies like PrestoMall are saying goodbye to Oracle, revealing how the direction that Chinese tech firms are taking is also replicated in Southeast Asia.

PrestoMall is a Southeast Asian company specializing in e-commerce that was established in 2014. Until recently, the enterprise had been using Oracle databases to host their business services and applications. All their services were supported by a set of Oracle databases, whereas another set of Oracle databases were used to support their test environments.

In August 2018, three months before their Oracle database software license expired, Prestomall decided to stop using Oracle databases all together, looking for an alternative. So, why did they decide to stop using Oracle anyway? What alternatives were out there for them? And just how did the entire migration process work in the end? To get answers to these questions, InfoQ interviewed the Alibaba Cloud technical team that participated in the entire process of PrestoMall’s transition away from Oracle to Alibaba Cloud’s database solution.

Why Did PrestoMall Stop Using Oracle?

In recent years, with the development of mobile Internet throughout Southeast Asia, PrestoMall experienced a boom in growth. In terms of revenue scale, the company achieved a growth of 256% over the past three fiscal years. With PrestoMall’s business successes, the amount of data they need to process started to increase sharply, which made their IT costs also soar. To ease these costs, PrestoMall saw getting away from Oracle as a solution.

One reason for this conclusion was that the licensing fee for Oracle was a sizable cost in their budget. They felt it was too high. Moreover, as the number of PrestoMall’s customers and its business data volume increased, this expenditure eventually came to account for a majority of their IT budget, which greatly restricted and hampered business development and expansion at the company. Therefore, three months before the license was due to be renewed, PrestoMall began to actively and aggressively seek out alternatives.

In addition, with the rapid development of their business, the vertical architecture that used Oracle databases also restricted the elasticity of PrestoMall’s IT systems — something that stopped them from further growth. The main problem was that traditional databases are not powerful enough to meet the rapid development of Internet Plus, which led PrestoMall to decide they needed to say goodbye to Oracle.

Choosing the Best Option

The main motivation for PrestoMall to part ways with Oracle was reducing its IT spending. Therefore, early in the process of looking for alternatives, IT costs and fees were naturally a major concern. Plus with the current license about to expire, quick migration was also an extremely important consideration.

Initially, open source databases were all preferred. Regardless, PrestoMall came up with three alternative:

Use a commercial database product other than Oracle, such as IBM DB2 or Microsoft SQL Server. Use an open-source database product, such as MySQL or PostgreSQL. Continue using their Oracle databases and renewing the license when it was due.

PrestoMall wanted to stop using Oracle and free themselves from being locked down by traditional commercial database vendors. Therefore, the first and third options were far from ideal. Although retaining Oracle or using another commercial database product would be the quickest and easiest option, it was far from the best option. PrestoMall would only consider one of these options if there were no applicable alternatives or there was not enough time to implemented their preferred solution. PrestoMall team was aware that this is a “now or never” situation, as not switching now would make switching in the future all the more difficult.

So, after evaluating their options, the PrestoMall team shifted to using open-source databases. Among the alternative open-source database products out there, PostgreSQL provided more SQL functions than MySQL and was a less expensive option, so PostgreSQL was naturally their top choice.

After the initial considerations, the Prestomall team performed a further detailed assessment of the migration solution by diving into the following concerns:

How compatible would the selected database system be with the existing Oracle databases? Would the existing local deployment solution be able to be retained or would a cloud-based migration solution need to be implemented? How intense would the migration process be and how long would it take? Is there sufficient technical support to adopt the new technical solution?

In the end, they decided to go with Alibaba Cloud, given both the support for open-source PostgreSQL and their good and quick migration services. In particular, they decided on using Alibaba Cloud’s database management system solution ApsaraDB for PolarDB, and use Data Transmission Service (DTS), and Alibaba Cloud’s Advanced Database and Application Migration (ADAM) service for migration.

At the beginning, PrestoMall wasn’t looking for a solution deployed in the cloud. Their original Oracle databases were hosted locally. However, since PostgreSQL was selected as the language of choice, and Alibaba Cloud’s PolarDB was their database management system of choice, they decided to migrate their services to Alibaba Cloud.

Let’s discuss the products and services that PrestoMall decided on:

Alibaba Cloud ApsaraDB for PolarDB is somewhat of a unicorn in the database management systems of the world. It is a distributed, cloud-native database system that was independently developed by Alibaba Cloud. The service was developed with high demand industries like the gamming industry and e-commerce in mind. PolarDB is fully compatible with MySQL, PostgreSQL, and also highly compatible Oracle syntax.

Alibaba Cloud Data Transmission Service (DTS) is a migration tool that supports data communication among RDBMS, NoSQL, OLAP, and other data sources, incorporating the data migration, subscription, and synchronization process all together.

Alibaba Cloud’s Advanced Database and Application Migration (ADAM) service supports the complete and comprehensive migration of Oracle-based systems.

One question remains, however, why exactly was this solution ultimately chosen in the end? Yang Lin, the director of Alibaba Cloud’s database and application migration product solutions, said that the client, PrestoMall, told him it was due mainly to three main reasons:

First, cloud migration can easily adapt to future business development. Previously, PrestoMall used locally hosted Oracle database systems. By moving to Alibaba Cloud with its database solution of ApsaraDB for PolarDB, the company could start to take advantage of the elastic scalability that cloud database systems have to offer meaning that they could in turn request resources on demand, responding to sudden changes in business. This, of course, is the best possible solution for an e-commerce enterprise.

Previously, PrestoMall used locally hosted Oracle database systems. By moving to Alibaba Cloud with its database solution of ApsaraDB for PolarDB, the company could start to take advantage of the elastic scalability that cloud database systems have to offer meaning that they could in turn request resources on demand, responding to sudden changes in business. This, of course, is the best possible solution for an e-commerce enterprise. Second, the migration cost is optimal. Here cost not only refers to the monetary costs related to using database resources after migration but also includes the migration process in all of its complexity, including code modification and migration time, among other things. Through a thorough investigation, it was found that ApsaraDB for PolarDB was highly compatible with Oracle database systems, and therefore all the associated migration costs could be reduced significantly.

Here cost not only refers to the monetary costs related to using database resources after migration but also includes the migration process in all of its complexity, including code modification and migration time, among other things. Through a thorough investigation, it was found that ApsaraDB for PolarDB was highly compatible with Oracle database systems, and therefore all the associated migration costs could be reduced significantly. Third, risks are controllable and technical support was guaranteed.

In 2000, Alibaba began to use Oracle databases. But in as early as 2008, Alibaba decided to stop using Oracle databases for other solutions. As you can see, the experience of PrestoMall mirrors that of Alibaba. Over the past decade or so, Alibaba’s technical staff have figured out and perfected many of the details involved in migration from Oracle-RAC databases to Aliabab Cloud database solutions like ApsaraDB for PolarDD, both from an on-premises data center and from another cloud environment. Throughout the journey, Alibaba has accumulated lots of experience, from which we managed to developed products like ADAM and DTS. These success stories were highly attractive to PrestoMall during the decision process.

At the initial proposal phase, the Alibaba Cloud Database team provided a highly detailed transformation plan based on ADAM. This plan included insights into how to implement automatic mapping, automatic parsing, and automatic conversion at the database level. Also, this plan explained how to modify code at the application layer. At the same time, code modification analysis was performed on the compatibility of different database products.

De Mai, the product director of Alibaba Cloud’s ApsaraDB stack on the international site, noted that, after performing the ADAM analysis, we found that, without ADAM, we would need to modify more than 80% of the code when migrating from Oracle to PostgreSQL. However, by using ADAM to migrate data to PostgreSQL, only about 10% of the code needed to be modified, and merely 5% for migrating data to PolarDB. This was exactly another important reason why ADAM and PolarDB were included into the final migration solution.

Migration Process

Now that the migration solution had been determined, the next is to plan specific migration tasks. The process of migrating PrestoMall’s systems from Oracle was done in six steps. Companies that are interested in going forward with similar migration processes can also take these steps.

Step 1. Select an alternative to Oracle. The previous section described the selection process in detail, so it will not be described here.

The previous section described the selection process in detail, so it will not be described here. Step 2. Make it possible to migrate from Oracle. This involves decoupling from Oracle databases and upgrading the business IT architecture to achieve greater business flexibility.

This involves decoupling from Oracle databases and upgrading the business IT architecture to achieve greater business flexibility. Step 3. Transform your business. This is the most difficult part for all customers who want to move away from Oracle. The two major challenges for business transformation are workload evaluation and compatibility.

This is the most difficult part for all customers who want to move away from Oracle. The two major challenges for business transformation are workload evaluation and compatibility. Step 4. Migrate data. This not only ensures consistency between full and incremental data, but also ensures data backflow capability so that data can flow back and forth freely.

This not only ensures consistency between full and incremental data, but also ensures data backflow capability so that data can flow back and forth freely. Step 5. Test and fine-tune the new database. Although PolarDB is compatible with Oracle, they are two products with different product features. Therefore, further debugging is required after migration.

Although PolarDB is compatible with Oracle, they are two products with different product features. Therefore, further debugging is required after migration. Step 6. Perform cutover and provide support. Two weeks of support from Alibaba technical experts was available after the cutover and launch is completed.

It is worth mentioning that ADAM plays two major functions in the migration process. One is the automatic conversion function, which helps users automatically convert the original Oracle SQL to the compatible SQL. The other is the automatic learning function. Although PolarDB is highly compatible with Oracle, there are syntax differences between them. ADAM’s SQL syntax colorizing function uses different colors to mark syntactic differences, helping you quickly understand the differences in syntactic rules.

So far, almost all of the Prestomall’s business traffic has been migrated to PolarDB, with only two tables in the mail system still undergoing reverse synchronization.

When it comes to database migration, many people are concerned about security issues. As an e-commerce platform in Southeast Asia, PrestoMall was especially concerned about business protection in terms of processes. According to Zheng Dan, a senior database administration expert at Alibaba Cloud, Alibaba Cloud works on two levels to ensure data protection and business stability. On the first level, DTS not only implements data migration, but also performs data verification in the process. On the other level, ADAM also checks the compatibility and compatibility results of the Prestomall system.

Afterword

There is a saying in the industry that “the world has suffered under Oracle for a long time,” but actually going away from Oracle is more difficult than you can imagine. So, what are the options people usually go for when they don’t want to use Oracle anymore?

Ye Zhengsheng, the product director of Alibaba Cloud’s intelligent database department, said, “In fact, there aren’t very many alternatives to Oracle. Ultimately, there are only three common choices out there: The first is to migrate to another commercial database, but this option isn’t really ideal either. The second is to select a database that is highly compatible with Oracle syntax. The advantage of this is that there is basically no need to make major changes to your business. The third is to switch to a distributed database. The disadvantage of this is that your business needs to be completely redesigned, but it does have an advantage is that the enterprise can enjoy the benefits of a distributed system after switching.”

Original Source: