Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Seal Multi Adapter

Seal Multi Adapter Laravel Package

cmsig/seal-multi-adapter

SEAL Multi Adapter writes indexing operations to multiple adapters at once. Commonly paired with ReadWriteAdapter to keep search reads on one engine while mirroring writes to several indexes, useful during migrations or multi-backend setups.

View on GitHub
Deep Wiki
Context7

The MultiAdapter allows to write into multiple adapters. Part of the https://github.com/php-cmsig/search project. READ-ONLY Repository

Frequently asked questions about Seal Multi Adapter
How do I use SEAL Multi Adapter with Laravel for multi-backend search writes?
Pair it with `ReadWriteAdapter` to route writes to multiple adapters (e.g., Elasticsearch + OpenSearch) while keeping reads on one. Configure via DSN like `multi://readAdapter?adapters[]=writeAdapter` and wrap it in a `ReadWriteAdapter`. Requires `cmsig/seal` as a dependency.
Can I replace Laravel Scout’s Elasticsearch driver with SEAL Multi Adapter?
No, Scout doesn’t natively support SEAL. You’d need to build a custom bridge or migrate to `cmsig/seal` first. The package is designed for Laravel apps already using SEAL’s search abstraction layer.
What Laravel versions and PHP versions does SEAL Multi Adapter support?
The package depends on `cmsig/seal` (v1.0+), which requires PHP 8.1+. Laravel compatibility isn’t explicitly stated, but it works with any Laravel version using SEAL’s adapter interface. Test thoroughly for your stack.
How do I handle failures if one search backend (e.g., Elasticsearch) goes down?
The MultiAdapter writes to all adapters synchronously with no built-in retry or failover logic. You must implement application-level error handling (e.g., queue failed writes or log errors) or use a wrapper like `ReadWriteAdapter` with custom middleware.
Is SEAL Multi Adapter production-ready for high-traffic Laravel apps?
It’s marked as ‘heavily under development’ with no version tags or changelog. For production, test performance (synchronous writes add latency) and schema consistency across adapters. Consider alternatives like Elasticsearch’s replica shards if stability is critical.
Can I use Multi Adapter for A/B testing with different search engines?
Yes, but ensure identical schemas across adapters (e.g., Elasticsearch and OpenSearch). The MultiAdapter duplicates writes, so A/B logic must be handled at the application level (e.g., routing queries based on user segments).
What are the performance implications of writing to multiple adapters?
Each write operation is duplicated across adapters synchronously, which can degrade throughput. There’s no async support or batching. For high-volume apps, test latency under load or consider async queues (e.g., Laravel Horizon) to offload writes.
How do I configure DSN strings for MultiAdapter in Laravel?
Use the format `multi://readAdapter?adapters[]=writeAdapter1&adapters[]=writeAdapter2`. Combine it with `ReadWriteAdapter` in your DSN like `read-write://readAdapter?write=multiAdapter`. Ensure all adapters share the same schema.
Are there alternatives to SEAL Multi Adapter for Laravel multi-backend search?
Yes: Elasticsearch’s built-in replica shards, cross-cluster replication, or application-level sync (e.g., Laravel events + queues). For Scout users, consider `spatie/laravel-searchable` with multiple drivers or a custom solution. SEAL’s advantage is abstraction over multiple engines.
How do I test SEAL Multi Adapter in a Laravel project?
Mock adapters in PHPUnit to simulate multi-backend writes. Test edge cases like schema mismatches, network failures, and concurrent writes. Since it lacks Laravel-specific tests, validate integration with your ORM (e.g., Eloquent events) and search queries.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
babenkoivan/elastic-client
innmind/static-analysis
innmind/coding-standard
datacore/hub-sdk
alengo/sulu-http-cache-bundle
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity