• Stars
    star
    175
  • Rank 218,059 (Top 5 %)
  • Language
    Elixir
  • Created over 9 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Redis PubSub adapter for the Phoenix framework

Phoenix.PubSub.Redis

A Redis PubSub adapter for the Phoenix framework

See the docs for more information.

Usage

To use Redis as your PubSub adapter, simply add it to your deps and Application's Supervisor tree:

# mix.exs
defp deps do
  [{:phoenix_pubsub_redis, "~> 3.0.0"}],
end

# application.ex
children = [
  # ...,
  {Phoenix.PubSub,
   adapter: Phoenix.PubSub.Redis,
   host: "192.168.1.100",
   node_name: System.get_env("NODE")}

Config Options

Option Description Default
:name The required name to register the PubSub processes, ie: MyApp.PubSub
:node_name The required and unique name of the node, ie: System.get_env("NODE")
:url The redis-server URL, ie: redis://username:password@host:port
:host The redis-server host IP "127.0.0.1"
:port The redis-server port 6379
:password The redis-server password ""
:compression_level Compression level applied to serialized terms (0 - none, 9 - highest) 0
:socket_opts The redis-server network layer options []

And also add :phoenix_pubsub_redis to your list of applications:

# mix.exs
def application do
  [mod: {MyApp, []},
   applications: [..., :phoenix, :phoenix_pubsub_redis]]
end

License

Copyright (c) 2014 Chris McCord

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

phoenix

Peace of mind from prototype to production
Elixir
21,268
star
2

phoenix_live_view

Rich, real-time user experiences with server-rendered HTML
Elixir
6,172
star
3

phoenix_live_dashboard

Realtime dashboard with metrics, request logging, plus storage, OS and VM insights
Elixir
1,998
star
4

flame

Fleeting Lambda Application for Modular Execution: auto scale parts of your existing app with a single function call
Elixir
891
star
5

phoenix_pubsub

Distributed PubSub and Presence platform for the Phoenix Framework
Elixir
640
star
6

phoenix_guides

User guides for the Phoenix web development framework.
500
star
7

tailwind

An installer for tailwind
Elixir
473
star
8

phoenix_ecto

Phoenix and Ecto integration with support for concurrent acceptance testing
Elixir
473
star
9

phoenix_html

Building blocks for working with HTML in Phoenix
Elixir
401
star
10

phoenix_live_reload

Provides live-reload functionality for Phoenix
Elixir
315
star
11

firenest

Elixir
271
star
12

esbuild

An installer for esbuild
Elixir
269
star
13

dns_cluster

Simple DNS clustering for distributed Elixir nodes
Elixir
188
star
14

vscode-phoenix

Syntax highlighting support for Phoenix templates in Visual Studio Code.
160
star
15

plds

CLI version of Phoenix LiveDashboard
Elixir
86
star
16

websock

A specification for Elixir apps to service WebSocket connections
Elixir
75
star
17

phoenix_view

View abstraction for Phoenix v1.0-v1.6
Elixir
65
star
18

tree-sitter-heex

HEEx grammer for Tree-sitter
JavaScript
51
star
19

phoenix_template

Template rendering for Phoenix
Elixir
49
star
20

ex_conf

Simple Elixir Configuration Management
Elixir
36
star
21

websock_adapter

Implementation of the WebSock specification for servers
Elixir
30
star
22

archives

Holds archives for released Phoenix versions
27
star
23

phoenix_html_helpers

Collection of helpers to generate and manipulate HTML contents
Elixir
15
star
24

phoenix_site

CSS
13
star
25

media

Phoenix Related Media
10
star
26

node_checker

Elixir
3
star