I installed OTRS 4.0.6 and connected with AD. All the processes run successfully but when an agent close the tickets, the closing notification doesn't reach respective customers.
Try this.
http://wiki.otterhub.org/index.php?title=Notify_Users_that_a_Ticket_has_closed
Closure notifications don't come in by default. You need to configure notification emails.
Related
I want to make a chat application like WhatsApp, and I want to make the backend server using Django Channels to handle all the real-time updates.
I have been exploring various sources but I could not figure out one thing about how do i manage single websocket connection (single endpoint) for each user and still receive messages from all the chats he is part of in real time. As per my current understanding, I can add channel(web socket connection corresponding to a user) to different channel groups but what if a user is part of a lot of groups(basically is eligible to receive updates from various chats)? Should I add that channel to all the groups, he can be part of as soon as the connection is established or is there any workaround like one in my mind:
Store the list of channels corresponding to each user in a database.
Make a for loop so that whenever a message is received by server, it sends message to websocket connections corresponding to each user involved to receive that message?
Any help is appreciated. Thanks in advance.
Yes, for a simple chat system, you should just add the user's channel name to the groups he's subscribed to.
However, you definitely will need to model the chat system in the database for a more complex system. Let's say you have a model Chat, ChatMember and Message. When a user connects to the websocket, he does not need to specify any chat because it is a general connection. Any message sent by the client has to specify the chat, so you can loop through the chat members and forward the message to all who are currently connected.
How do you know who is currently connected? this is the tricky part. In my architecture, I have a group for each user, sort of like an inbox. The group name is generated from the user id. Each user can have several connections, say mobile, web etc. All the connections coming from a user is added to the users group and the user's number of active connection is saved in an Inbox model. With new connections, it is incremented and decremented during disconnections.
So to know which chat members are currently online, I can just check that the user's inbox has atleast one connection. If he is online I forward the message to his ibox group, else i store the message in his inbox. Whenever a user connects, he is sent all the messages in his inbox and the inbox is cleared.
This is just an example of a way to implement it but you can also think up a custom architecture or improve on it.
I am a bit Confused in Push Notification concept,
I mean can I send notification to all registered users from firebase console after my application is live.
If yes then What is the role of server (like MS Azure or AWS etc) if we can directly send notifications from firebase console ?
If No then why and what is the best way to use this service?
I really need logical explanation.
please answer me. Thanks
"if we can directly send notifications from firebase console"
You can't directly send the notification. It will have first go through APNS.
APNS is there to:
Avoid spamming. If you're sending it every 3 seconds, APNS will restrict you.
Help preserve battery. This becomes more important for silent notifications. Imagine an app sending a silent notification every 30 seconds. This would affect the battery—without the user knowing about it. He's like I'm not opening any apps, yet my battery is dying faster than normal. This would allow Apple to batch notifications from different apps. Imagine if you had 20 apps each trying to send their silent notification at a specific time, so you would be on for 20 different moments. Now imagine if your device told APNS: "Hey there, I have good battery and a good connection, send me what you got!"
I am in the process of writing a back-end for a service such as Facebook Messenger or WhatsApp.
I started out following this splendid tutorial.
I do this with an API written in Python (Django).
Along side with this API, I have a Redis process and a node.js server running (localhost only). The node.js server uses the socket.io library for real-time communication through websockets
An HTTP-request containing a message can be sent from any client to the Django API, which in turn publishes the message to Redis on a certain channel.
The node.js server has subscribed to the Redis channel, and gets notified when such a message is published. Node keeps track of which sockets that are currently connected with an array of socket ids keyed with some user identifier.
I have a few questions about this:
1. Private messages
I would like to send a message targeted to a certain user. My initial approach is to have the HTTP-request (sent to Django) include which user that the message should reach. When this message reaches the node.js server (through redis), node can find that user in an array of clients. Django obviously(?) needs to know which socket.io socket belongs to which user. i.e. Django needs to know which user identifying key that node should use to grab the right socket.
Is this a good approach? Will the redis-server be a bottleneck since I only use one publishing channel? What happens if the target user of the message is offline when the source user sends the message? I would like to grab that event and send a push-notification.
2. Rooms
This service wouldn't be any good if there was not functionality for starting and maintaining group conversations. From what I have read, I should create socket.io:s rooms for this. My question is then, how do i maintain the room between sessions? What if every user participating in a group conversation goes offline and are thereby removed from the node.js server:s array of clients. Can I somehow store rooms between sessions in the Django server?.
Any help and/or feedback/thoughts is greatly appreciated.
Thanks
Private messages
Node keeps track of which sockets that are currently connected with an array of socket ids keyed with some user identifier.
You pretty much said it there. Django does not need to know the socket id of the target user, but node.js does. If you want to send a message to user 3 you would sent to message + target user (or any other meta data you want) to redis. Node.js will look up the user by reading the element with the id 3 from the socket array and send the message to this connection. If there is no element with id = 3, the user is offline and you can send your push notification. Eather in node.js or by notifying the django server.
Rooms
Since you want your rooms to be persistant you should store them in some kind of database like mysql or mongodb. The node.js server would create all the rooms and if a user connects you can look up in which rooms they participated using their user id. If they join a new room you have to update the database. If a new room is created, node.js needs to create the socket.io room and the database needs to be updated as well.
I am working on an IMAP client application that connects to the mail server and loads the message headers into a list view.
In my application, it takes a long time to load. I've set it to connect and load the messages when I start the application.
I see that when other e-mail clients using IMAP load, all of messages are there instantly, even if there are 500 messages in the list.
How do they do it? Do they actually save the last list before the application was closed? Some other way?
Yes, email client apps usually cache downloaded messages locally for performance and then resync with the server periodically to resolve changes performed over time. In the case of IMAP, it can notify clients in real-time when emails are added/deleted/moved (Indy's TIdIMAP4 does not support that functionality yet, though), but you would have to resync manually at startup to account for changes that occurred while your app was not running.
I am running a web service that currently sends confirmation emails out to new users via the gmail smtp servers. As I'm only getting a few new users each day, this hasn't been a problem.
I've recently added new features to the webapp that will require a customized message to be sent out to each user every day. Think of this as similar to the regular messages LinkedIn sends out that give you a status report on the activity in your network. Every user's message will be different. With thousands of users, this means thousands of unique messages will be sent each day.
Edit: I've since found that these types of email are called "transactional or relationship messages". Spamtacular has a good article on differentiating between marketing and transactional email.
I don't think using gmail's smtp servers will cut it anymore, but I don't know that for sure. I don't know what gmail's maximum outgoing messages per account is (it might be 100/day), but they limit outgoing mail to 500 recipients per message. I'm not sending a single message to 500 recipients, but I'm going to be sending 1000's of customized messages with each recipient getting one per day.
I'm interested to learn any best practices for doing this (especially for Java-based webapps). Here are some of my thoughts and concerns on it:
Should I set up my own outgoing mail server? If I do this, it seems like I'll have all sorts of other issues to worry about, such as preventing mail server abuse, monitoring bounces, allowing ways to opt-out of emails, etc. Are there any tools or services to help with this? Maybe something like OpenEMM or a services like MailChimp? But those seem focused more toward email marketing campaigns.
I don't think I should have the webapp itself handle sending emails as it currently is for new user signups. I'm thinking I should setup a separate messaging server that can access the same backend/datastore as the webapp. Thoughts on this?
Should I consider setting up some sort of message queueing service to help with this, such as JMS, RabbitMQ, ActiveMQ, etc.?
Do I need to provide users a way to opt-out? Do I need to flag these as bulk messages? I don't really consider these email marketing messages, but I'm unsure what is considered appropriate or proper netiquette.
Any advice is appreciated. I'm also very interested in open source tools or web services that simplify things and could help me to ramp up as quickly as possible.
Thanks!
With regard to your first question, yes, you should set up your own mail server. Using gmail to do this might work for a while, but they are likely to shut you down in short order when they see this kind of activity. You could sign up for a business account and use app engine to send messages. Here's a link with information about mail quotas for that service.
Regarding your second and third questions, It would be a good idea to have messages queued by the web app and sent out by a centralized service rather than having the app send out the messages on its own.
Usually I would just use a database table as a queue - the web app inserts rows for each message it wants to send. A service/scheduled task app would grab new messages out of the table and send them off. This gives you lots of flexibility if you want to switch mail servers later, better reliability if the mail server is down, easier diagnostics if there are problems with recipients not getting messages, and the ability to resend messages. As for using JMS/MQ to do this - probably not necessary. IMO a database table used as a queue would give you more flexibility here than an actualy JMS-based queue system.
As for opt outs, YES - you should give people a way to opt out. I don't think you need to flag the messages as bulk though.
On the architecture side of things I would definitely consider decoupling the sending of the emails from the main service via some form of asynchronous message queuing (or facsimile thereof using database as an intermediary). Another benefit of this approach is that if the SMPT server\network is down you could build in retry semantics, additionally for future scalability you could implement multiple mail senders reading from the same queue or implement sending throttling or scheduling (i.e send n messages per hour), etc etc.