Bestand wählen

Exploring the History of a 12-year-old Rails Application

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Erkannte Entitäten
ver and here and I am Nathan walls and I and a suffered over at both source technologies a word of praise the primary also work out of the is in relative Carolina that we've got answers here and there are no were owned by the contact group and the headquarters of a and C today want to be doing is talking about the history of the speed of our applications organized around a common core and the score dates back to the very early days of every and rights so Mr. out by doing a little stage
this year on this chart is of a role of aggregation of 7 different repositories that we have and dating from August to end of 2005 all the way to this past week I'm showing the number of commits per week fabric by repository this is just like the in aggregate number of comments on it represents a substantial bit you to fundamentally incomplete view of what 1 segment of where a company that so how overall is you look from the left side to right and you can see that there's a general trend line that goes to the very slightly up into the right and and then you would just passed um this area around the 2015 in the 2016 in see spike there on on the right side of the graph words had oriented to get deeper look at that a little bit later the time on the nice thing is that with the summer parse trees we have a lot of history starting from 2 version of going all the way through a transition again so I'm going to start with that of a little prolog here but better source does a number of things around in culture that we allow publishers to send us of books to build an exact prices determine availability uh different different things along the nature and then we will solemnly onto our induces optically students in learning applications my start
this again in action run this should be October 20 15 and were in the middle of an upgrade from rails to the 3 and really 1 8 7 and I was getting experience cross the apps we by working on this project in 1 of the pieces that we need to do was upgrade all lot of jobs the reason being is that
of the AFP uses a lot of appetite and which was going leverage a query we have a lot of the wall largesse style of linked to remote handling to remote gas calls and and a few other underscore remote methods that we're using and the you you have these magical pieces that words Our really JavaScript and it was the medical ruby conditions that became don't script on in the browser so this led
to a subgradient at 9 2 9 Really flavor got script basically consolidating on 1 J. query and so on and so and as part of this process call across very early and I run get claimed and that leads to
In part ways is some code from the original maintainer of or the result of on the product that I'm working on and so that leads me to good water and say hey evidence in very old could
and this was originally started by the and Benjamin and meaning of from podcasting things in get-together natural back and was a bit astonished that discovered he had written back in 2005 and work on for a little while I was still in use in substantially the same as when he had written so I got a curious about the
history of this I would give could across us over does it connects bases and I am preparing for this talk in an earlier year types members of the development team of past and present and talk to me this is seen as were basically present for the inception and the continuing became here or that the growth of these applications as we're going talk about that were and
talk about a team growth and changes at a high level of in practices between year interactions between the business in between with developers and code growth a little that and then how we it how that could have changed and were it really going to some good examples not many but would it too well but we will see how how developers and those interact and then I will spend some time looking at and reflections and available lessons and then I will also talk about some tools that uh folks can you to actually come out some of the use of understandings and wasn't so they can drive around bases thus putting this
together there were 2 quotes that came up 1 of the 1 of which was kind of an offhanded comment that was in the absence of logic there's history and then a couple the came the 2nd 1 came up a couple times of from 2 different people and that was is it like a good idea at the time so In a 12 year old base there there's going be a lot of lessons learned there's going to be a lot of changes to best practices best right with the best practices are going to evolve and you're not gonna start out having all these in hand to start but the nice thing is is that this code has been around for 12 years because it actually been successful for the business and the business has been successful so that's why we still have to work with so I unmitigated history
in in 4 acce and the first one is with the appearance of rails and I David touch on some of this this morning in in his opening keynote but that this was the original announcements to the ruby weighing mailing list about a rails 0 . 5 . 0 0 and that the thing given talking about had it with actually out there and people could look at never remember this is before domains with things before get home was the thing this was you just throwing a library out there and seeing you who can grab onto it and go so this is July of 2004 or bottle search
technologies and there's then you do a series of comic cobbled together automation stats around the building and assembling e-books and others like it was basically what job in place but there was a sense that it was very limited process and the folks who were working on that were kind of base with overwhelmed with its limitations and there is also a desire to have 3 visual process and so something like Rails coming along actually made it feasible to build 80 robust web applications so rails comes in
and Don had actually been experimenting with rails and he found that he liked working with that more than of working with a combination of PET front end job back and so he had no developer Adamic like sales of basically started building we started building this
and so the apple world devolver competent readers would 2005 and they skip most the sessions to actually start writing this new rules application I would then focused on the writing of front and he's focused on writing uh back in it no looking back at us
there is a lot that we count on rails today that was not their Ajax was new protect J. query did not exist and the rest conventions that were so familiar with were not actually part of rails at and what people were used to with ATIS were very much around having XML RPC style or so cial or you know if you did you can't combine flavors and and and if you look at the ritual rails could be set spun up with this we actually get a whistle while the kinds of in your out which I found really interesting yeah the other thing is that we didn't
have at that time it is Capistrano wasn't around so there was no you deployments did not have built both on half and so there's a lot of these things that we think of as it is fully baked in rails or how reals applications did get shipped now that you had it figured out but they but they got it figured
out and so the this is and the 1st thing that message and I apologize for the readability this and this and a bit smaller than I but that this is about 400 files from the 1st pass at the AP that got committed and back in August of 2005 and With the changelog has is that this was using rail 0 . 11 . 1 from March 27th of 2005 the
was the controllers I got committed here was a libraries controller we still have 1 of these in our ap today but it is is you can see here that still somewhat recognizable as Ruby code and somewhat recognizable as rails code but it looks very different than how we might were nearly brighter rails controller debt the so that's the start of the
next which became which kind of renamed and they're connected in time in which has more recently become an application called marriage but there's another application that's that that's of key services which is a essentially a services where and that was came along in 2006 January 2006 a look around this time frame rails it's
1 . 0 in December 2005 the rails of 1 . 1 which are brought in RGS and the alright the magic the magic Ruby incantations that would give you JavaScript Ferrer for Ajax and promotes I came around in 2006 and 1 that you brought in rest and Russ conventions that were more familiar with that at the start of their attitude I don't 2007 and 2 . 3 in 2009 and skipping over few releases here back to
growing the business the code and frustrations that come along with rails marches forward the
broker gets founded I get have gets founded the passenger comes out which which helps out of 1 story verses I so if I remember the time there is a lot of mongrel in use at the time and in the rails it is kind of riding high it's like 0 hey you know if you're building up building around of that was the the default back or about
source you the growth of these applications was actually starting to outgrow how the developed organization work and so there is a tension and between billing of features versus society taken that like a research this is problematic us for questions and that sort of thing in all this and that being driven being very this is driven and very interrupt-driven and so you use of the developers who were present at the time that you kind of frustrating to actually get worked done and developers and manages the time but their direct direct interaction that met with their managers was of fairly minimal the applications group and developers
have the in here is typically had areas and tasks on of specialization so I mean if you have a nicer way of saying that both that style of the folks that kind of you adult here is the cut they're couple with and areas of concern in developing their style so you can you look through the reverse the application and hell you this developer who was involved in writing this substantially war wrote the whole thing the number of applications
as set that original kind of of front-end application and database layer started thousand 5 and there were no the see models and services which was the way the sea miles of the way of saying heretic our models are going to share them between this code base and services where in a 3rd repository in time the migrations without into their own applications called use and then we have a couple of reporting applications for this group providing business it back and that that was a reporter and the reporter and then 83rd 3rd version of R API layer because P 2 services involved too different versions of came out in 2010 there's a limitation along
the way and that is that the this suite applications along with others that were that were running males were all appointed this b a lot together in terms of 1st so everything was going running really 1 8 7 and rails 2 . 3 and there was really what I have of machines that look 1 line and so if we need repurposed machines we can ship them to any other application and there's no there's nothing to shift about them that any any application can run on machine the the started
to become a limiting factor because rails at 3 . 0 I In 2010 this unsure folks who were in doing real solid back and remember this was the big AI community merge with verb and there were also a lot of like Active Record changes from that time a Ruby itself hits 1 . 9 . 3 In were stranger trying it out of and the perceived performance detriment performative of Ruby 1 8 7 every Enterprise editions of around this time Q which is kind of performance optimized version of 1 in 7 other books behind fusion passenger sold repeated uh real 3 . 2 release you got to You're it's you owe a real squirrels were up to i all followers yeah at company
and sell 2013 In a nuisance years arrived and I not long after there's a new development record as well here restricting some process organizational changes
ended the team is trying to get out of the mind set of shipping everything as soon as possible and more thinking about having very like batch work on building things to be what has told you know we have this much further to go with us and really tried that you have the technical manager provide kind of an umbrella for development to basically shield them from you incoming requests that our you important questions to answer but maybe like you are you happier having focused questions or do you need feature ships and trying to figure out a good balance of that and then we had our product managers come in as well so to basically you take input from the business about how the shape feature work and that sort of thing but it needed to address questions that need answering on rather than taking that input directly from the business itself so were continued but the upgrades did
not so in time the the the requirement have kind that what step that I talk about where it remains and review 7 and rules 2 3 but catalyst but as consensus was building to I for upgrade say hey you know we we really needed to catch up with with with the communities that are vital source by its primary competitor in 2014 but there was a
cost model and they were they had roughly you could people size business as glottal source that and by sources that had engaged in the work of sea of soaring and digesting and changing so all the applications too you take on this new business at about 18 months from now 2014 to written in 2050 network is everything from migrating hazardous year picking up a URI new publishing agreements on identifying functionality that exist in 1 place but not the other and making sure that present for what was going to be what can exist going forward and then beginning work on a new combined storefront with features that cost more had was not and of course rails
really kept moving and so now these 7 5 to 10 year old applications you were still stuck at review 1 8 7 2 . 3 and now have an 18 month head on them being able to to point we can add 3 where we actually get
to the big upgrade this fall
2005 and most the work of integrating course what has been completed and a plan was made to get the applications upgraded and for that was our CTO OWL basically you he's really and operations fellow apart once as year to focus on minimal downtime you were no downtime deployments that sort of thing uh really avoiding operational impact on the business where we can and at that time it was getting very hard to get continued support for Ruby 1 8 7 and real student 3 and you hit there were some watery could still get security support for them but by a large that and so
the upgrade process that start and it was mostly a parallel effort across on each the applications in it was basically which as a step-wise progression from real 3 . 0 from 2 . 3 when that was done we want a 3 . 1 when that was done and so we want a 3 . 2 and word order in the 4 . 1 2 4 . 2 and we did a similar stepwise process through the largely interspersed with the versions of Ruby that would correspond with the version of rails at the time ended the that took I think a bit about 7 months to get through everything and get it shipped tested I'm in and out and stable
the yeah so chalice the came along with that were and mixing urgent work and upgrade work we had a problem keeping a diversion coded pro-bases shippable where we have a the both the work on these upgrades happening but there's further back changes that would have but is applied and then we have this we bring about success forward or we will fix bugs in the upgrade version and might have backwards industry people that bounced out was really challenge add further to the fact that the some applications all shared a database and so we have this this we coordinate all the cross application dependencies such that the applications can go out in the right order such that they were all continue to function when they shipped on the new code bases or on the upgrade cases so some notable challenges
with that and there were a lot of things about upgrading the rails that kind of like force the force their hand add 3 . 0 where there functionality that came and in a before once again dedicated to you and finally removed in 3 rid of of art wants to add to native JavaScript diarrhea transition fully to TRUE we converted the acid pipelines at at long last and then there's a lot of restructuring of Active Record queries because the but a lot of work that's gone in in the back of record in that time and we get the final against take advantage of that the teams also should so what it basically then you a kind of a few Silas here and there and there's an API and platform team that focus on back and stuff and they have a change personal and then I that's even and then grew with some additional higher and then for the foreign applications like Mac the additional hires brought in and then there's additional subtle management park managers brought in to help those applications as well this and then using
lessons learned will talk about a world that a new application was started and it basically took and the hard lessons of database coupling of verses API layers and you we actually were able to to say OK we're gonna and not go down the same path and so when a new product started in early 2016 it basically instead of looking into the same database it's had higher requirement of we're going to use an API layer instead and whatever they new vocally would save locally but anything that was in the core database over in Phoenix had to go over an API and would not actually directly touch the and because how rails is the user has also long enough time i it's rails on the server side but it's delivered as a single page up using react on the client side and that's the model for more rats that were there using going forward and see you working really well for well targeting syntactical culture ships
here and the beginnings of some increase could review culture of more collaborative work which is which is really so we can
act for and that is growing code with a with a guided subtle approach we review culture gets
stronger earlier and here we get we come out of that we we shudder code reviews earlier we don't have a single person able to review ordered like responsible for the for the final sign off and so were not waiting for that son of happen and potentially potentially throwing more back we started a version for API
layer and here were taking g sine as the 1st preference with axonal supported fractal virtually the eyes but as the 2nd choice and days on you in recent in our opinion is spot for more pleasant to work with them them the large Kouchner at the large axonal pieces that we've been working with research earning meaningful error messages with the ideas and were basically able to take the experience of of the earlier versions in integrations incorporate that and that line were doing more opted to opportunistic
refactoring now so you lots of logic extraction the classes lot as you like 0 hey what's controllers this different way on we we might very controller heavy with our code of early on and so now it's probably it's probably closer what folks would expect more of now and that's the word used service objects use cases of some new applications in and really trying to you only have to controllers handle you interaction with the business object instead of directly you trying to do everything has it been doing before as part of that Ross having words the basically treating the API as how you're going to interact with corrugated in the simple database and so you know I think in time we're looking to do is kind of get away from having shared models between codebases we're going you get away from having shared migrations that have to run in 1 repository many have taken a patent database schema over to the other repositories to get that same and then basically any did interaction takes place over an EDI transactions and then we then you know as
those have been using you pieces more were also increasing you mean of work that we do for API and integration work on both internally natural yeah this same about getting
to getting to this point is that each team has the the ownership of when they upgrade to new versions of relativity and so it's possible for them to you updated 2 . 1 5 . 0 basically when they feel that they're ready to and and want take that work of the team that I'm working on currently were problematic work on next month and finally we're going to take on a US refresh of propagation because it hasn't changed a whole lot since 2005 when it was initially written really increasing on a test
coverage on basically filling pieces in the development of culture is shifting towards keep the bill during her and make sure there's tests break code that is easier to test and you will writing new features what's actually read with having the automated testing done when that shirts and set trying to fill in a weight the and process waiver
refining we've gone from the most gone from from on to con bond in each gene kindest iterate onto practices and how they how they handle their business from the new taking you work in business where they retrospect of putting new processes the taking process the way that sort of thing in
in time we're moving so these apps Towards a well-earned retirement our early service layer is is due to be replaced with a for layer i with more up-to-date and authentication mechanisms and and more rustly guys are reporting applications that were written against this could this are being replaced with a more capable of ETL based on reporting obligations being written by another development and you essentially were were taking option is a you know it's OK to let these go we don't have to keep that we don't have to keep these applications going on in order to have a life for the other things that are that were still working on
so as some tools and methods that Adiga are generally applicable that 2 teams they're they're working with you could bases that are older than upon certain years a word or what have you I could find if you use it
has a charming complexity graph and so what can you really need to look at what this is basically find out I We have kind in the upper right hand corner finally yeah and then figure out how you want the into OK why are we changing this a lot and why is the code quality suspect were the change that we make and you accordingly accordingly what kind of changes can we make to of polar complexity and transport it down you can we can we extract logic can you break apart and complexity in a more easily possible things things that don't change much get up on
has co-frequency graphs and this is for the obvious application and if you look at a cut on the far right around 2015 and on the right hand side you'll see constant spikes there that was where we're doing great work and you'll remember if you go back a home of the screen again and the threats currently we have a big spiking commits the overall decoding out instructed to change a whole lot of it were released nearly as much as what we had back in you look 2009 so if you're looking back through codebase you can look at 0 what happened around this time frame that necessitated so many changes going on in the code base that's that's canon area begin to look at more thoroughly here's another 1 from P services where basically we see of that you have a bunch of spikes on at different points and so those are also things that we can into they have also can show you the the history for individual files so you go into a tree view free for any can cash and you pick out a file you will look at and then there's a nice history but it'll give you a nice graphical look at everything that has happened on that file in the repository and I can be that you'll see the MMSE but you can also died in the contacts with the other patches and see what's going on there as something is very helpful to to look
at project release history so were using rails we had we use a number of genomes on and we have our own product release history these are all things that we can draw from 2 basically kind of figure out what's happening in a product in figure out how those how those changes in our dependencies Influences direction of our product Wilson get
log and I use this search assemble the of the connector that I that put next but you this they have incredibly rich tool on to dispose public begins to you can it's like matter you can generate documents you after certain before a certain date from the last 100 comments show me you can it's that touch this file on the command line and all incredibly fast but this thing is that you
can also on use and the of us and so that's how I actually got to this here and that's on you can basically a format and export from get show you here where the best they define the
format that you wanna use and then and do of clean up after the fact and then i and up with I commit ones that look like this is quite limited file and then I wrote a small Rails application to this
week's Poll that in and then I can throw the 2 in a library culture Charcot but which will act which actually spits out this graphic right here we can actually see with units are but over time and you can also do you like grouping by week by months by thing and depending on how you import that you can do some other new knitting slicing and dicing with that as well well get
itself is a very wonderful tool and I want to get into this for the for this presentation that I couldn't quite get to it I get is a time machine so I could go back to any point in time in these projects and is we start over from how those projects look at a given point in time so if I wanna go back to that you can see with the particle by who is in theory stands up in my thought there is usually get a virtual machine using a version of Linux from back then were abducted containers with you forever you like you get the revolutionary installed right rails installed and intended effect based up as it would existed at that time and can be little look at things and say OK I can put myself back in context what happened on that could be valuable to you if you want like a where this happened why we do this well you can you can learn from and then can the bigger pieces and I should say as big a piece of this for me was talking with folks who have been involved in this for the from the very beginning world the life cycle of these applications both from a from a development standpoint and from a business standpoint and they're not I was going to evil that you may not have access to every person and I get the responses for most people I contacted them variable in the weekend talk of hosting a context for a why certain business is business decisions were made Weickert certain coder structure the way that it is but I'll be very helpful a defined very helpful to to kind of
process in a I'm I'm curious manner and not a known accused 1st fashion suit my questions were attract further questions and kindness playing you know like a you can tell me about what happened around this you tell me about what it what it was like working on this project but back when everything was brand new In some at the back of a government's I was pretty interesting and on 2 keys they got from 1 of our developers time systems that you we all learn as we go and get better with time and so don't look at code from 6 years ago as an evaluation of how a developer is now and then you can also look at the code and think that you know if this could have been implemented in a better fashion or contested better there's probably a really good reason why it wasn't the time and and I could be because of this is requirements and deadlines could be because of your experience and it could just be general technical limitations so
some lessons that are available with the I'm and and
to so the thing that wasn't available at oftentimes on we hear like lessons learned on but I I saw something recently where they said lessons available just because and you weren't necessarily guarantee the learned this that that Watson was available to
so here are getting the indeed he was critical of because there's work I am you there on sheet showing and shifting shifting gears so large relaxes the application is something that was kind of a big change for the team and 1 that is still kind of rippling out mean and then the upgrade itself took it took a long time and that's told innovations there's always
more that we can do in terms refactoring business logic and freely moving twisting responsibility principle shared shared migrations and models have not served as well as it's a headache for all of us trying to move things intelligently through the application because causes test break and you the answer of really coupled for having really could be but
there's a joy in writing rails verses others on the differed damage moments struck project was preferrable to writing a hybrid PHP and Java selection and for whatever other developers and stopped working with rails was the 1st moment she felt she enjoyed suffered all if we'd understood where we would be now we probably would terms allowing external access number of customers we would have on how much stuff would be coming in but we will look at get structuring your data in our applications that a at the end API layer and making as the years were clean clear descriptive having a documentation of not treating every response as the 200 OK because of what happened with that it is a big 1 for us and we have to keep and summaries because that's what the expectations but that's not what we want to and I think what it will most important things in love with the is expected of you my current my my present my prior colleagues did best work that they could have given the knowledge and understanding and circumstances of time and so I approach I purses would love and and kindness to try and really put myself in the shoes of they were in when when this happened trying understands contextual the an understanding that everybody learns as prodigal son best practices of all and new perspectives are gonna come in and distinctiveness is as people come and go on the but the real server does very well for the last 12 years will continue to do so for the for these applications and you it's been surprising that you did everything is then a stable that has the we are changing the you axis is
helpful of back when a started this project back in 2005 and we're recently kind of giving you space left and so soon it will look like this and that this caused audible gasps when this was a download last week people were astonished that it was all hours changing finally the and the other thing that was
interesting in and I'm I'm going to slow the time listening to wrap up but that this is took a big risk rails was not at 1 . 0 yeah win and so they have a business critical need and they they they took a leap of faith and going with rails when would very easy to say no so it's a kind of with the mix of astonishment and that's gone on so long and and it has more potential to the
so and I said that use trends really quick but I guess and I will research assistance with native use of suffer the
user builds on previous on rules 5 on and so on and so on my mind at this 10 of the size of the available at will score but you select presentations probably sometime next week or so on and you'll still see stuff of when the carbons of reasons slides as well the so much I
appreciate your being here and would love to talk fj that if my
report under
Spiegelung <Mathematik>
Schreiben <Datenverarbeitung>
Ungerichteter Graph
Reverse Engineering
Skript <Programm>
Analytische Fortsetzung
Ordnung <Mathematik>
Objekt <Kategorie>
Selbst organisierendes System
Mathematische Logik
Virtuelle Maschine
Reelle Zahl
Endogene Variable
Wort <Informatik>
Prozess <Physik>
Natürliche Zahl
Atomarität <Informatik>
Komplex <Algebra>
Schnitt <Graphentheorie>
Lineares Funktional
Physikalischer Effekt
Web Site
Konfiguration <Informatik>
Arithmetisches Mittel
Framework <Informatik>
Projektive Ebene
Physikalische Theorie
Stabilitätstheorie <Logik>
Elektronisches Buch
Front-End <Software>
Inverser Limes
Strom <Mathematik>
NP-hartes Problem
Physikalisches System
Objekt <Kategorie>
Dreiecksfreier Graph
Twitter <Softwareplattform>
Geometrische Frustration
Trennschärfe <Statistik>
Suite <Programmpaket>
App <Programm>
Business Object
Shape <Informatik>
Gebäude <Mathematik>
Güte der Anpassung
Kontextbezogenes System
Dienst <Informatik>
Suite <Programmpaket>
Rechter Winkel
Lesen <Datenverarbeitung>
Stabilitätstheorie <Logik>
Mathematische Logik
Klasse <Mathematik>
Automatische Handlungsplanung
Dienst <Informatik>
Open Source
Endlicher Graph
Migration <Informatik>
Skript <Programm>
Gerichtete Menge
Elektronische Publikation
Einfache Genauigkeit
Patch <Software>
Kartesische Koordinaten
Einheit <Mathematik>
Prozess <Informatik>
Mixed Reality
Stützpunkt <Mathematik>
Figurierte Zahl
Serviceorientierte Architektur
Prozess <Informatik>
Funktion <Mathematik>
Twitter <Softwareplattform>
Reelle Zahl
Gewicht <Mathematik>
Virtuelle Maschine
Interaktives Fernsehen
Gebäude <Mathematik>
Kombinatorische Gruppentheorie
Selbst organisierendes System
Elektronische Publikation
Migration <Informatik>
Endogene Variable
Shape <Informatik>


Formale Metadaten

Titel Exploring the History of a 12-year-old Rails Application
Serientitel RailsConf 2017
Teil 70
Anzahl der Teile 86
Autor Walls, Nathan
Lizenz CC-Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben.
DOI 10.5446/31480
Herausgeber Confreaks, LLC
Erscheinungsjahr 2017
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Come on a journey backward through time from the present all the way to August 2005 to see how a living and evolving Rails application started, changed, and continues. Find out some of the challenges and temptations in maintaining this application. See how different influences have coursed through the application as the team changed, the business grew and as Rails and Ruby evolved. We'll explore history through code and learn from some of the developers involved in the application over its lifecycle to build an understanding of where the application is now and how it became what it is.

Ähnliche Filme