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:

  1. Python uses loose typing
  2. 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:-

  1. Scalability
  2. Concurrency
  3. Fast Compilation & Fast Execution
  4. Multithreading
  5. High Performance
  6. Static typing
  7. Simplicity and Consistency
  8. Easy To Learn
  9. 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-

Author Bio -
Reemi Shirsath, Chief Operating Officer @ Scalent.ioA Golang Specialized Development Company.




𝘾𝙊𝙊 @ 𝙂𝙤𝙡𝙖𝙣𝙜 𝙎𝙥𝙚𝙘𝙞𝙖𝙡𝙞𝙨𝙚𝙙 𝘿𝙚𝙫𝙚𝙡𝙤𝙥𝙢𝙚𝙣𝙩 𝘾𝙤𝙢𝙥𝙖𝙣𝙮-

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How We Ran a Hack Day in the Age of Social Distancing

Ops Scripting w. Bash: Frequency 2

Big O Notation and Time/Space Complexity

Top Websites And Blogs to Learn Python For Free

Electron Wheel Coupon


How Digitization Enables Safe, Connected Operations in Manufacturing

Creating a HUD (part 3)

Deploy ML models using Flask

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Reemi Shirsath

Reemi Shirsath

𝘾𝙊𝙊 @ 𝙂𝙤𝙡𝙖𝙣𝙜 𝙎𝙥𝙚𝙘𝙞𝙖𝙡𝙞𝙨𝙚𝙙 𝘿𝙚𝙫𝙚𝙡𝙤𝙥𝙢𝙚𝙣𝙩 𝘾𝙤𝙢𝙥𝙖𝙣𝙮-

More from Medium

Terraform CLI Cheat Sheet

Getting Json data from yaml file of Kubernetes

Dynamic libraries in C

Using Variables In File Paths With Puppet