Salesforce Switched from Python to Golang
Before we start with why Golang was chosen by Salesforce for Einstein Analytics let us understand what is “Einstein Analytics”
What is Einstein Analytics?
Salesforce launched Einstein Analytics in 2017. Einstein Analytics is the application that visualizes all the activities that occur in your Salesforce environment. Whatever may be the use-case of Salesforce, the visibility tool helps you with insights into the information of your users added to CRM every day like accounts, contact, campaign, etc.
Why Golang?
In the initial period at Salesforce, the query engine and dataset creations tools were making use of programming language C and Python. C was used for performance and Python for functionality like parsing queries and REST API server. The query engine and dataset creations tools eventually became Einstein Analytics. The product was intended to make use of the ability and pros of both language C and Python
Python works great while writing higher-level applications but lacks in the high performance which is expected and needed at the enterprise level. Whereas C language is highly performant and scaling it, adding features takes a longer time.
Everything was going smoothly with Einstein Analytics but before the launch, Einstein Analytics’ performance started to slow down due to the unwanted new feature that started to load onto the Python wrapper. And this new feature was not a part of the core query engine. To developed and deploy features with Python made it sluggish. Python lacks in dealing well with multi-threading which resulted in the wrapper doing it more which ultimately impacted the performance.
Principal Architect Guillaume Le Stum said-
In Python, you could write super-elegant list comprehensions and beautiful code that’s almost mathematical. But if you didn’t write the code, then that elegance can come at the expense of readability
Apart from the advantages of Python two of the downsides of Python are:
- Python uses loose typing
- Vast dependency nightmare on the horizon
Golang at Salesforce
Golang is created for huge applications and suitable for the production systems of Google. And so Salesforce took the decision to migrate Einstein Analytics from C-Python application to Golang. And almost the entire backend was rebuilt in the Golang
The strength of Golang was one of the reasons that made the Salesforce team adapt Golang.
Some of the major features of Golang are as followed:-
- Scalability
- Concurrency
- Fast Compilation & Fast Execution
- Multithreading
- High Performance
- Static typing
- Simplicity and Consistency
- Easy To Learn
- Powerful standard library
One of the big advantages is that Go’s cross-platform features make porting code easy.
Principal Architect Guillaume Le Stum said about the Code wrote in Golang:
If we ever need any of this code in a mobile app, we can cross-compile it to iOS or Android and it will just work,” Le Stum notes.
The Golang version of Einstein Analytics was made public in 2018.
Salesforce recently spent $15.7bn on analytics company Tableau to beef up its own Einstein Analytics platform. read more about the article from the original source here
You can also read more articles about Golang here-
- Golang at PayPal For Modernizing And Scaling
- Why American Express Uses Golang?
- Stream Switched From Python To Golang
- Uber Engineered Highest Query Per Second Using Golang
- How a Company Reduced its number of Server from 30 to 2 Using Golang
- Get to know How Golang is used at CockroachDB
- Get to Know How Golang is contributing to Bitly
- Things You Need to Know About Golang For Web Development
- Here Is Why Golang Is One Of The Preferred Technology For Your Project
- Some Interesting Facts and Takeaways from Golang Survey
Author Bio -
Reemi Shirsath, Chief Operating Officer @ Scalent.io — A Golang Specialized Development Company.