留言板

Intergrate websocket to Liferay 6.2

Bach Hoang,修改在8 年前。

Intergrate websocket to Liferay 6.2

New Member 帖子: 15 加入日期: 13-9-30 最近的帖子
My goal is user can chat between portlet and Android app.
Can I create a portlet or something which can run websocket automatically when it is actived in portal? I am developing Android app like chatting app using websocket but I want intergrate websocket into Liferay portal.
Any ideals what i resolve that?

I read this blog https://www.liferay.com/web/james.falkner/blog/-/blogs/liferay-websockets-and-node-good-times- talk about websocket but the sample is not run correctly.
thumbnail
David H Nebinger,修改在8 年前。

RE: Intergrate websocket to Liferay 6.2

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
Websockets are not really your issue w/ a chat portlet, architecture is.

First you have to have your chat stuff figured out on the mobile platform dealing with things like loss of connection (when you go off wifi or cell signal degradation). When the mobile drops off but then comes back, how will they get pending messages that the portlet user has sent?

Next you have to figure out how you're going to build it as a portlet. This should be heavily ajax-based so the browser doesn't need a full page refresh to show new chat messages, but you also have to build something so if the user does happen to do a full page refresh (because they navigate around and then come back to the chat area, etc.) you can refresh the whole chat history (which would otherwise be lost).

Now if you get all of those details figured out, you'd realize that the websocket thing is the least of your issues.
Bach Hoang,修改在8 年前。

RE: Intergrate websocket to Liferay 6.2

New Member 帖子: 15 加入日期: 13-9-30 最近的帖子
David H Nebinger:
Websockets are not really your issue w/ a chat portlet, architecture is.

First you have to have your chat stuff figured out on the mobile platform dealing with things like loss of connection (when you go off wifi or cell signal degradation). When the mobile drops off but then comes back, how will they get pending messages that the portlet user has sent?

Next you have to figure out how you're going to build it as a portlet. This should be heavily ajax-based so the browser doesn't need a full page refresh to show new chat messages, but you also have to build something so if the user does happen to do a full page refresh (because they navigate around and then come back to the chat area, etc.) you can refresh the whole chat history (which would otherwise be lost).

Now if you get all of those details figured out, you'd realize that the websocket thing is the least of your issues.



As you said, I can use Ajax base, it is long polling, the browser have to request consecutively to server to get new message or new data, it is very low performance. I want to use Websocket to get data when have new message (push notification from server), client doesn't have to request consecutively . Websocket will resolve all problem you said such as go off wifi or cell signal degradation etc because it use technology call "Push notification". Do you have any ideal to intergrate websocket to liferay?
thumbnail
Juan Gonzalez,修改在8 年前。

RE: Intergrate websocket to Liferay 6.2

Liferay Legend 帖子: 3089 加入日期: 08-10-28 最近的帖子
Hi Bach,

did you read about Liferay push notifications? Maybe you can use this great feature.