Leanpub Header

Skip to main content

From Laravel PHP to Go and Rust

Practical Application Migration with AI Coding Agents

From Laravel PHP to Go and Rust

A song plays in both PHP and Rust. Then one request returns the whole file from PHP and an error from Rust. Would you switch traffic? Learn to answer that question before migrating a Laravel service.

Minimum price

$4.99

$9.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

A Koel listener skips to the end of a song. A BookStack editor loses access to a restricted document while still signed in. When you move part of a Laravel PHP application to Rust or Go, what should happen next? This book shows you how to answer that question by running the same request against both implementations and tracing the first place their behavior differs.

Start with a small order API, then follow two migrations in detail. In Koel, PHP authorizes playback and Rust serves the audio bytes. You’ll see why two nearly identical requests at the end of a file produce different responses. In BookStack, you’ll trace one restricted page from PHP’s permission checks to a Go reading service, then revoke access and see how long the copied permissions can be trusted.

Along the way, you’ll give a coding agent a reproducible failure, verify its change, interpret a benchmark, and rehearse a rollback after the new service has accepted a write. The labs run with Docker on Linux, macOS with Colima, or Windows with WSL2. If you maintain a Laravel application, you’ll finish with a plan for one migration of your own, including what to keep in PHP and what evidence would justify switching traffic.

Author

About the Author

Jungwook Song

Jungwook Song holds a PhD in computer engineering. He has helped companies including Hyundai Motor Company and KT adopt Kafka, build clusters, and troubleshoot deployments. He has spoken about Kafka operations at Kafka Summit London and Current and taught Kafka on Kubernetes at Fast Campus.

Contents

Table of Contents

  • Copyright and Trademarks
  • Preface
  • How to Read This Book and Run the Labs
  • Part I. Decide Whether to Migrate
    • Chapter 1. Where to Start with a Growing Laravel Service
    • Chapter 2. Decide What to Move and What to Keep
    • Chapter 3. Choose Between Laravel Go and Laravel Rust
  • Part II. Migrate and Verify with a Coding Agent
    • Chapter 4. Run the Source and Target in Docker
    • Chapter 5. Capture Existing Behavior in Tests
    • Chapter 6. Give a Coding Agent One Migration Task
    • Chapter 7. Plan the Migration Sequence and Define Completion
  • Part III. Move Koel Playback to Laravel Rust
    • Chapter 8. Trace Koel’s Data and Vue Frontend
    • Chapter 9. Preserve Koel’s Scan Results and Playlist Data
    • Chapter 10. Implement Audio Playback and Seeking
    • Chapter 11. Verify Koel with Its Existing Data and Frontend
  • Part IV. Move BookStack Reads to Laravel Go
    • Chapter 12. Read BookStack’s Document Structure and Server-Rendered Pages
    • Chapter 13. Preserve Login and Document Permissions
    • Chapter 14. Define Compatibility for BookStack Editing and Rendering
    • Chapter 15. Verify BookStack with Restored Documents and a Browser
  • Part V. Measure Performance and Switch Traffic
    • Chapter 16. Compare Performance and Cost Before and After Migration
    • Chapter 17. Rehearse Cutover and Rollback
    • Chapter 18. Plan a Migration for Your Laravel Service
  • Appendix A. Set Up and Check Your Lab Environment
  • Appendix B. Map Laravel PHP Features and Dependencies to Go and Rust
  • Appendix C. Coding Agent Tasks and a Migration Plan
  • Appendix D. Checklists for Compatibility, Performance and Cutover
  • Appendix E. Find the Examples and Their Licenses

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub