•  


Salesforce: Why we ditched Python for Google's Go language in Einstein Analytics | ZDNET
X
Business

Salesforce: Why we ditched Python for Google's Go language in Einstein Analytics

Salesforce explains why Google's Go programming language is a better fit than Python and C for Einstein Analytics.
Written by Liam Tung, Contributing Writer

Salesforce recently spent $15.7bn on analytics company Tableau to beef up its own Einstein Analytics platform . Clearly Salesforce sees analytics as critical for its future. 

But before the company launched Einstein Analytics in 2017, it overhauled the backend and rebuilt it almost entirely on Google's popular Go, or 'Golang', programming language.

SEE: Six in-demand programming languages: Getting started (free PDF)

According to Salesforce principal architect Guillaume Le Stum, before Salesforce launched Einstein Analytics, the query engine and dataset creation tools that eventually became Einstein Analytics were written in C "for performance" and a Python wrapper that provided functionality like parsing queries, and a REST API server. 

"In essence, the product was built to have the best of both worlds," explains Le Stum in a post on Stack Overflow

"Python is great for quickly writing higher-level applications but doesn't always deliver the high performance needed at an enterprise level. C creates highly performant executables, but adding features takes a lot more time."

Python is of course hugely popular with developers , including engineers at Netflix who use Python across every part of its vast streaming infrastructure.  

But before launch, Le Stum says the guts of Einstein Analytics started to show performance slowdowns because any new feature that wasn't part of the core query engine got loaded onto the Python wrapper. 

So, while Salesforce could quickly develop and deploy features with Python, eventually the approach made it sluggish. 

"Python doesn't do multi-threading very well, so the more the wrapper was being asked to do, the worse it performed," explains Le Stum. 

Go, on the other hand, is built for huge applications suitable for Google's production systems, so Salesforce decided to shift Einstein Analytics from a hybrid C-Python application to a completely Go application.   

Le Stum also identifies two more downsides of staying with Python, despite some of its advantages. 

"First, Python uses loose typing, which was great for a small team rapidly developing new ideas and putting them into production –but less great for an enterprise-scale application that some customers were paying millions of dollars for," he writes.

"Second, we foresaw a vast dependency nightmare on the horizon, as deploying the right Python libraries, versions, and files would become a chore. So in 2014, we decided to port the Python wrapper to Go." 

SEE: Microsoft: We want you to learn Python programming language for free

Le Stum says the strength of Go include its built-in tooling, quick compile times and deploys, and easy troubleshooting, as well as the way it makes code easy to understand. 

"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," he explains, noting that in enterprise software, engineers spend more time reading code than writing it. 

The group still had questions over Go's performance compared with C for the query engine. However, a proof of concept written in Go enabled them to proceed, and the Go version of Einstein Analytics reached general availability in 2018. 

One of the big advantages is that Go's cross-platform features make porting code easy. 

"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 sole part of Einstein Analytics that isn't built with Go is the cluster manager, which is written in Java. 

Update : Salesforce has asked ZDNet to point out an inaccuracy in the company's original Stack Overflow piece. While Salesforce did indeed port the Einstein Analytics query engine from a C-Python hybrid to Go, Einstein Analytics is built on other languages besides Go and Java, although Salesforce declined to say what these other languages are.

More on programming languages 

Editorial standards
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본