danielhe4rt/scylloquent
Eloquent-style models and a fluent query builder for ScyllaDB, giving Laravel developers familiar syntax over wide-column NoSQL. Define models, run expressive queries, and work with Cassandra-compatible data and CQL without leaving your existing Laravel workflow.
Architecture fit
Scylloquent is an Eloquent driver that maps Laravel's Active Record layer onto Cassandra/ScyllaDB via CQL. The core tension is that Eloquent's contract is relational: joins, eager-loaded relationships, foreign keys, transactions/savepoints, auto-incrementing keys, offset pagination, and arbitrary WHERE/ORDER BY composition. Cassandra/ScyllaDB has none of these in the relational sense — it is a partitioned wide-column store where the query pattern dictates the schema, joins do not exist, ORDER BY is limited to clustering columns, and non-key filtering either fails or requires ALLOW FILTERING (a full-scan footgun at scale).
This means the package can plausibly give us Eloquent-flavored syntax over single-table, partition-key-addressable access paths — models, casts, accessors, events, basic CRUD — but it cannot give us Eloquent semantics. Any model that leans on relationships, ad-hoc filtering, or transactional integrity will either break or silently degrade into expensive cluster operations. The fit is therefore narrow: a secondary connection for a bounded set of high-write, query-first workloads, not a drop-in replacement for the primary RDBMS.
Integration feasibility
Feasible but with a non-trivial native dependency chain. CQL access from PHP typically requires the Cassandra native extension (or a pure-PHP CQL client), which in turn pulls in the DataStax/cpp-driver toolchain. That has to be compiled or installed consistently across developer machines, CI runners, and container images — a recurring source of "works locally, fails in the pipeline" friction.
Migrations are the second feasibility question. Cassandra DDL is CREATE TABLE ... PRIMARY KEY (...) with no Blueprint equivalent; schema portability across the two engines is not achievable, so we should expect to maintain CQL DDL by hand or accept partial migration support.
Third, connection semantics: consistency levels, token-aware routing, prepared statements, and per-query timeouts are first-class concerns in Cassandra that Eloquent's connection abstraction has no vocabulary for. We would need to verify how (or whether) these are configurable, because defaults chosen for a relational driver are wrong for a distributed store.
Technical risk
Key questions
chunkById, offset pagination, whereHas)? Is there a documented failure mode versus silent degradation?Stack fit
Treat Scylloquent as a secondary connection, sibling to the primary relational database, configured as a distinct Eloquent connection. Do not attempt to move existing models onto it. The relational core (users, billing, permissions, anything requiring joins or multi-row transactions) stays where it is. Scylla earns its place only for append-heavy, high-throughput, partition-addressable domains: event/audit streams, activity feeds, time-series metrics, session or token stores, notification queues.
A cleaner long-term shape is to keep Eloquent out of the hot path entirely: define a small repository interface per Scylla-backed domain and let Scylloquent be one implementation detail behind it. That preserves an exit to the raw driver or a different store without touching domain code, and it gives us a natural place to enforce partition-key discipline.
Migration path
No migration path exists for existing relational data in any automated sense — this is greenfield schema design. Sequence:
Compatibility
Pin the package version and the PHP/Laravel versions in CI, and add a compatibility gate: if the package has no release supporting our Laravel target, the pilot does not start. Confirm the native extension is available for our PHP minor in the base image before any application work begins — this is a hard prerequisite, not a detail.
Sequencing
Data modeling → driver/extension feasibility → repository seam → single-domain pilot → measure → expand or abandon. Explicitly gate expansion on measured benefit; the low adoption signal suggests the default answer to "expand" should be no unless the pilot is clearly favorable.
Maintenance
Ongoing costs sit mostly outside the package: container images must carry the CQL extension and its native driver, base-image upgrades require recompiling or re-pinning, and PHP minor upgrades require re-validating the whole chain. The package itself is small and slow-moving — we should plan to vendor or fork it rather than depend on upstream responsiveness for Laravel major bumps. Budget roughly a fraction of an engineer's time for the dependency chain alone, plus the initial fork-readiness work.
Support
Effectively no commercial or community support. Internal ownership must be explicit: one named owner for the driver/extension chain and one for the data model. Documentation for Eloquent usage over Cassandra is thin, so our own runbook — supported idioms, forbidden patterns, consistency defaults — becomes the real support surface. That runbook is a deliverable, not an afterthought.
Scaling
Where Scylla shines, it shines genuinely: linear horizontal scale, predictable tail latency at high write volume, no primary-write bottleneck. Scylloquent does not impede that as long as queries stay partition-scoped. Scaling hazards are all modeling hazards — unbounded partition growth (a hot partition key like a tenant ID or a date bucket), tombstone accumulation from delete-heavy or TTL-heavy access, and ALLOW FILTERING sneaking into generated queries. Offset-based pagination through Eloquent is the highest-risk scaling pattern; cursor/token paging must be mandated and enforced in review.
Failure modes
artisan migrate.Ramp-up
The library is easy to learn; the data modeling is not. Engineers fluent in Eloquent will need genuine Cassandra/Scylla training — partition and clustering key design, denormalization as a deliberate choice, consistency tradeoffs, and the operational vocabulary of compaction, repair, and tombstones. Estimate several weeks before a mid-level engineer produces trustworthy Scylla schemas unsupervised, and note that Scylla operational knowledge (node management, repair scheduling, capacity planning) is a separate skill from application-side data modeling. That expertise gap, not the 29-star package, is the dominant cost in this evaluation.
How can I help you explore Laravel packages today?