We are planning to communicate with our customer through whatsapp so what will be the best api for the same , what i learned about Whatsapp business api is we can only communicate with users who will send message first we can not initiate the conversation. is there any possible way to achieve the same ?
Chat API is a good service you should at least consider using. However, it's not free. Check it out:
https://chat-api.com/en/?lang=EN
Related
So I have a REST api. I want to keep it stateless, but at the sametime I need to make a real time chat.
The only way I can imagine a real time chat, is with websockets. The problem accurs that websockets, to my knowledge, seems pretty statefull.
Is there another way to create a real time chat?
My stack is Spring boot (java)
React frontend
Mongodb for database.
Plan for hosting would be AWS
And normally I would just ignore the 100% stateless or statefull, but this is for a school project, and I would look good in my report, to say I am 100% stateless.
the correct way achieving real time chats beside websockets would be to use firebase which is very common since usually the clients connected to your server will use android/iOS.
obviously an app connected to firebase is maintaining a stateful connection to firebase.
in general i dont think it is possible to provide push functionalities without state , as the server must reach the connected clients thus it must maintain those connections. if not using firebase, using websocket seems a reasonable approach.
I know two ways of implementation this. Easiest - websockets. Hardest - backend is calling frontend.
More about second solution. In normal world, we are calling backend using frontend, here will be visa versa. When backend will receive a message (from another user), it will tell frontend that message was received ant it should show it.
I am using spring MVC. I want to make a email notification system. Its job will be notify user about any activity happend. like facebook, twitter does.
What are the best approach considering huge number of email notification. I was thinking to use #Async. but will it be a good approach for such kind of email notification services.
You can use Spring Email library
The Spring Framework provides a helpful utility library for sending
email that shields the user from the specifics of the underlying
mailing system and is responsible for low level resource handling on
behalf of the client.
Huge number of emails should not be a problem, because email is neither cached in memory nor is high cpu consuming activity. Even if you are sending few hundreds of emails concurrently it should not be a problem. But don't believe my words, simply try doing it and use a profiler to confirm the performance.
If you plan to send huge number of emails, good option is to use some external services for that. It will require to do some work integrating them into your application, but if you're using Spring it shouldn't be too hard.
For example, consider Amazon SES, it has Java SDK with support of asynchronious operations, free tier and a sandbox for testing.
i'm developing an app for people with communication disease. The point is that in my app i need that the user uses his gmail account to chat with his friends, like gmail gtalk service with helps to create the message.
I read the XMPP service of GAE but it only permit communication between an user and my app, not between users.
I tried with Smack Api but GAE doesn't suppor it.
I can create a chat with the Channel Service, but if i want to support Instant Messaging between two users is needed that an user make his account and his friends has to do it too to create the IM interface, and has to uses my web interface not a jabber client like Gtalk.
Can is communicate two users with XMPP in GAE, making an IM like GTalk?
What you need is Google Cloud Messaging Service.
The service just introduced last year and they just announced a lot of enhancement during the Google I/O 2013.
It supports messaging from/to browser, android, and IOS.
I suggest that you go with something like OpenFire RTC Server that is based on XMPP standards. This will help get you a XMPP Server running in no time and as suggested, you could look at hosting this on something like EC2.
A related thread : https://serverfault.com/questions/229039/xmpp-server-on-ec2-amazon-web-service-aws
I've been following this article and have managed to implement a basic verison of it.
What I wanted to ask is, can the same phone create multiple network services and then search those created services for a particular one?
Cheers
I am currently trying to research how to use Android with an existing java based system. Basically, I need to communicate to/from an Android application.
The system currently passes object data from computer to computer using ActiveMQ as the JMS provider. On one of the computers is a display which shows object data to the user.
What we want to do now is use a phone (running Android) as another option to show this object data to a user with wifi/network access.
Ideally we would like to have a native application on the Android that would listen to the ActiveMQ topic and publish to another Topic and read/write/display the object data, but from some research I have done, I am not sure if this is possible.
What are some other ways to approach this problem? The android Phone needs to be able to send/receive data. I have been using the AndroidEmulator for testing.
A quick and dirty way would be to have your JMS pushes the data to a XMPP/Jabber server and use a XMPP library like Smack API on the Android to connect. The advantage of this approach is that
You can emulate the point-to-point and pub/sub in JMS.
XMPP is quite extensible so what you can do is instead of carrying your payload as 'chat' text, you can create your own namespace within the XMPP packet. For data portability, you can use a lightweight like JSON in the namespace.
XMPP will handle your presence for you so your app don't have to keep track of services if they are online.
There is a nice article here that shows you how to use Smack on Android.