<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Meghana on Medium]]></title>
        <description><![CDATA[Stories by Meghana on Medium]]></description>
        <link>https://medium.com/@meghana2561?source=rss-0c8f642902fd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Meghana on Medium</title>
            <link>https://medium.com/@meghana2561?source=rss-0c8f642902fd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 21:42:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@meghana2561/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Migrating Play Framework: From 2.9 to 3.0 — A Real‑World Journey ]]></title>
            <link>https://medium.com/@meghana2561/migrating-play-framework-from-2-9-to-3-0-a-real-world-journey-6bb63e128e69?source=rss-0c8f642902fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bb63e128e69</guid>
            <dc:creator><![CDATA[Meghana]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 16:46:02 GMT</pubDate>
            <atom:updated>2025-07-22T16:46:02.102Z</atom:updated>
            <content:encoded><![CDATA[<h3>Migrating Play Framework: From 2.9 to 3.0 — A Real‑World Journey 💻</h3><p>Migrating a large web application is always a bit nerve-racking. In this post, I’m walking you through my experience upgrading a Play Framework app from <strong>2.9</strong> to <strong>3.0</strong>, exploring the technical hurdles we faced and the lessons we learned along the way.</p><h3>Why move to Play 3.0?</h3><p>At first glance, Play 3.0 is strikingly similar to 2.9 — it ships the same features and bug‑fixes — but with two essential changes:</p><ol><li>It shifts from <strong>Akka</strong> to the community‑driven <strong>Apache Pekko</strong>, sidestepping Akka’s licensing changes (<a href="https://www.playframework.com/documentation/3.0.x/Highlights30">playframework.com</a>).</li><li>The Maven/SBT groupId changes from com.typesafe.play to org.playframework to reflect the new community stewardship (<a href="https://www.playframework.com/documentation/3.0.x/Migration30">playframework.com</a>).</li></ol><p>If you’re already on Play 2.9, you’re halfway there — Play 2.9 and 3.0 are maintained in parallel, and nearly identical in terms of API .</p><h3>Step 1: Prep by upgrading to Play 2.9</h3><p>We skipped this in earlier upgrades, but since Play 3.0 builds directly on 2.9, our path was:</p><ul><li>Bump Play version in build.sbt to 2.9.x</li><li>Upgrade SBT to at least 1.9.6 (project/build.properties) (<a href="https://www.playframework.com/documentation/3.0.x/Migration29">playframework.com</a>)</li><li>Drop deprecated APIs, migrate any removed types</li><li>Ensure Java 11+ (Java 17 or 21 preferred)</li><li>Remove the Jetty ALPN agent if previously used</li></ul><p>Once we were stable on 2.9, the groundwork was laid for the final leap to 3.0.</p><h3>Step 2: Switch dependencies and imports</h3><p>As part of the jump to Play 3.0, we updated:</p><ul><li><strong>Build files</strong>:</li></ul><pre>libraryDependencies += &quot;org.playframework&quot; %% &quot;play&quot; % &quot;3.0.x&quot; <br>addSbtPlugin(&quot;org.playframework&quot; % &quot;sbt-plugin&quot; % &quot;3.0.x&quot;</pre><p>(removing all com.typesafe.play references) (<a href="https://www.playframework.com/documentation/3.0.x/Migration30">playframework.com</a>)</p><ul><li><strong>Imports in code</strong>:<br> Replace com.typesafe.play.* with org.playframework.* across controllers, modules, and templates.</li></ul><p>This was straightforward — search-and-replace work that caught nearly everything.</p><h3>Step 3: Akka → Pekko migration</h3><p>The core challenge was replacing Akka with Pekko. We had:</p><ul><li><strong>Code imports</strong>:</li></ul><pre>import org.apache.pekko.actor.ActorSystem <br>import org.apache.pekko.pattern.after</pre><p>instead of akka.*.</p><ul><li><strong>Configuration keys</strong> in application.conf:</li></ul><pre>pekko { … } <br>play.pekko.dev-mode.pekko { … }</pre><p>replacing all akka { … } settings.</p><ul><li><strong>Server provider</strong> switch:</li></ul><pre>play.server.provider = &quot;play.core.server.PekkoHttpServerProvider&quot;</pre><ul><li><strong>Logback config</strong>:</li></ul><pre>&lt;logger name=&quot;org.apache.pekko&quot; level=&quot;WARN&quot;/&gt;</pre><p>Thanks to the community migration guide, nearly all changes were straightforward renames (<a href="https://github.com/orgs/playframework/discussions/12182">github.com</a>, <a href="https://www.playframework.com/documentation/3.0.x/Migration30">playframework.com</a>).</p><h3>Step 4: Update artifact names</h3><p>Dependencies like HTTP server and HTTP/2 support changed names:</p><pre>&quot;org.playframework&quot; %% &quot;play-pekko-http-server&quot; % &quot;3.0.0&quot;<br>&quot;org.playframework&quot; %% &quot;play-pekko-http2-support&quot; % &quot;3.0.0&quot;</pre><p>No more play-akka-http-server etc. (<a href="https://en.wikipedia.org/wiki/Play_Framework">en.wikipedia.org</a>).</p><h3>Step 5: Validate and test</h3><p>With the codebase updated, we:</p><ul><li>Ran all tests (both unit and integration)</li><li>Manually tested key features like WebSocket flows and scheduled tasks</li><li>Searched for stray &quot;akka&quot; strings in code, config, logs, and logs—none remaining</li></ul><h3>Real-world pain points</h3><h3>1. Package &amp; config completeness</h3><p>At first, a few tests failed because we missed odd bits of config, and imports in custom logging files. A full grep-based pass helped catch them.</p><h3>2. Third-party modules</h3><p>Our dependencies on Akka-based libraries (e.g., Akka Streams) had to be swapped out or updated to Pekko-compatible versions. Not all modules had Pekko bindings at release time.</p><h3>3. Rolling back if needed</h3><p>Thanks to Play 2.9’s parallel support, we maintained a working branch before committing fully to 3.0 — soft rollback was still possible while decommissioning the Akka branch.</p><h3>Bonus: Scala 3 support?</h3><p>If you’re eyeing Scala 3, Play 3.0 supports it — just stay on Scala 2.13 during the Play upgrade, then switch to Scala 3.3.x or newer after (<a href="https://www.playframework.com/documentation/2.9.x/Scala3Migration">playframework.com</a>).</p><p>Our recommendation:</p><ol><li>Upgrade to Play 2.9 (Scala 2.13)</li><li>Migrate Akka → Pekko and bump groupId</li><li>Deploy and ensure everything works</li><li>Then set scalaVersion := &quot;3.3.5&quot; and handle language migrations</li></ol><h3>Final thoughts</h3><p>Migrating from Play 2.9 to 3.0 isn’t scary — it’s more like renaming everything. The heavy lifting was done by the core team and the solid migration guide (<a href="https://www.playframework.com/documentation/3.0.x/Migration30">playframework.com</a>). With careful planning and a solid test suite, the downtime was minimal.</p><p>At the end, we gained licensing peace of mind, updated dependencies, and paved the path for Scala 3. 🚀</p><p><strong>Key takeaways:</strong></p><ul><li><strong>Upgrade to Play 2.9 first</strong> — ensures you’re on stable footing.</li><li><strong>Rename imports, configs, dependencies</strong> — everything changes from Akka/com.typesafe to Pekko/org.playframework.</li><li><strong>Test thoroughly</strong> — especially for custom modules or third-party integrations.</li><li><strong>Plan for Scala 3</strong> — Play 3.0 supports it, but take it in stages.</li></ul><p>Hope this helps anyone gearing up for the migration. If you hit snags, leave a note below — happy to help!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bb63e128e69" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>