Skip to content

Commit

Permalink
Update readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosCharz authored Sep 13, 2016
1 parent c2fe0cd commit bd6188c
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,6 @@ To run this project you need a FCM project sender ID and a FCM server key. You c

Those are passed into the CcsClient by either calling the prepareClient() method or by providing those as arguments to the EntryPoint main method.

##Chat App - Alternative 1: Firebase + XMPP + FCM

1. When the app is in foreground: You can use Firebase realtime database to send and receive messages, change user's presence, etc. You don't send upstream messages during this time!
2. When the user navigates away from the app: The user is now considered "Away" or "Offline". You use the XMPP Connection Server and FCM to handle the incoming messages to send notifications to client devices through FCM downstream messages.
3. Once the user taps on the notification, the app comes back to foreground and we re-connect to Firebase and back to step 1.


##Chat App - Alternative 2: Ejabberd + XMPP + FCM

1. When the app is in foreground: You use Smack library to connect directly to your Ejabberd server, send messages, change user's presence, etc. The connection to your Ejabberd is kept during that time. You don't send upstream messages during this time!
2. When the user navigates away from the app (you close the connection): The user is now considered "Away" or "Offline". You use the XMPP Connection Server and FCM to handle the incoming messages to send notifications to client devices through FCM downstream messages.There's no active connection to the Ejabberd server!
3. Once the user taps on the notification, the app comes back to foreground and you re-connect to Ejabberd and back to step 1.

*I know there are other alternatives that are also good but until now I just analyzed these two.*

##Related definitions

* **XMPP**: eXtensible Messaging and Presence Protocol (XMPP). It is a protocol based on Extensible Markup Language (XML) that was originally designed for instant messaging (IM) and online presence detection. XMPP is a protocol for streaming XML elements in order to exchange messages and presence information in close to real time.
Expand Down Expand Up @@ -104,4 +89,4 @@ Copyright 2016 Carlos Becerra
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.

0 comments on commit bd6188c

Please sign in to comment.