Is Firebase Cloud Messaging suitable for messaging apps? - firebase-cloud-messaging

We're writing an app like LINE, and need notification service for each single message in a chat group when app is in background.
We try to use Firebase Cloud Messaging for this feature, but I can't see a reasonable implementation.
Topic subscribing is too slow for "create a topic for each chat group" since it takes hours to create one. Device group messaging is designed for devices owned by a single user. Using sending to a single device feature for each receiver and each message does not seem to be practical since the server loading is too heavy.
Is there a good way to use FCM making such app, or do I need to find another service? Thanks.

Related

Notifications for inactive users

I’m implementing a solution that will notify users in a scenario very similar to a chat.
I’ll be using SignalR and Azure Notifications Hub for the job.
There are two scenarios that I need to address:
Notifying users that are currently connected and using my app - either web or mobile
Notifying users who are NOT currently using the app
I think SignalR will work just fine for the first scenario which is fairly easy.
My question is handling the second scenario which will require Azure Notifications Hub.
In a typical chat app, though it’s not real-time, there’s little delay before an inactive user receives a notification for a new message he receives.
How do I “trigger” a process that will send a notification through Azure Notifications Hub?
I can think of two ways to handle this:
Figure out a way to keep a list of users who currently have an active connection to my app. These users can be notified through SignalR. So after each new message, I could trigger a notification process that will use Azure Notifications Hub for users who are NOT in the active users list i.e. those who are NOT actively connected to my app.
Another approach would be to assume no one is connected. I could create an Azure Functions app that runs every minute to check on messages that are NOT opened. It would then compile a list of users who need to be notified and call Azure Notifications Hub process to notify them.
I don’t want to reinvent the wheel and want to tap into the experience of those who’ve already implemented a solution like this.
I’m currently leaning towards the second approach. I’d appreciate your suggestions, especially on approaches that I haven’t thought of. Thanks!

Implementing Whatsapp Business APIs using gupshup.io platform

gupshup.io provides a way to utilise whatsapp business by exposing a single api interface. I am exploring it. But the documentation is poor.
I wonder how the entire conversation can be tied together. Is there any session that is initiated when the message exchange begins? The official site suggests to use Stack Overflow as forum and hence the question.
For every new client (business phone number) a new WhatsApp Business API client (docker containers) is started. This is uniquely tied to the databases. Just like everything stored in your phone WhatsApp app is stored in the databases, the docker containers are tied closely to the database to create a unique session for you and store the messages.
The documentation at WhatsApp Official Documentation can give you more information.
Login to gupshup.io WhatsApp dashboard
Click ‘+’ Icon to create a App and select the type of app: Access API
You will see a Sandbox:
Set up a callback URL where you can receive incoming messages from your users and for outgoing messages to user, use the sandbox API.

Quickblox chat data replication

We are going to build a mobile app that will simplify a communications between our customers and our workers. Quickblox seems to be a good chose for us but we have a question:
We would like to save all text messages that are sent between customers and workers in our database. What is the best way to implement it? Is it possible to automatically add a server bot to every conversation? Is it possible to poll a Quickblox and request all conversations/messages of all users for some date?
We have a Kafka http://kafka.apache.org integration with our Chat - each message also goes to a Kafka queue, so you can connect to Kafka and consume all messages on your side and save them to your DB for example.
This feature is available starting from Enterprise plan http://quickblox.com/plans/

Real-time Push notifications with Firebase

I recently signed up to use Firebase and I can't seem to figure out how to push notifications to specific users.
For my use, I guess you can think of it like Facebook. Whenever a user does something, say posts an interesting article for their friends to read, I want all of the user's friends to be notified of that event. So, using Firebase, how would one make it possible to notify only their friends and not everyone? My database stores the conenctions.
Perhaps there is a way to have each user be a node in the Firebase database and each time a notification is sent, The user will constantly check his node, and if something appears, pulls it and then delete it.
The examples on Firebase seems to be sort of basic. I wish there was a user-specific push notification example.
Now Firebase supports Push Notification. Google rebranded GCM to Firebase Cloud Messaging and it now offers this cross platform service. Firebase also offers notifications.
These are the differences between these two services:
Firebase Cloud Messaging provides a complete set of messaging capabilities through its client SDKs and HTTP and XMPP server protocols. For deployments with more complex messaging requirements, FCM is the right choice.
Firebase Notifications is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, Firebase Notifications lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns.
If you want a more detailed comparison. Read this.
There's a good explanation of how you can send notifications to specific users here:
How to send an alert message to a special online user with firebase
Basically you need to have each user observe a unique path, and then write data updates to the appropriate path.

IOS implementation of simple messaging system (client/server) between clients

i've been looking around to find a simple library or a client/server sample code for implementing a messaging system between users of my IOS clients app and a REST server. I would need that each user has an incoming and sent messages view. This view would display the conversations grouped by user. For example, using a table view where each cell represent a thread between the 2 distinct users, selecting a user's conversation it would push a new view that would display all the messages between the two users.
I have to say that i didn't found much, this is a mix of libraries and front ends:
an XMPP objective-c library: https://github.com/robbiehanson/XMPPFramework, but i don't really want an IM behavior
Acani chat, https://github.com/acani/AcaniChat seems promising but waiting for the acani chat server, i could use the front end
another chat https://github.com/honcheng/iOS-nodechat
MailCore, an IMAP api for objective-c: https://github.com/mronge/mailcore . i would need to relay on a mail server, create emails for each user and ... too much!
too bad there isn't any iMessage API
dont want to send a SMS or an email
push notification it's not a must to start
maybe coding a simple REST service for publishing and retrieving messages to and from a user would be the best approach? i'm i missing something?
thanks!!