Open
Conversation
New V2 serializer that is a super set of the Phoenix V2 JSON Serializer. It has 2 special types of messages: * User Broadcast Push * User Broadcast The clients will be able to send a new User Broadcast Push which allows for binary or JSON payloads. It allows for a more efficient handling of the user payload as well. The backend will be able to then broadcast the User Broadcast Push as User Broadcast for the serializers with V2 while also being able to convert to the V1 Broadcast that Phoenix V1 JSON Serializer supports as long as the user payload is JSON. If a binary payload is sent and there is a websocket using V1 listening it won't receive such message as only JSON is supported by V1. This PR also add a new GitHub workflow to run integration tests with deno. Currently pointing to a realtime-js preview release for now.
We avoid waiting during tests and we ensure that RateCounter has processed the last gen counter changes
Also add binary payload test
Routes CRUD operations to master node when such is set via environment variable --------- Co-authored-by: Eduardo Gurgel <eduardo.gurgel@supabase.io>
we were not starting the replica processes properly so we would end up failing healthchecks.
we were using Realtime.Repo to build the required SQL to call tenants databases. as we move towards some regions only using Replicas we can remove fully this logic and rely on the Replica modules to build said queries
If the string size matches the uuid length we were parsing it to be uuid which created issues. To prevent it we now handle payload based on the relations provided and we further simplified the logic to not use send in our message handling
This approach prevents sending more information than needed reducing the amount of data send via gen_rpc. We also remove some unnecessary calls to primary in the delete controller operation
…1639) Only realtime.messages should be processed
Avoid using the same container over and over
Also update bun.lock
Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
A drop-in replacement for `use Phoenix.Socket` that adds Realtime-specific transport behaviour: * Sets `:max_heap_size` on the transport process during `init/1` * Schedules periodic traffic measurement via `handle_info/2` * Wraps `handle_in/2` with error handling for malformed WebSocket messages
Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
* feat: add PartitonedTables Peep.Storage implementation using N ETS tables with optional tag-based routing. Each metric write is routed to a specific table based on a `:routing_tag` option. If the routing tag is present in the metric's tags, `:erlang.phash2/2` is used to select the table. Otherwise, the first table is used. This reduces lock contention by routing different tag values (e.g. different tenants) to different ETS tables, without partitioning metrics within a table.
Co-authored-by: supabase-workflow-trigger[bot] <266661614+supabase-workflow-trigger[bot]@users.noreply.github.com>
Improve the local setup to make it straightforward to run the server: ``` mise run db-start mix setup mise run dev ``` - Introduce mise to manage tool versions, tasks, and envs - Removed .tool-versions and Makefile in favor of mise.toml - Introduce `Realtime.Env` to use in runtime.exs with tests and more validations to make it more resilient to avoid hard to debug errors in the server booting process - Group all envs together in `runtime.exs` to have better discoverability, especially for docs (self-hosting) and config - Break readme into dedicated docs to reduce noise in the main readme (easier to scan) - Add Code of Conduct and Contributing guides based on https://github.com/supabase/.github and https://github.com/supabase/supabase - Added env vars into ENVS.md: API_TOKEN_BLOCKLIST, CLUSTER_STRATEGIES, DB_MASTER_REGION, DB_HOST_REPLICA_FRA, DB_HOST_REPLICA_IAD, DB_HOST_REPLICA_SIN, DB_HOST_REPLICA_SJC, REGION, LOGS_ENGINE, LOGFLARE_LOGGER_BACKEND_URL, LOGFLARE_API_KEY, LOGFLARE_SOURCE_ID, JWT_CLAIM_VALIDATORS, METRICS_JWT_SECRET, METRICS_TOKEN_BLOCKLIST, MAX_GEN_RPC_CALL_CLIENTS, PROM_POLL_RATE, AWS_EXECUTION_ENV, JANITOR_MAX_CHILDREN, JANITOR_CHILDREN_TIMEOUT, LOG_THROTTLE_JANITOR_INTERVAL_IN_MS, MEASURE_TRAFFIC_INTERVAL_IN_MS, NO_CHANNEL_TIMEOUT_IN_MS, RPC_TIMEOUT - Removed stale env vars from ENVS.md: DISCONNECT_SOCKET_ON_NO_CHANNELS_INTERVAL_IN_MS, JANITOR_CLEANUP_MAX_CHILDREN, JANITOR_CLEANUP_CHILDREN_TIMEOUT
Used Elixir 1.20 type system to identify violations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream Sync
This PR contains the latest changes from the upstream repository.
Changes included:
Review checklist:
This PR was automatically created by the upstream sync workflow