Skip to content

2015 Ideas

Godfrey Chan edited this page Mar 22, 2015 · 39 revisions

Google Summer of Code 2015

This page hosts the ideas for Google Summer of Code 2015! Add your ideas here, improve others, and if you're a student, perhaps something on this list will interest you!

You can discuss the ideas posted here or new ideas with others in our mailing list

Please apply on Melange with our application template.

Here's some ideas to get you started:

Long Running Ruby and Rails Benchmarks

We would like to have a long running Ruby and Rails set of benchmarks. For a very long time Python has had the PyPy Speed Center and recently golang has added its own Go Performance Dashboard.

Writing fast software requires data. We need to know right away when our framework or platform is getting slower or faster. This information can be fed directly to the team informing them of big wins and losses. Often small changes can lead to unexpected gains or losses.

Finding out about regressions months in to the development cycle can often incur a massive cost, fixing bugs early on is cheap. Usually the longer we wait the more expensive it is to fix. We have already launched RubyBench.org but need more time to polish and refine it.

Read Sam Saffron's blog post and the RubyBench community site for more details.

Mentors: Sam Saffron, Richard Schneeman

Skills: Ruby, Docker, RoR, Linux

Evented File System Monitoring

Active Support has a file checker that monitors files and directories via tree walk and stat calls. That's used in particular per request to monitor autoload_paths when config.cache_classes is false.

That file checker was an improvement over the previous autoloading strategy, which was to remove all autoloaded constants in each request. But in a medium-sized application this still has a cost that can be removed by using an evented approach.

This project would abstract the file checker to be able to plug backends. It would provide support for Mac OS X and Linux via their respective 3rd party gems that interface to native libraries.

End-users could optionally configure these backends and probably AS would pick the right one automatically without configuration, to easily support teams with different operating systems.

Probably, these new backends would be gems in the Rails organization rather than live in core.

Mentors: Xavier Noria

Skills: Related internal workflows in Rails, native evented file system monitors (inotify, FSEvents) and their Ruby bindings.

Improve End-to-End System Testing

Currently, the default Rails stack does not provide much tools for end-to-end testing involving JavaScript. This is an important aspect of testing for almost all modern Rails applications, so we would like to ensure that we provide a good out-of-the-box experience for doing this.

There are plenty of existing projects in the Ruby/Rails ecosystem that provides this functionality, such as capybara-webkit and poltergist. Part of the project would involve improving the integration with these gems.

The other part of the project would involve finding solutions for some of the shortcomings in the default setup (for example, transactional fixtures does not work correctly in most of these test runners, various timing issues, etc).

Mentors: Carlos Antonio da Silva, Yves Senn

Skills: Experience building and testing Rails apps with JavaScript, network and multi-threaded programming.

Refactor Rails' Cookie Implementation and Improve Signing with Expiry and Purpose

Rails' Cookie System is due for a refresh. We'd like to be able to expire cookies and give them a purpose. This way cookies won't last forever and trying to use a cookie for something it wasn't meant for will fail. Here's an example of what we'd like to move towards: https://github.com/rails/globalid/blob/master/lib/global_id/signed_global_id.rb.

To better be able to make this integration we need to refactor the cookie internals. Currently it's tough to change the internal cookie format because it's homegrown. It would be great to delegate this problem to the security community by switching to JSON Web Tokens (JWTs) instead. See the Tokie lib for inspiration.

Additionally give a rough suggestion of how to make this integration by identifying the current approach's problems and suggestions of how to move forward. The chosen student should also consider upgrade paths. We don't want users to upgrade their applications and find their cookies are unreadable - this is another area where JWTs shine. There's already an example of a legacy cookie format integration in the code.

If there's leftover time we can pick up other low hanging security concerns from this RailsConf talk.

Mentors: Kasper Timm Hansen

Skills: Ruby, HTTP protocols, basic cryptography and some experience with developing Rails applications.

Improve Rails Testing Ecosystem

Rails 5 cut down a big part of our test suite matrix by only supporting Ruby 2.2. That sped-up test runs, but we can still make the suite better and faster.

In your proposal give suggestions for how to improve the test suite speed. Areas you can look into include parallelizing the tests, running only tests related to changes as well as general speed improvements.

The goal of the project is to make open source contributions easier. We want Travis to shorten the time it takes to see if something broke in a new Pull Request.

Example of improvements:

Mentors: Arthur Neves, Josh Kalderimis

Skills: Ruby, Minitest, Travis-ci

Web Console Improvements

Web Console helps you debug Ruby on Rails applications. We can push the console abilities further by removing some of its current limitations.

Currently, you can spawn a console in a controller or a view. We can push that to be everywhere in an application. We can also improve the JRuby integration, which currently depends on Kernel#set_trace_func. This doesn't work so well, because there can be only one trace function running at a time and another plugin can replace it. For CRuby, we can use the newly introduced Tracepoint API to avoid monkey-patching Exception.

Mentors: Genadi Samokovarov, Guillermo Iguaran

Skills: Ruby, C and Java are a plus

Web Console Browser Extensions

One of the problems with injecting a console in an arbitrary view is that its hard to not break developers view layouts. We can help developers by introducing browser extensions that can render the console aside from the main application view.

This can also serve as an always turned on console idea. That is, you can execute code in every control frame of your application, right from your browser development tools. It can be pushed even further with providing statistics information about a request. Think ember-inspector for Ruby on Rails.

Mentors: Genadi Samokovarov

Skills: Ruby, JavaScript, Chrome, Safari and Firefox extension skills are a plus

Improve Performance of the Rails Asset Pipeline

We would like to boost the speed of our asset compilation process. We want to specifically improve the compilation and minification of files:

  • Improving SASS compilation times: We'd like to explore options like libsass/ruby-libsass (and any others proposed by you!) to see how we can improve the asset generation.
  • Optimizing Uglifier: Benchmarks have shown that this can be up to 6x slower than directly calling UglifyJS. Even if we can't match UglifyJS speed, we'd like to be as close to it as possible.
  • The CoffeeScript compilation process can also use some profiling and optimization if we have the time.

Mentors: Rafael França, Josh Peek, Guillermo Iguaran
Skills: Ruby, Rails and the Asset Pipeline, familiarity with Javascript in Node.js.

Add Source Maps Support to the Rails Asset Pipeline

Source maps allow developers to read and debug their code after it's been through a compilation/minification process.

We want to see how meaningful the impact of having these maps really is. If you want to check a Rails site using this feature today please visit Discourse (the Discourse team has expressed the limited usefulness of this feature in practice, so before we begin this project we'd like to get a good picture of what we can/can't achieve during the summer).

If we find source maps to be useful for developers we'd like to integrate them into Rails.

Mentors: Rafael França, Josh Peek
Skills: Ruby, Rails and the Asset Pipeline, good understanding of Javascript.

Propose Your Own?

If nothing on this list interests you, you can always propose your own. Drop an email to mailing list with your idea and see if any mentors would be interested in sponsoring your project.

Keep in mind that a self-directed project like this has a pretty high bar to clear – you would need to be knowledgeable/experienced enough to find the right project to work on, plus you need to be quite motivated/passionate about your project and take the lead. But if that sounds like you, we would love to have you onboard!