As I promised, let’s moving forward with our Google Cloud journey. One of the many challenges was to move out from Sybase to Google Cloud SQL.
First things first. A couple of questions were asked last year about that: (1) Why do we need to move out from Sybase?; (2) How can we do it?; (3) Will Business and Customers enjoy it?; And (4) What will be the benefits?
These are basic questions that everyone can do, but the awesome trick here is how did we answer to them. So check it out:
1) Why do we need to move out from Sybase?
So straight to the point. As many you guys know, Sybase had its “golden age”, in other words it does not work anymore in our case (this is very important to say here), because our idea of digital operation and IT architecture is to stop doing things by stored procedures, stop worrying about the Sybase performance, stop worrying about storage area, stop worrying about Sybase management and maintenance and, for last but not least, stop worrying about Sybase replication and DR datacenter process.
Did you realize all answers are 100% addressed to IT matters? Why we should spend most of our time with this kind of matters while we should spend most of our time to improve our Customer experience by creating a flexible IT environment to deliver applications faster and easier?
I spoke about that in my last article here: IT and Customer Success Orchestration.
2) How can we do it?
First, we need to understand and go deeper on the database architecture such as schema, databases, tables, constraints, triggers and stored procedures. Trust me, you must know all the details about these items because this is will guide you to create your migration plan. So I think you are asking this question right now: But what about the data? I know this is the most important requirement ever and I can tell you that it is the easiest piece to migrate, so do not worry with that right now.
Moving on, what we did was created a bunch of database scripts to create the same schema over the Google Cloud SQL, export all the data from each table we had and import into the new Google Cloud schema. The process of moving data is not a rocket science, because Google allows you to move Terabytes and even Petabytes over to Cloud with the minimum cost as possible (trust me, it is almost nothing). Please see it here: Google Cloud Storage.
What about the Stored Procedures? This was the main requirement of the project because in our current scenario we had 5.000 stored procedures and we knew that all of it would not work on the new Google schema for many reasons: variables, objects and parameters works completely different between Sybase ASE and Google Cloud SQL.
Here’s the question: What should be the best and faster solution to migrate 5.000 stored procedures and also change the code/execution plan completely for each procedure to working with Google Cloud SQL?
The answer is: Machine Learning. Keep in mind it is insane to open all these procedures and start to coding from the scratch and then catalog one by one on the new schema, and also we did not have time to do so. So we decided to take a breath and take one step back.
These are the strategies we decided in that time as follow:
- We have created a brand new system (CRM) and discontinued many of legacy systems.
- And for the last, we decided to do not stop the data and schema migration planning. This was very important because as soon as we got done the stored procedures migration we were ready to the first step of the project, which was to go all in to the new schema at Google Cloud SQL.
After this huge effort, which by the way it took almost 6 months or so, and also many meetings and discussions, we finally got it done both systems and almost all the stored procedures migration to the new architecture. By the other hand, we were already ready to put the Google Project back on track (all in), because we decided to don’t stop the schema migration in the very beginning of the project as I mentioned above on the last strategy.
However, what was the strategy to migrate all the remaining stored procedures we did not move to the API framework? We could not leave these outstanding items behind because all the stored procedures were very critical for the business, so we went back to Machine Learning. What we did was we built and well trained a ML Model to grab all the Sybase parameters and transform them into Google Cloud SQL parameters.
With this process, we were able to reduce in 70% the remaining stored procedures. The 30% left we made manual adjustments. Nothing is a 100% easy peasy, guys, so we got our hands dirty in a lot of moments of this process.
3) Will Business and Customers enjoy it?
This is the question that I always ask for in any IT Project. I know we should be proud to moving all these moving parts over the Google Cloud and using the best technology as possible and in the same time reduce cost. UHUUU!!!! (just that? really? no!). Business and Customers have to feel and enjoy it all the changes as well. What I mean about that? I mean you should think how the change will improve Customer experience and how your Business can be available and scalable in a fast way anytime.
4) What will be the benefits?
This question is related to the previous one but the hard thing is we do have to write down what are the real benefits to both your Business and Customers, so let’s highlight the big ones:
- When you have all the data over the Google Cloud the Business will be able to process Terabytes of data in seconds and take insights from this;
- We can start to use Machine Learning to training all the data results and improve our business decisions;
- Google Kubernetes is improving our DevOps and letting us to create and update Customers applications in days based on Bigdata and Machine Learning results;
- Our data is now Unleashed! Business can easily access data, process and analyse information in real time over the Google Cloud Platform by using BigQuery and DataStudio to see, build and make decisions around that;
- IT Infrastructure 100% flexible and scalable. We do not spend time anymore with IT issues like performance, sizing, monitoring, patch management, compliance, etc…, in other words, We are spending almost of our time focus on Customers UX and how can we improve our Products.
On the next, I will post more about our Google Cloud journey and I am planning to talk about Google Kubernetes and Microservices. I hope you guys are enjoying and please leave your comments and questions. I will be glad to hear and catch up with you.
This article was published originally on Marcelo’s LinkedIn.