Elixir client for Phoenix Channels

275 views
Skip to first unread message

Cristian Garcia

unread,
Dec 16, 2015, 5:39:15 PM12/16/15
to phoenix-talk
Elixir looks like a perfect language for the Internet of Things so I am trying to do a demo controlling switches with a Raspberry Pi running Elixir. A message is supposed to be sent from a Phoenix Server to the Raspberry Pi which does the job. My idea is to connect from an Elixir client on the Raspberry to a Phoenix Channel on the server. This way you could send messages with the actions, request information about its state, etc.

On the documentation I only read about JavaScript, Android and iOS clients. Is there an Elixir client? If not, how might I be able to achieve this?

Thanks!

Chris McCord

unread,
Dec 17, 2015, 8:40:36 AM12/17/15
to phoeni...@googlegroups.com
A first-class elixir channels client is something I would like to see. I know Justin Schneck has been working on one, but I don't believe it's ready yet.

--
You received this message because you are subscribed to the Google Groups "phoenix-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phoenix-talk...@googlegroups.com.
To post to this group, send email to phoeni...@googlegroups.com.
Visit this group at https://groups.google.com/group/phoenix-talk.
To view this discussion on the web visit https://groups.google.com/d/msgid/phoenix-talk/60cc77af-0df9-4861-bab5-c2065bcb93db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric E.

unread,
Dec 18, 2015, 2:06:17 PM12/18/15
to phoenix-talk
Perhaps it would be interesting to implement this in a way such that you can optionally use a distributed Erlang-based transport as well? Could be cool, though I'm not certain I have any actual use cases in mind at the moment...

Cristian Garcia

unread,
Dec 20, 2015, 11:08:01 AM12/20/15
to phoenix-talk

Chris,

Where can I find the specs to implement this?


On Fri, Dec 18, 2015, 14:06 Eric E. <who...@gmail.com> wrote:
Perhaps it would be interesting to implement this in a way such that you can optionally use a distributed Erlang-based transport as well? Could be cool, though I'm not certain I have any actual use cases in mind at the moment...

--
You received this message because you are subscribed to the Google Groups "phoenix-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phoenix-talk...@googlegroups.com.
To post to this group, send email to phoeni...@googlegroups.com.
Visit this group at https://groups.google.com/group/phoenix-talk.

Chris McCord

unread,
Dec 20, 2015, 1:24:39 PM12/20/15
to phoeni...@googlegroups.com
See the Phoenix.Transport docs. It lays out the contract.


Cristian Garcia

unread,
Dec 28, 2015, 8:28:14 PM12/28/15
to phoeni...@googlegroups.com
Chris,

Are you talking about "Phoenix.Transports.WebSocket" or "Phoenix.Socket.Transport", or neither. They weren't very enlightening as to how the client should send the data, and what it should expect. To be honest I haven't played with Channels much or websockets in general, but I am assuming its JSON with a certain structure for both incomming and outgoing messages. I'd like to know the structure and the general flow, maybe I'll need to write a C# client at some point.

I also found mobileoverlord/phoenix_channel_client, I'll test it when I have the time.

Chris McCord

unread,
Dec 28, 2015, 8:31:08 PM12/28/15
to phoeni...@googlegroups.com
Those two modules are the best resources to seeing the flow. The Phoenix.Transport moduledoc lays out the overview, but leaves the finer details like wire format up to the transport. In the case of c#, checkout Justin's C# client https://github.com/livehelpnow/CSharpPhoenixClient


Reply all
Reply to author
Forward
0 new messages