Welcome Guest, Not a member yet? Register   Sign In
Real time - Which is the best way?
#10

(This post was last modified: 07-24-2017, 12:07 PM by spjonez.)

(07-24-2017, 10:32 AM)albert leao Wrote: Phoenix is built on Elixir/Erlang which has powered telecom companies since the 1980, it's not new technology at all, it's just not object oriented and is functional instead.

Erlang yes, Phoenix no. When Node was first released you could have said the same thing about it. Yes it was based off a language that was mature but the eco-system wasn't.

theedo Wrote:1) we have two users, A and B. They connect on a private room only for them, when A send message he sees the message with the message sent by him, and the user B see the message as if received, but if user A open 2 tabs on browser, in one of them he sees the message that he sends as from another user, I think it was a mistake about the session/token (?);

You can do this a couple of ways. Authorization middleware or send a unique property to identify the user when they connect and pass it back with messages to make the client assume the separate connections are the same user.

theedo Wrote:2) Is possible to emit some message to an "array" of user? Instead: A make a post; B and C comment its; then D comments the post -> A, B, C receive the notification about D. Is it possible?

Send JSON and decode it.

As a side note scaling is generally something you don't want to be too concerned about until you need to. Don't take shortcuts along the way, but don't over engineer a problem that doesn't exist yet. If you can't sell 10 of something don't worry about how you're going to sell 10,000.
Reply


Messages In This Thread
Real time - Which is the best way? - by theedo - 07-24-2017, 08:34 AM
RE: Real time - Which is the best way? - by spjonez - 07-24-2017, 12:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB