Skip to content

Instantly share code, notes, and snippets.

@kigster
Created November 26, 2019 22:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kigster/ccc1ae59fbf4d05efb3b7e9f0415cd59 to your computer and use it in GitHub Desktop.
Save kigster/ccc1ae59fbf4d05efb3b7e9f0415cd59 to your computer and use it in GitHub Desktop.
RubyConf Australia Submission for 2020

Building Ruby Apps and Gems with Bazel and Monorepo

Elevator Pitch

You must have heard about mono-repos by now. It's all the rage. Google is doing it, AirBnB is doing it, — the list goes on. But: does it really make sense to put all of your Ruby Things in one basket? Even so, does Bazel build system deliver on its promises when applied to Ruby? Come and see!

Talk Format

30-45 minutes

Audience Level

Advanced

Description

This field supports Markdown. The description will be seen by reviewers during the CFP process and may eventually be seen by the attendees of the event.

You should make the description of your talk as compelling and exciting as possible. Remember, you're selling both the organizers of the events to select your talk, as well as trying to convince attendees your talk is the one they should see.

Over the last decade many successful engineering organizations adopted Ruby as the de-facto language for building enterprise components and services. Companies in this list include Github, AirBnB, Coinbase, SlideShare, Zendesk, SoundCloud, Groupon, Kickstarter, Scribd — the list goes on. As these companies became more and more successful, their technology stacks became more diversified, complex and distributed.

It was during this hyper growth phase that many of the brightest minds in the industry came to the same conclusion that "architectural decoupling of software components", while highly desired as a concept, is not at all synonymous with a concept of poly-repo — a practice of keeping small units of code, — think Ruby gems, — in separate repos. The way you manage your source control can either stand in a way of developer productivity, or serve as a tremendous accelerator.

It was then that Google had publicly pioneered the concept of a mono-repo, and slowly but surely it spread to some of the companies in our Ruby Giants list above. It turns out that keeping all source code together in what is now known as a mono-repo offers several unique benefits.

For one — with service meshes consisting of hundreds or even thousands of polyglot services it becomes increasingly difficult to release features that require modifications across the board of co-dependent poly-repos. To sign-off on a feature one must review a slew of pull requests across multiple repositories, understand their dependencies, and to carefully orchestrate the perfect deployment sequence as to not end up with new code in production that's relying on a yet-to-be deployed service dependency. Oops!

Enter mono-repo: all company software, backend, front-end, tooling, etc — all in one giant repository, governed by one exceedingly powerful build system — Bazel.

Bazel comes with native support for C++, Go and Python, but Ruby support has been notably lacking. The author of this talk is currently involved in co-authoring Ruby Rules for Bazel build system, to allow Ruby applications and Gems to be built, run, and tested as part of the mono-repo. This is a new development in the Ruby world, and may pave the way for source code organization for years to come.

Come to this talk to learn about mono-repos, Bazel Build System, and the corresponding adventures of rubyists like yourselves — determined not to leave Ruby behind in this mad "Bazelification" of our enterprise source code.

bazelruby

Notes

This field supports Markdown. Notes will only be seen by reviewers during the CFP process. This is where you should explain things such as technical requirements, why you're the best person to speak on this subject, etc...

If you take a look at https://github.com/bazelbuild — the Bazel github organization, you might notice that Ruby is barely mentioned, and the only link to Ruby Rules pointed to a personal hobby project by (hopefully If she is able to come) my co-author Yugui.

As we speak, the authors of this submission are working full-time on a production version of open source Ruby Rules that will most likely be in Beta by February 2020. With a bit of luck on timing, the release of production-ready Ruby Rules for Bazel will be announced at RubyConf Australia 2020!

We are also actively recruiting for the open source project: https://github.com/bazelruby/rules_ruby

Folks at the conference will be able to download bazel, and "bazelify" any ruby app in minutes. This will enable folks working on large codebases to consider whether or not mono-repo makes sense for them, and if the answer is "YES" they'll be able to see the benefits of Bazel tooling, by seeing the incredibly fast and heavily cached builds and tests, and if time permits — parallelization and remote execution. We will also talk about the challenges with building for different ruby platforms, such as gems with native c-extensions.

This is an audacious talk that will inform an advanced and intermediate Ruby programmers to new ways of thinking about their Ruby apps — as cogs in a bigger software system, all orchestrated by the world-class, incredibly fast and cacheable build system — Bazel.

Tags

Tag your talk to make it easier for event organizers to be able to find. Examples are "ruby, javascript, rails".

Ruby Build Systems Bazel Deploy CI/CD Testing 

Author's Bio

Konstantin is an avid ruby expert, and a four-times CTO who fell in love with Ruby in 2006. Since then he built two large e-commerce sites, and two socially connected e-commerce marketplaces, one of which (Wanelo.com) reached peak traffic of 1/3 millions RPMs with average latency of 80ms. Konstantin has a passion for building well-oiled engineering teams from diverse backgrounds that harness the incredible power of pair-programming, TDD, collaborative software designs, infrastructure automation, and continuous deployment. He authored over fourty open source ruby gems, and is fluent in Ruby, C/C++, Go, Java and BASH. His gems have been downloaded over 17M times and his Slideshare talks have been watched by over 250K people worldwide, and range on a variety of topics, from using object stores and lambda functions to do high scale event collection and analytics, to scaling web applications atop of PostgreSQL RDBMS, to building enterprise software using Ruby on Rails. He spoke at several Ruby conferences in the past, as well as conferences on PostgreSQL, DevOps, and leadership.

Speaking at RubyConf Australia (Melbourne) in particular is his absolute dream, because before coming to San Francisco in 1998, Konstantin studied at Monash University, Clayton campus in mathematics, and then worked for three years at a leading Australian open source firm https://www.cyberitsolutions.com.au/ where he met some of his early mentors. By speaking at RubyConf Konstantin hopes to give back to Melbourne some of that mentorship that he himself received while working in the CBD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment