• Home

  • Custom Ecommerce
  • Application Development
  • Database Consulting
  • Cloud Hosting
  • Systems Integration
  • Legacy Business Systems
  • Security & Compliance
  • GIS

  • Expertise

  • About Us
  • Our Team
  • Clients
  • Blog
  • Careers

  • CasePointer

  • VisionPort

  • Contact
  • Our Blog

    Ongoing observations by End Point Dev people

    Why upgrading software libraries is imperative

    Selvakumar Arumugam

    By Selvakumar Arumugam
    June 10, 2020

    Image by Tolu Olubode on Unsplash

    Applications primarily run on front- and back-end programming languages, including library dependencies. Operating systems and programming languages can be periodically updated to run on the latest version, but what about the many libraries being used in the app’s front and backend? As we all know, it can be quite a daunting task to maintain and individually update a long list of software dependencies like the examples later in this post. Still, it is important to keep them updated.

    This post dives into our experience upgrading a complex app with a full software stack and lots of dependencies. We’ll examine the benefits of upgrading, what you will need, and how to go about such an upgrade as simply as possible.

    The app in question contained decade-old software and included extensive libraries when we received it from our client. The app used languages including Java, Scala, Kotlin, and JavaScript along with many libraries. The initial plan was to upgrade the complete software stack and libraries all at once due to the gap between versions. This proved to be more difficult than expected due to a host of deprecated and removed functionality as well as interdependence of a few of the libraries.

    Conflict approach: “Don’t update unless you have to”

    While this can be sustainable in the short term, it quickly becomes less applicable in the long run. One important purpose of updates is to (hopefully) protect from new vulnerabilities and cyber attacks. Scenarios arise where particular library fixes are implemented on the latest version, yet require upgrading other libraries to the latest version in a chain. Because upgraded libraries need extensive testing and preparation for new issues, this directly impacts whether the app attempts to resolve an issue.

    Therefore, smaller and more frequent updates are more sustainable in the long run. Larger and less frequent upgrades will not only result in unexpected errors, but also require more complete regression testing to deliver a bug-free update. The following reasons justify the necessity of software and library upgrades:

    • They apply timely security patches to reduce vulnerabilities and defend from cyberattack
    • You can identify deprecated functionality earlier and use alternatives
    • They can apply fixes for known bugs in the library
    • They’re based on the latest versions of software or library, encouraging stability

    In addition, staying on the latest major version yields the benefit of applying minor and patch releases seamlessly without risk. Most software and libraries use semantic versioning, formatted as MAJOR.MINOR.PATCH:

    • MAJOR version - Incompatible API changes
    • MINOR version - Add functionality with backward compatiblity
    • PATCH version - Bug fixes with backward compatibility

    So being on the latest major versions of libraries allows applying minor and patch releases without breaking existing functionalities of the app.

    Benefits

    The benefits of keeping software and libraries updated include bug fixes, new features, boosted performance, as well as better stability, compatibility, and security measures. We can often ignore upgrades in projects because we don’t perceive significant effects in appearance or usage. But on closer inspection, frequent updates deliver important advantages.

    Real-time difficulties

    In real-life scenarios, bug fixes and performance optimization of an app often take a higher priority than upgrading libraries. In many cases, this results in a discrepancy between the app’s version and the current version. This discrepancy can lead to the following issues when upgrading libraries:

    • Unexpected error handling in new releases
    • Unexpected unsupported library dependencies
    • Need for complete end-to-end testing due to major version of library upgrade
    • Lack of work being visibly completed can lead to a lack of confidence from client
    • Difficulty in estimating workload due to major unexpected errors

    The following passages offer guidance in how to adequately prepare for these issues.

    Get prepared

    Much can be learned from preparing for a major upgrade on both a business and technical level. First, a complete list of libraries from the entire app should be compiled. This list should include the latest and current version of the library in the app. Reviewing the changelog of both versions will help identify potential incompatibilities or problems. Visiting the “issue report page” of the library to monitor any version-specific issues is also recommended.

    Once you’ve adequately prepared the libraries for upgrading, you can use any method of your choosing to upgrade and maintain the list. Once the roadmap is established, upgrading can commence and compatibility issues that arise can be dealt with as they arise. Finally, thorough end-to-end testing is necessary once the upgrade process is complete.

    Below are some examples of software lists you might have for a project (we left out the latest versions for brevity in this post, but it’s helpful to have a column for those too!).

    Programming software & servers
    SoftwareRunningRelease date
    Ubuntu Linux12.04.52017-04-28
    nginx web server1.12.22017-10-17
    Jetty Java Servlet container9.2.32014-09-05
    JVM/Java1.7u792015-04-14
    Scala2.112014-04-21
    Kotlin0.9.2232014-10-23
    Lucene4.10.02014-09-03
    PostgreSQL database9.3.102015-10-08
    Java libraries
    SoftwareRunningRelease date
    joda-convert1.3.12013-03-01
    joda-time2.22013-03-01
    play-json2.7.02019-01
    httpclient4.1.22011-07-10
    httpcore4.1.22011-07-22
    httpmime4.1.22011-07-29
    commons-codec1.32005-10-01
    jooq3.1.02013-06-30
    jooq-codegen3.1.02013-06-30
    jooq-meta3.1.02013-06-30
    jtds1.3.02012-10-27
    servlet-api3.12013-04-25
    play-json-joda2.11-2.6.92018-03-01
    lucene-core4.10.02014-09-02
    lucene-memory4.10.02014-09-02
    lucene-queries4.10.02014-09-02
    lucene-queryparser4.10.02014-09-02
    lucene-highilghter4.10.02014-09-02
    lucene-analyzers-common4.10.02014-09-02
    postgresql9.2-1003-jdbc42013-05-27
    jsoup1.7.32013-11-11
    jetty-util9.2.5.v201411122014-11-12
    tika-core1.162017-07-07
    commons-fileupload1.32013-03-24
    commons-beanutils1.62005-11-08
    commons-collections2.12005-11-08
    commons-digester2.12010-09-24
    commons-io1.12005-11-24
    commons-lang1.0.12005-11-24
    commons-logging1.0.32005-11-17
    commons-validator1.0.22005-11-24
    slf4j-api1.6.42011-10-31
    slf4j-nop1.6.42011-10-31
    JavaScript libraries
    SoftwareRunningRelease date
    angular1.2.112014-02-03
    jQuery1.10.22013-07-03
    calendar1.512005-03-07
    calendar-setup1.252005-03-07
    fckeditor2.6.112014-06-02
    dom-drag2001-10-28
    jt_DialogBox292012-08
    jt_AppDialogs92005-05
    ng-grid2.0.72013-06-07
    ng-grid-flexible-height2.0.72013-06-07
    ng-grid.css2.0.72013-06-07

    Recommendations

    Once the app’s software stack and libraries are up to date it’s important to regularly update. The complete upgrade experience can be a rigorous and involved process that includes juggling numerous issues and intensive testing.

    From a client’s perspective, a major upgrade project often doesn’t obviously demonstrate improvement to appearance or function. Because it is not recommended to keep outdated software and major upgrades (such as the one described above) are tedious, the following update options are preferable in order to keep software libraries as up-to-date as possible:

    • Interval Based: Particular interval periods are implemented to check versions of software. This minimizes frequency of problems while ensuring a manageable gap between the current and latest software version.
    • Module Based: Whenever work is performed on any module for new features or bug fixes, software and library versions are reviewed. This allows for relevant libraries to be updated, tested, and deployed along with development changes within the module.

    Conclusion

    Even if new features and improvements are not pertinent to the new release, frequent upgrades to software and libraries are crucial in order to ensure the most secure and debugged versions. Please feel free to share your methods of managing software updates in a comment!

    software update


    Comments