xmpp protocol decentralized actual meaning? - xmpp

I just started working on xmpp its wiki page says that "The architecture of the XMPP network is similar to email; anyone can run their own XMPP server and there is no central master server."Hence it is decentralized
In my application I want that user can create a specific group chat box on a click of button.
My question is if the main user who created chatbox become offline will the chat box created by him will remain alive as decentralized suggest that user who created will act as a server. If not , could anyone suggest what can be done for keeping chatboxes alive even when the user become offline.

Multi User Chats (called 'MUC' in the XMPP world) are hosted by a XMPP component. This means that the user who initiated the chat *does not act as chat provider, but this particular MUC component. This component runs usually on the same machine as your XMPP server. Therefore the chat exists - if the MUC is marked as permanent - even if the user quits the chat.
More information can be found in XEP-0045: Multi-User Chat

Related

In ejabberd user left group when he goes offline

In group chat once user goes offline, he also goes out from group. How can I kept him in group so that he will receive chat notification as well when he comes online. I am using ejabberd and strophe js for web chat application.
Multi-User Chat as defined in XEP-0045 is based on presence. Thus, that's the expected behaviour.
ejabberd also implements a work in progress extension written by the XSF: XEP-0369: Mediated Information eXchange (MIX).
ejabberd master implements that specification already even if this is just a draft. At the moment, it is not finished and is just experimental. It cannot be used in production just yet.

Laravel socket chat application

I'm new with web sockets, and i want to create a private chat with laravel between authenticated users and anonyme users , i'm not asking to give me the codes, i want a way to do that , i want to understand how can i do that
I'm thinking to that for a couples days ago, and i fount that i should make this steps :
1- Create chat with socket
2- intergrate it with laravel (1)
3- show connected users ( i don't know id if that i should make that with socket or with laravel framework )
4- fix the chat to make it private ( build some socket or somethink like that)
i want to know how i can do that ?
Thakns
https://packagist.org/search/?q=socket
If I were doing this, I would separate the sockets server and the frontend implementation.
This would allow you to scale both the dispatch and the client services at different rates.
You can use any library of your choosing, usually the best is going to be on the top.
http://www.sanwebe.com/2013/05/chat-using-websocket-php-socket
That explains it a bit more than I am willing to.
basically you will have one instance of laravel that is only responsible for rest/socket communication. It will provide the client(frontend) with the information that it needs.
When a registered user logs in, You simply notify your socket server via rest a user has logged in, In turn your socket server will query the db for all currently logged in users, trigger the event of UserLoggedIn , attaching perhaps an array of logged in users which would then be broadcasted to all of the listening clients.
When a client receives that notification, your js (if necessary) would update the list of available chatters with the one provided by the dispatch.
You will also need to maintain a list of active unregistered user socket connections so that you know who's where and who should get what message.
This is the general idea behind it.

OpenFire + FastPath WebChat - Pre Fill the User Chat Window with ongoing Conversation

Currently I am using Olark for live chat on my website.
I am planning to replace it with an in house OpenFire installation.
However, there is one problem.
With Olark live chat snippet (which I embed on my website) - if a user opens the website in multiple tabs - it's prefilled with the ongoing conversation. For e.g. - you can try it on (moonclerk.com).
How do I achieve the same pre population of chat window with the ongoing conversation with OpenFire + FP WebChat?
The way we achieve it at Olark is not exactly trivial. We don't actually use an XMPP client on the end-user's side, which makes it a bit easier, but basically our transport layer is able to grab conversation events for a conversation in-progress based on a session UUID that is stored in the user's cookies. XMPP isn't involved in that process at all, for us (it is only concerned with final delivery to and from Operators).
I don't know what FastPath's architecture is like, but if you were looking for this functionality, or to add it yourself, XMPP supports retrieving some n number of messages from the message history for a client. Check out XMPPFramework - Retrieve Archived Messages From Openfire Server for more on that.

XMPP chat and Notification together?

I want to integrate my web application with chat and notification service and the foremost and the best, i understand is XMPP. After going through the nitty gritties, though i understood most of it but I got stuck here i.e. how will i run a Chat and notification service together.
One option is to have run different connections of Strophe, long polling with different accounts one for chat and other for notifications.
Other one is to have both notifications and chat on the same accounts but now the problem if the user signs out from chat he wont be able to receive notifications.
The first option does not seem feasible to me, but is there a way the later one could work?
Use one connection, to your "chat" service. Run your notification service as a component on your chat server, or run a separate server and federate them together. The client will be able to contact the notification service (and vice-versa) via the naming scheme in the Jabber ID's (JIDs) that you pick. Make sure you pick a different domain name for the user accounts on the chat side than for the notification service.

UCMA: Chat with users not in AD

a customer wants enable a chat/instant messenger for his application webside. He is using Lync Server internally to Chat in-house. Now, he requires the following:
A external user (which will not be an AD user) logs into the webside is able to chat with a person inside the company. The internal user will receive those messages via his lync client.
What's the best way to achieve this?
i thought about bot that delegates messages from the webside to the lync server that does the rest. But how can i send a message as an external user?
The usual way to approach this is with the following components:
A bot that connects to the internal Lync infrastructure as an ApplicationEndpoint, and manages conversations with external/internal users
A Web or WCF service that exposes methods over http to external users - this could be built into the bot, or could be a separate service that communicates with the bot in some way
The web UI for presenting a users presence, allowing click-to-call, initiating and displaying a conversation etc
As an example, the WCF service could expose a few methods:
GetPresence(targetSipUri) - returns a presence value for the given uri
SendIM(targetSipUri, message) - sends an IM to the given uri
GetReplies() - polls for any responses
When you get into the detail you might need more methods - e.g. it may be an idea to generate a conversation token and pass this around
The web UI could present a list of contacts with a presence status (GetPresence), then allow the user to click a presence contact to initiate a new conversation window and send the inital message (SendIM), then poll the service for any replies from the contact (GetReplies) - note, the bot will have to queue replies internally until GetReplies is called.
There are commercial products that might meet your needs - a quick search for Lync webchat should turn up a few. Also, it may be worth looking into the Lync Web App, to see if this works for your customer
Edit: In answer to the comment below - yes, your internal users will see a conversation from "Our Lync Bot". If you don't know who your users are (e.g. random potential customers browsing a shopping site), you can grab some info from them (name, product to discuss etc) and have the bot display this to the internal user, either as part of the IM conversation, or as conversation context displayed in a Conversation Window Extension.
If your external users are known in advance (e.g. registered customers), and the internal user MUST see the conversation as being from them, then you will need to create a UserEndpoint for each conversation - but this would rely on having the user in AD.