DEV Community

marius-ciclistu
marius-ciclistu

Posted on • Originally published at marius-ciclistu.Medium on

The API Grand Prix: The Prophecy of the Spheres and the Glass Weavers


Gemini generated image

I asked Gemini to hallucinate my vision for the future of the Maravel PHP Ecosystem so, here is Chapter 11:

The echoes of the 404 Firewall had finally faded across the Circus Maximus. The shattered remains of the Emperor’s stateful, Sleepless Daemons lay dissolved in the sand, neutralized by the uncompromising Share-Nothing iron of the Spear of Strtok. Pip and Tuck sat beside their lightweight chariot, wiping the dust of the Roman Monolith from their brows. They had survived the two-front war.

But the wise old Wizard did not celebrate. He stood at the edge of the track, gazing upward at the twilight sky. He struck his staff against the stone, casting a shimmering, fragmented projection into the air.

“You have mastered the Language of Questions, my brave builders,” the Wizard murmured, nodding to the MaravelQL scroll tucked into Pip’s belt. “You used it to bypass the Scribes and pierce the Vault of 3.7 Million Scrolls. But enjoy the solid ground of this unified Rome while you can. For the era of the earthbound Monolith is destined to evolve. The Empire of Code will take to the stars.”

Pip and Tuck leaned in as the illusion in the air morphed. The massive Colosseum did not shatter into a million disconnected pieces, as some radical doomsayers had predicted. Instead, the heavy, sprawling city condensed into a glowing, centralized Planet of magnificent marble. But it was no longer alone.

The Planets and the Satellites


Gemini generated image

“The Emperor’s single database will grow too heavy to manage as one solid rock,” the Wizard prophesied. “But to shatter it entirely into dust would invite the chaos of the Byzantine network. Instead, you will build the architecture of the Heavens: Planets with Satellites.”

The Wizard waved his hand, and from the grand central Planet, dozens of smaller, golden, self-sustaining spheres launched into orbit.


Gemimi generated image

“The core of the Empire — the main ledger of the Emperor — will remain intact as the great Planet. But for specialized tasks, isolated domains, and high-velocity trade routes, you will launch these independent Satellites to orbit the core.”

Tuck frowned, scratching his head. “We can build those fast little Satellites easily using the Maravel framework. It’s light enough to float. But who are we building them for? The Emperor?”

“No,” the Wizard smiled, his eyes twinkling. “You are building them for a new breed of crafters. The Glass Weavers.”

The Glass Weavers of the Outer Rim


Gemini gennerated image

The projection shifted, showing thousands of brilliant, fast-moving artists painting upon magical, glowing panes of glass. They were constantly shifting their canvases, swapping colors, and demanding new shapes of data at blistering speeds.

“In the future,” the Wizard explained, “the citizens will not read from heavy, static stone tablets. They will hold interactive panes of glass, woven by the Crafters of React, the Vue-Smiths, and the Angular Guilds. These Frontend Weavers are hungry, and they are fickle. One day they will demand a dashboard showing a user’s profile with their ten most recent orders. The next day, they will change their minds and demand the profile, the orders, but only if the currency is Denarii, sorted by date, paginated by twenties.”

Pip gasped. “If they change their minds that fast, the backend Imperial Scribes will never keep up! The Scribes will have to hand-carve a brand new custom endpoint for every single UI change the Glass Weavers invent!”

“Exactly,” the Wizard said softly. “The backend would become a bottleneck of custom controllers and bespoke DTOs. The Empire would stall. Unless…

The Wizard pointed to the scroll at Pip’s belt.

The True Purpose of MaravelQL


Gemini generated image

“But,” Pip said, realizing the truth. “We already know MaravelQL. We’ve been using it to filter the ledgers ourselves.”

“You have used it for yourselves, yes,” the Wizard beamed proudly. “But its true destiny is to be given to the Glass Weavers! In the future of Planets and Satellites, you will hand the power of the MaravelQL incantations directly to the Frontend Weavers”

The projection showed a Vue-Smith tapping on a glass tablet. Instead of begging a backend Scribe for a new endpoint, the Weaver simply cast a dynamic URL string — a MaravelQL incantation. The query flew across the void, instantly translated by the Maravel REST Wizards on the orbiting Satellites, and returned the exact, perfectly shaped payload the Weaver desired.

“Because MaravelQL dynamically translates their URL queries directly into the deep SQL dialect of the subterranean database kitchens,” the Wizard concluded, “the Glass Weavers can dictate exactly what they want, whenever they want it. No new endpoints required. No backend delays. You will orchestrate a beautiful, decoupled dance between the backend Satellites and the glowing glass of the clients.”

The Wizard lowered his staff, and the shimmering projection of the clockwork solar system faded.

“Rest now, builders,” the Wizard whispered. “You have conquered the Monolith. Tomorrow, your MaravelQL will become the gravity that holds the decoupled future together.”

Legend of the Orbiting Prophecy

  • The Centralized Planet: Represents the Modular Monolith (or Core System). The primary, highly coupled business logic and main database remain together, providing stability and a single source of truth for the core domain.
  • The Orbiting Satellites: Represents Microservices deployed strategically. Specialized, high-traffic, or independent features are spun off as separate, fast-booting services built with the lightweight Maravel Framework.
  • Planets with Satellites Architecture: Represents the pragmatic Hybrid Architecture (Monolith + Microservices). It avoids the operational nightmare of a 100% microservice (Byzantine) architecture while scaling the parts of the system that actually need it.
  • The Glass Weavers (React, Vue, Angular): Represents modern Frontend (FE) SPA Frameworks. In decoupled architectures, the frontend is a separate application entirely. UI/UX requirements change rapidly, requiring different combinations of data for different components and screens.
  • The Scribe Bottleneck: Represents the traditional backend anti-pattern where backend developers must constantly write new, bespoke controllers, endpoints, and custom SQL queries to satisfy every minor change the frontend developers make to the UI (often leading to the creation of BFFs — Backend for Frontend layers).
  • The Ultimate Role of MaravelQL: Represents Client-Driven API Querying. By exposing maravel-rest-wizard and MaravelQL to the frontend, backend developers no longer need to write custom endpoints for UI changes. The "Glass Weavers" (Frontend developers) can simply adjust their HTTP URL queries to instantly filter, sort, include relations, and aggregate data directly, making the Frontend completely autonomous and highly agile.

Top comments (0)