Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Go - A Key Language in Enterprise Application Development?

30 vues

Publié le

Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2COBbRN.

Aarti Parikh goes over the Go language design and talks about why Go matters in the age of multicores and cloud-native computing. Filmed at qconsf.com.

Aarti Parikh is a software engineering manager with a decade of experience building teams and products for the Internet, IoT and now Fintech. Currently, she works at PayPal.

Publié dans : Technologie
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Go - A Key Language in Enterprise Application Development?

  1. 1. @classyhacker Go - a key language in enterprise application development? Aarti Parikh, Engineering Manager@PayPal QCon SF 2018
  2. 2. InfoQ.com: News & Community Site • Over 1,000,000 software developers, architects and CTOs read the site world- wide every month • 250,000 senior developers subscribe to our weekly newsletter • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • 2 dedicated podcast channels: The InfoQ Podcast, with a focus on Architecture and The Engineering Culture Podcast, with a focus on building • 96 deep dives on innovative topics packed as downloadable emags and minibooks • Over 40 new content items per week Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ go-lang-design
  3. 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon San Francisco www.qconsf.com
  4. 4. @classyhacker Go’s popularity in the last few years is hard to miss. It has jumped up in the Tiobe index and is holding steady.  The language has had a significant impact on the startup scene due to its simplicity, speed and enabling productivity in engineering teams. Large companies are starting to take notice. We also see a huge amount of community involvement in Go. If you have lived through the growth of Java in the late 90’s, this feels a bit like déjà vu. In this talk, I will go over the Go language design and talk about why Go matters in the age of multicores and cloud-native computing.
  5. 5. @classyhacker Enterprise languages • Java is by far the most popular • C#/.Net • JavaScript for web development • Python, Ruby, NodeJS for Web, Scripting and Devops
  6. 6. @classyhacker An enterprise language should • Be easy to learn, • Be easy to read, debuggable • Be safe • Be stable • Scale on modern hardware with multi core processors • Have good tooling • Dependency management • Scale across teams with diverse skills • Be easy to deploy • Have a strong community • Have good libraries
  7. 7. @classyhacker Java • Was created to replace C++ • Write once run anywhere was ground breaking • Developer productivity • Static type checking • Steady growth - first release 1995 • Garbage collection, memory safety allowed focus on business logic • Stable JVM and continuously improving performance • Java 2 -> Java 5(Generics)-> Java 8(Lambda) • Has been backward compatible with every release • Libraries helped developers hit the ground running • Easy to learn • Cheaper development costs
  8. 8. @classyhacker Growth of Java • Browser applets to Server side • J2EE to SOA, Web Services, lots of XML • ORM’s, JBoss Marc Fleury • JUnit + Xtreme programming, Kent Beck • Design Patterns, Refactoring, Martin Fowler • IDE support, Eclipse eco-system, IntelliJ • Dependency Injection, Spring, AOP • Dependency management, Maven • JMS, Active MQ, Message Oriented Middleware
  9. 9. @classyhacker Java problems • Developer velocity plateaued • Verbose, Tedious, Repetitive • Epitome of OOP • Slow startups times with JBoss, Spring Boot to the rescue • Oracle taking over Java, license worries • JVM abstraction - Developers unaware of how their code is running • Concurrency (OS threads map to Java Threads)
  10. 10. @classyhacker Scripting languages for web dev • Javascript/NodeJS/Express • Ruby/Ruby on Rails • Python/Django • PHP/Laravel
  11. 11. @classyhacker Rise of Frameworks • Ruby on Rails, Sinatra, EventMachine • Express, Meteor, Hapi, Sails, Lodash… • Django, Twisted • Succeeding due to community work
  12. 12. @classyhacker Discontent • Framework fatigue • Dependency fatigue • Vulnerabilities • Single Threaded • Global interpretor lock • Callback hell • Build tools are slow • Need a book for the good parts
  13. 13. @classyhacker FP on the JVM • Clojure - 2007 • Scala - 2004 • Expensive development cost • Hard to learn • Better concurrency • Enterprise adoption is limited • FP purists • Community
  14. 14. @classyhacker Go
  15. 15. @classyhacker Creators Robert Griesemer (V8 engine, Java Hotspot VM, Chubby) Rob Pike (Unix Team & Plan9 & UTF-8) Ken Thompson (Unix)
  16. 16. @classyhacker Did the C++ committee really believe that what was wrong with C++ was that it didn't have enough features? - Rob Pike
  17. 17. @classyhacker Robert: Starting point: C, fix some obvious flaws, remove crud, add a few missing features. Rob: name: 'go'.  you can invent reasons for this name but it has nice properties. it's short, easy to type. tools: goc, gol, goa.  if there's an interactive debugger/interpreter it could just be called 'go'.  the suffix is .go. Robert Empty interfaces: interface {}. These are implemented by all interfaces, and thus this could take the place of void*. In the end of course it came out quite different from either C or C++
  18. 18. @classyhacker Simple • 25 keywords • Feel like Ruby, Runs like C • Readability is Paramount - Rob Pike • Simple code is debuggable • Simple can be expressive • Can scale on large codebases with developer churn
  19. 19. @classyhacker Stable Go 1.11 Release notes There are no changes to the language spec. Go 1.10 Release notes There are no significant changes to the language spec. Go 1.9 Release notes There are 2 changes the Language spec. Go 1.8 Release notes There is 1 change in the Language spec.
  20. 20. @classyhacker Design • Natively compiled • Statically typed • Open source • Garbage collected • CSP Concurrency • Fast compile times
  21. 21. @classyhacker Q. Why is my trivial program such a large binary? ➔ ls -l total 3144 -rwxr-xr-x 1 aarti staff 1603520 Feb 2 18:57 helloworld -rw-r--r--@ 1 aarti staff 72 Feb 2 18:57 helloworld.go
  22. 22. @classyhacker “The linker in the gc tool chain creates statically-linked binaries by default. All Go binaries therefore include the Go run-time, along with the run-time type information necessary to support dynamic type checks, reflection, and even panic- time stack traces.”
  23. 23. @classyhacker Compiler Before 1.5 faster, written in C With Go 1.5 compiler was rewritten from C to Go `go build -i` Dependency caching Support for Assembly, Math libraries are in assembly GOOS const goosList = "aix android darwin dragonfly freebsd hurd js linux nacl netbsd openbsd plan9 solaris windows zos “ GOARCH const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv riscv64 s390 s390x sparc sparc64 wasm "
  24. 24. @classyhacker Runtime • Runtime performance is foremost on the
  25. 25. @classyhacker Tooling
  26. 26. @classyhacker Testing
  27. 27. @classyhacker Goroutines • Goroutines - light weight threads •
  28. 28. @classyhacker Go 2 • Go 2 design proposals • Go 2 will most like be backward compatible •
  29. 29. @classyhacker Memory safety • Garbage collected • Go Run time •
  30. 30. @classyhacker JVM vs Go runtime
  31. 31. @classyhacker DevOps • Docket • Kubernetes • CI/CD • Tooling/CLI • Terraform, Hashicorp stuff etc in Go
  32. 32. @classyhacker Go vs C
  33. 33. @classyhacker Java vs Go
  34. 34. @classyhacker Node vs Go
  35. 35. @classyhacker Go hits the sweet spot
  36. 36. @classyhacker Scale • GOMAXPROCS - multiCore • GOOS - Multiplatformn • Single Binary • Static linking - add command for GC toolchain •
  37. 37. @classyhacker Standard Library
  38. 38. @classyhacker Design Philosophy • Simplicity is complicated
  39. 39. @classyhacker Companies using Go
  40. 40. @classyhacker Ruby/Ruby on rails • Did not stick • Could not scale • Patches - event machine etc etc • JRuby ( JVM again)
  41. 41. @classyhacker Scala • Hard • Twitter moved from rails to Scala • I hear they are building Go framework teams •
  42. 42. @classyhacker Microservices with Go • API deve • Tooling etc •
  43. 43. @classyhacker Clojure • Too hard •
  44. 44. @classyhacker Rust • Learning Curve • More suited for embedded, take the effort to learn • When needed •
  45. 45. @classyhacker Community
  46. 46. @classyhacker Scaling in enterprises • Frameworks in Go • Supporting Go in production •
  47. 47. @classyhacker High performance apps • CGO • Tweak memory if need be with unsafe • Use assembly • Usage of assembly in core libraries
  48. 48. @classyhacker Multi platform build GOOS=windows GOARCH=i386 go build Goreleaser
  49. 49. @classyhacker Decoupling • Interfaces • Composition over inheritance • Encapsulation ( package, Internal etc. ) •
  50. 50. @classyhacker API • Swagger support • GRPC/HTTP2 1st class support •
  51. 51. @classyhacker Networking
  52. 52. @classyhacker Dependency management • Vendor directory
  53. 53. @classyhacker Writing Go frameworks
  54. 54. @classyhacker From X ToGo • https://github.com/golang/go/wiki/FromXToGo
  55. 55. @classyhacker Server language
  56. 56. @classyhacker Serverless
  57. 57. @classyhacker Crypto/blockchain
  58. 58. @classyhacker IPFS
  59. 59. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ go-lang-design

×