Design Spec for v1.0.0 #60
Replies: 11 comments
-
Production Infrastructure |
Beta Was this translation helpful? Give feedback.
-
Incoming Message or InboxThis controller is part of the UserMessage Context.
Based on the API docs, I am using the following curl requests to ping the curl -H 'Content-Type: application/json' \
-X POST 'http://localhost:4000/gupshup/message' \
-d '{
"app": "DemoApp",
"timestamp": 1580227766370,
"version": 2,
"type": "message",
"payload": {
"id": "ABEGkYaYVSEEAhAL3SLAWwHKeKrt6s3FKB0c",
"source": "918x98xx21x4",
"type": "text",
"payload": {
"text": "Hi"
},
"sender": {
"phone": "918x98xx21x4",
"name": "Andy",
"country_code": "91",
"dial_code": "8x98xx21x4"
}
}
}' |
Beta Was this translation helpful? Give feedback.
-
Working with Webhooks locallyOur BSP expects us to configure a webhook URL to which it forwards all messages sent to our whatsapp number. Its not ideal to keep a server 24/7 especially for local development. To address this we are using a webhook payload delivery service smee. Our smee endpoint is Caution This url is public so do not send confidential information on it. Remember to periodically delete the messages Now to receive these events on your local machine, you need to configure smee locally.
Important Unfortunately this introduces npm dependency on a largely elixir and python project.
|
Beta Was this translation helpful? Give feedback.
-
|
The documentation for workers can be found here - https://github.com/tattle-made/feluda/wiki/Workers |
Beta Was this translation helpful? Give feedback.
-
Media MatchingUser Story : Given a media item, we want to find others like it. The proposed solution will be used to support Spam Filtering and Automatic Response initiatives. DefinitionsDuplicate : This would mean an exact copy of the media item. Capturing any sort of filters or transformations of the media item is out of scope for this. The use cases that we need to support are as follows :
Duplicate MatchingFeluda has workers that can process a media item (image, video and audio) and convert them into a hash string. This can be easily stored in a Relational database like Postgres. This makes it an ideal solution to implement optimized match finding and counting instances. The schema for the Postgres table (user_message_inbox_duplicate) would look like :
Example Use Case :
Perceptual Similarity MatchingFeluda has workers that use ML models to convert image, video and audio into vectors. These vector representations of media item allow for finding similar media items and also let us do clustering. With the advancement in multimodal and multilingual models, this technique will continue to be relevant in Feluda. For the use case of perceptual similarity matching, we care to use the vector models simply because they capture information about the media item much better than purely hash based solutions. So to be able to somehow capture that as an identifier and store in a relational database and use for quick querying is worth pursuing. The schema for the Postgres table (user_message_inbox_perceptually_similar) would look like :
Example Use Case :
Alternate ApproachInstead of trying to reduce a vector representation into a string that can be stored in Postgres, I think we could modify the Worker. Consider the scenario when a media item is added to the Queue to be processed. Worker receives the message and generates vector representation (R) of it. Now at this point, we search Elasticsearch for R. If it does not exist, we add it to the index and capture its index id (lets say index_id). If it does exist, we ensure that that the match confidence is (nearly 1.0, signifying exact match) and store its index id (again, index_id). This index_id can then be stored in the reporter queue. This is then picked up by the dashboard backend app and added to the Thematic Similarity MatchingI think an approach similar to the above could be used. Its not urgent to develop this, so we'll revisit this when needed. |
Beta Was this translation helpful? Give feedback.
-
List of Queue's@dennyabrain here is the list of queue and its names that will be helpful to you
|
Beta Was this translation helpful? Give feedback.
-
|
I will create two API endpoints
Examples
Response when we have user's language in database : Response when we have user's language in database :
Response |
Beta Was this translation helpful? Give feedback.
-
|
Testing all payloads related to BSP : |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
above comment is getting very filled with existing templates
|
Beta Was this translation helpful? Give feedback.
-
|
Templates Table for Marathi language templates.
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Design Spec
System Architecture on Staging Environment
Contexts
Accounts - Users
UserMessage - Inbox, Outbox
Canon - Manipulated Media, Fact-checked Articles, Analysis
Verification - Query, Comment, Response
External Components
Worker Nodes at Scale
Incoming media items need to be stored or queried for in our Canon. We have two ways to implement this :
1. Powered by Oban and Postgres
Feluda operators are maintained by feluda team and operators needed for the DAU project (video vector, audio vector) are well tested and have their own specific optimized Dockerfiles available. Feluda Release Manager @duggalsu will be in charge of ensuring regular stable releases of the operators.
Adding elixir provides the following benefits :
The elixir layer is mainted in the repo
dau-worker. Its an elixir app managed using the Mix package manager. Release manager @dennyabrain will be responsible for ensuring that only the stable builds are pushed to dockerhub; under the tagstable. Most recent version of the app can be accessed atlatestTo prepare a feluda operator to be deployed on kubernetes, we will add an operator specific statement to the worker's dockerfile. For instance to prepare
videovecoperator as a worker we will addFROM tattletech/feluda-operator-videovec:stableto the worker specific Dockefile indau-worker. This will make the elixir app along with the elixir environment and the python specific dependencies and operator code and dependencies in the container. Now invoking the command/app/bin/dau_workerwill make it ready to receive jobs from a Postgres server.2. Powered by RabbitMQ
to be added
Beta Was this translation helpful? Give feedback.
All reactions