Skip to content

Commit

Permalink
Merge pull request #64 from w3-engineers/feature/readme-license
Browse files Browse the repository at this point in the history
Feature/google doc converted to restructured text
  • Loading branch information
sabbir360 authored Nov 4, 2019
2 parents 3d1c7ac + bdc7125 commit b4725f5
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 4 deletions.
Binary file added docs/source/app_architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions docs/source/app_architecture.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.. _TeleMesh App Architecture:
.. _Room: https://developer.android.com/topic/libraries/architecture/room
.. _RxJava: https://www.toptal.com/android/functional-reactive-android-rxjava
.. _SQL: https://www.khanacademy.org/computing/computer-programming/sql-documentation

TeleMesh App Architecture
-------------------------

We can use the ``Message Module`` to explain this App architecture.

1. In case of an Outgoing message, a message data will be sent from ``ChatActivity`` to
the ``ChatViewModel`` directly.

2. Then the message data will be saved in ``MessageSourceData`` .

3. We are using `Room`_ for storing data. As Room operate in background thread that’s why the message data will
be sent using `RxJava`_. Because it manages both background and foreground
task smoothly. All messages will be stored in the Message Table. All `SQL`_
is executed in MessageDao.

4. In the next step, message data will be sent to **Communication Layer**.
The ``Source`` will get the message from **MessageDao** as **RxJava observer** is
attached to it. Automatically ``RmDataHelper`` will get the message data
because **RxJava(Flowable)** is being used for getting last inserted data.

5. ``RmDataHelper`` will send the message to MeshDataSource and this will
prepare this message data into JSON data to pass via the Mesh Network.

6. In the case of an Incoming message, when any message will be available
in this network, it will be discovered in the application’s
Communication Layer. ``MeshDataSource`` will receive this message data and
send to ``RmDataHelper`` directly. ``Source`` will receive the data from
``RmDataHelper``. Now message data will be saved in Message table using
MessageDao.

7. Now, View Layer will get the event of the message data.
``MessageSourceData`` will get the message data from MessageDao as **RxJava observer**
is attached to it. To show message in view level, the message
data will be provided to ``ChatViewModel`` automatically using
**RxJava(Flowable)**. After that, message will be seen in UI i.e.:
ChatActivity, through LiveData.

8. ``RMDataHelper`` is directly connected with ``NotificationUtil``. When any data
is available to RMDataHelper, notification will be triggered as per
app’s requirements.



.. figure:: app_architecture.png
:scale: 50 %
:alt: map to buried treasure

2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.autosectionlabel',
'sphinx.ext.viewcode',
]
autosectionlabel_prefix_document = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['ntemplates']
Expand Down
10 changes: 6 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. _app_architecture:

Project Overview
----------------

Expand Down Expand Up @@ -141,10 +143,8 @@ Minimum API: 19 (KitKat - 4.4.x)
Development Guideline
---------------------

Please follow this link
https://docs.google.com/document/d/1W8joisx_mD6Rpa5aS-2hU16V2bgQ92V4VJDg_2tmlsE/edit?usp=sharing
to get an overview of telemesh app architecture and how the specific
module should be designed.
Hey, read the `App Architecture`_ section.


Developers Guideline step by step
---------------------------------
Expand Down Expand Up @@ -451,4 +451,6 @@ our community manager through [media@telemesh.net] & [info@telemesh.net]

.. _Contributing Guideline: https://github.com/w3-engineers/telemesh/blob/master/CONTRIBUTING.md
.. _here: https://github.com/w3-engineers/telemesh/blob/master/CONTRIBUTING.md#reportissue
.. _App Architecture: app_architecture.rst


0 comments on commit b4725f5

Please # to comment.