joni-jones / yii2-wschat

Online chat based on web sockets
MIT License
99 stars 43 forks source link

How to pass additional parameters on message #13

Closed philippfrenzel closed 8 years ago

philippfrenzel commented 8 years ago

Hi,

I try to follow up your scripts, but I don't really get the routing -> can you make a short "flow chart" on how interaction works?

Thanks Philipp

(if you don't have time, don#t worry, at some point I will figure out;))

Best Philipp

joni-jones commented 8 years ago

Hi, @philippfrenzel, for now you can't set additional data to message (https://github.com/joni-jones/yii2-wschat/blob/master/assets/js/views/chat.js#L28). What type of data you want to add?

What kind of interaction you want to see? Maybe, how to work frontend or backend parts?

philippfrenzel commented 8 years ago

Hi @joni-jones, I try to "port" your messaging system to a more business like scenario;) I want to sign in deppartments to the websocket and push notifications back to the deppartment while they have an incoming call. It´s currently in a private repo and I would appreciate you helping! You can even give me a quote if you let me know in advance how much you charge an hour? philipp (at) frenzel (dot) net

philippfrenzel commented 8 years ago

btw. pls. close if you wanna continue private ;)

joni-jones commented 8 years ago

@philippfrenzel, you just want to push messages from backend to frontend?

philippfrenzel commented 8 years ago

while a store logs in, he get's connected to the service which is linked:

image

and then when a call is incoming:

a notify widgets pops up to show the incoming call.. I have a complete technical specification... ?

joni-jones commented 8 years ago

Sorry, but it's not clearly for me. As I understand you need some notifications from server side to client. If it's true, the chat functionality is complexity for your purposes and you need something like ZeroMQ (a simple example of implementation) or PubNub.

philippfrenzel commented 8 years ago

hmm, sorry bad explanation from my site! pls. see the following flow chart:

screenshot 2015-11-23 11 54 38

So you can see, that I need to send minimum one message to the client and maximum 2 dependend on the "chatroom" logged in;)

You can see which messages are send to the client... the message creation is done by the server by using the lib:

https://github.com/Textalk/websocket-php

joni-jones commented 8 years ago

As I see, in the listed schema you use a data sending only into one toward, if data will be sending only to "operators" - my chat is not a best solution for this flow. I think, you could to look on the solutions described below. Maybe, ZeroMQ will be better, I used it for similar purposes - very useful.

philippfrenzel commented 8 years ago

Hi, thanks for the hint.... I think your chat is a very good solution for this ;) I don't wanna end up with a totally big tank hunting for ducks ;)

So I'm trying to understand better your Chat and ChatManager to get it up an running;) I added you to the repo, so you can see it later - best philipp