சரக்கு
A swarm (group chat) is a set of participants capable of resilient, decentralized communication. For example, if two participants lose connectivity with the rest of the group (e.g., during an Internet outage) but can still reach each other over a LAN or subnetwork, they can exchange messages locally and then synchronize with the rest of the group once connectivity is restored.
A swarm is defined by the following properties:
Ability to split and merge based on network connectivity.
History synchronization. Every participant must be able to send a message to the entire group.
எந்த மத்திய அதிகாரமும் இல்லை. எந்த சேவையகத்தையும் நம்ப முடியாது.
Non-repudiation. Devices must be able to verify past messages' validity and to replay the entire history.
Perfect Forward Secrecy (PFS) is provided on the transport channels. Storage is handled by each device.
முக்கிய யோசனை, பங்கேற்பாளர்களுடன் ஒரு ஒத்திசைக்கப்பட்ட மெர்கல் மரத்தை உருவாக்குவது.
We identified four modes for swarms that we want to implement:
ONE_TO_ONE: A private conversation between two endpoints—either between two users or with yourself.
ADMIN_INVITES_ONLY: A swarm in which only the administrator can invite members (for example, a teacher-managed classroom).
INVITES_ONLY: A closed swarm that admits members strictly by invitation; no one may join without explicit approval.
PUBLIC: A public swarm that anyone can join without prior invitation (For example a forum).
காட்சிகள்
ஒரு குவியலை உருவாக்குங்கள்
போப் ஒரு புதிய கும்பலை உருவாக்க விரும்புகிறார்
Bob creates a local Git repository.
பின்னர், அவர் பின்வருவனவற்றைக் கொண்ட ஒரு ஆரம்ப கையொப்பமிடப்பட்ட உறுதிமொழியை உருவாக்குகிறார்ஃ
/admins
இல் அவரது பொது விசைஅவரது சாதன சான்றிதழ் ̀ / சாதனங்கள் `
அவரது CRL க்கு ̀ /crls`
முதல் கமிட்டின் ஹாஷ் உரையாடலின் ** ID ** ஆக மாறுகிறது
Bob announces to his other devices that he created a new conversation. This is done via an invite to join the group sent through the DHT to other devices linked to that account.
யாரையாவது சேர்க்க
Bob adds Alice
Bob adds Alice to the repo:
/invited
என அழைக்கப்படும் URI ஐ சேர்க்கிறதுCRL
/crls
க்கு சேர்க்கிறது
Bob sends a request on the DHT.
அழைப்பு
Alice gets the invite to join the previously created swarm
Alice accepts the invite (if she declines, nothing happens; she will remain in the "invited" list, and will never receive any messages)
A peer-to-peer connection is established between Alice and Bob.
Alice pulls the Git repository from Bob. WARNING this means that messages require a connection, not from the DHT as it is today.
Alice validates the commits from Bob.
To validate that Alice is a member, she removes the invite from
/invited
directory, then adds her certificate to the/members
directoryOnce all commits are validated and syncronized to her device, Alice discovers other members of the group. with these peers, she will then construct the DRT with Bob as a bootstrap.
ஒரு செய்தியை அனுப்புதல்
Alice sends a message to Bob
Alice creates a commit message. She constructs a JSON payload containing the MIME type and message body. For example:
{
"type": "text/plain",
"body": "hello"
}
Alice ensure her device credentials are present. If Alice’s device certificate or its associated CRL isn’t already stored in the repository, she adds them so that other participants can verify the commit.
Alice commits to the repository (Because Jami relies primarily on commit-message metadata rather than file contents, merge conflicts are rare; the only potential conflicts would involve CRLs or certificates, which are versioned in a dedicated location).
Alice announces the commit via the DRT with a service message and pings the DHT for mobile devices (they must receive a push notification).
Note
To notify other devices, the sender transmits a SIP message with type: application/im-gitmessage-id
.
The JSON payload includes the deviceId (the sender’s), the conversationId and the reference (hash) of the new commit.
ஒரு செய்தியைப் பெறுதல்
Bob receives a message from Alice
Bob performs a Git pull on Alice's repository.
All incoming commits MUST be verified by a hook.
If all commits are valid, commits are stored and displayed.Bob then announces the message via the DRT for other devices.
If any commit is invalid, pull is aborted. Alice must restore her repository to a correct state before retrying.
ஒரு கடமையை சரிபார்ப்பது
பயனர்கள் சில தேவையற்ற கமிட்டுகளை (போக்குவரத்து, தவறான செய்திகள் போன்றவை) தள்ளாமல் இருக்க, ஒவ்வொரு கமிட்டுக்கும் (பழைய முதல் புதியது வரை) தொலை கிளைகளை இணைப்பதற்கு முன்பு சரிபார்க்கப்பட வேண்டும்ஃ
Note
If the validation fails, the fetch is ignored and we do not merge the branch (and remove the data), and the user should be notified.
If a fetch is too big, it's not merged.
For each incoming commit, ensure that the sending device is currently authorized and that the issuer’s certificate exists under /members or /admins, and the device’s certificate under /devices.
Then handle one of three cases, based on the commit’s parent count:
Merge Commit (2 parents). No further validation is required, merges are always accepted.
Initial Commit (0 parents). Validate that this is the very first repository snapshot:
Admin certificate is added.
Device certificate is added.
CRLs (Certificate Revocation Lists) are added.
No other files are present.
Ordinary Commit (1 parent). The commit message must be JSON with a top‑level
type
field. Handle eachtype
as follows:If
text
(or any non–file‑modifying MIME type)Signature is valid against the author’s certificate in the repo.
No unexpected files are added or removed.
If
vote
voteType
is one of the supported values (e.g. "ban", "unban").The vote matches the signing user.
The signer is an admin, their device is present, and not themselves banned.
No unexpected files are added or removed.
If
member
If
adds
Properly signed by the inviter.
New member’s URI appears under
/invited
.No unexpected files are added or removed.
If ONE_TO_ONE, ensure exactly one admin and one member.
If ADMIN_INVITES_ONLY, the inviter must be an admin.
If
joins
Properly signed by the joining device.
Device certificate added under
/devices
.Corresponding invite removed from
/invited
and certificate added to/members
.No unexpected files are added or removed.
If
banned
Vote is valid per the
vote
rules above.Ban is issued by an admin.
Target’s certificate moved to /banned.
Only files related to the ban vote are removed.
No unexpected files are added or removed.
Fallback. If the commit’s type or structure is unrecognized, reject it and notify the peer (or user) that they may be running an outdated version or attempting unauthorized changes.
ஒரு சாதனத்தை தடை செய்யவும்
Important
Jami source code tends to use the terms (un)ban, while the user interface uses the terms (un)block.
Alice, Bob, Carla, Denys are in a swarm. Alice issues a ban against Denys.
In a fully peer‑to‑peer system with no central authority, this simple action exposes three core challenges:
Untrusted Timestamps: Commit timestamps cannot be relied upon for ordering ban events, as any device can forge or replay commits with arbitrary dates.
Conflicting bans: In cases where multiple admin devices exist, network partitions can result in conflicting ban decisions. For instance, if Alice can communicate with Bob but not with Denys and Carla, while Carla can communicate with Denys, conflicting bans may occur. If Denys bans Alice while Alice bans Denys, the group’s state becomes unclear when all members eventually reconnect and merge their conversation histories.
Compromised or expired devices: Devices can be compromised, stolen, or have their certificates expire. The system must allow banning such devices and ensure they cannot manipulate their certificate or commit timestamps to send unauthorized messages or falsify their expiration status.
ஒத்த அமைப்புகள் (விநியோகிக்கப்பட்ட குழு அமைப்புகள்) அதிகம் இல்லை, ஆனால் இவை சில எடுத்துக்காட்டுகள்ஃ
[MPOTR யாரையாவது தடை செய்வது எப்படி என்பதை வரையறுக்கவில்லை]
குழு அரட்டையின் எந்தவொரு மைய சேவையகமும் இல்லாமல் சைகல் (EDIT: அவர்கள் சமீபத்தில் அந்த புள்ளியை மாற்றிவிட்டனர்), ஒரு குழுவிலிருந்து யாரையாவது தடைசெய்யும் திறனை வழங்காது.
This voting system needs a human action to ban someone or must be based on the CRLs info from the repository (because we can not trust external CRLs).
உரையாடலில் இருந்து சாதனத்தை அகற்றவும்
உரையாடலின் பிளவுகளை தவிர்க்க ஒரே ஒரு உடன்படிக்கை இருக்க வேண்டும். இரண்டு உறுப்பினர்கள் உரையாடலில் இருந்து ஒருவரை ஒருவர் துரத்தினால், மூன்றாவது ஒருவரை என்ன பார்க்கும்?
இந்த முறை, திரும்பப் பெறப்பட்ட சாதனங்களைக் கண்டறிய அல்லது பொது அறையில் தேவையற்ற நபர்களைக் காணாமல் இருக்க வேண்டும். ஒரு உறுப்பினருக்கும் சாதனத்திற்கும் இடையிலான செயல்முறை மிகவும் ஒத்ததாகும்ஃ
ஆலிஸ் போப் அகற்றும்
Important
Alice MUST be an admin to vote.
முதலில், அவள் போப் தடை செய்ய வாக்களிக்கிறாள். அதைச் செய்ய, /votes/ban/members/uri_bob/uri_alice (உறுப்பினர்களை சாதனத்திற்கான சாதனங்களால் மாற்றலாம், அல்லது அழைப்பிதழ்களுக்காக அழைக்கலாம் அல்லது நிர்வாகிகளுக்கு நிர்வாகிகள்) மற்றும்
பின்னர் வாக்குகள் தீர்க்கப்பட்டுள்ளதா என்று அவள் சரிபார்க்கிறாள். இதன் பொருள் 50% நிர்வாகிகள் பாப் தடை செய்ய ஒப்புக்கொள்கிறார்கள் (அவள் தனியாக இருந்தால், அது நிச்சயமாக 50% க்கும் அதிகமாக உள்ளது).
வாக்குகள் முடிந்தால், /votes/ban கோப்புகளை நீக்கலாம், /members, /admins, /invited, /CRLs, /devices இல் உள்ள Bob கோப்புகளை நீக்கலாம் (அல்லது /devices இல் மட்டுமே அது தடைசெய்யப்பட்ட சாதனமாக இருந்தால்) மற்றும் Bob இன் சான்றிதழ் /banned/members/bob_uri.crt (அல்லது /banned/devices/uri.crt ஒரு சாதனம் தடைசெய்யப்பட்டால்) இல் வைக்கலாம் மற்றும் repo க்கு அர்ப்பணிக்கலாம்
பின்னர், ஆலிஸ் மற்ற பயனர்களை (போபிற்கு வெளியே) தெரிவிக்கிறது
Alice (admin) re-adds Bob (banned member)
If she votes for unbanning Bob. To do that, she creates the file in /votes/unban/members/uri_bob/uri_alice (members can be replaced by devices for a device, or invited for invites or admins for admins) and commits
பின்னர் வாக்குகள் தீர்க்கப்பட்டுள்ளதா என்று அவள் சரிபார்க்கிறாள். இதன் பொருள் 50% நிர்வாகிகள் பாப் தடை செய்ய ஒப்புக்கொள்கிறார்கள் (அவள் தனியாக இருந்தால், அது நிச்சயமாக 50% க்கும் அதிகமாக உள்ளது).
வாக்குகள் தீர்க்கப்பட்டால், /votes/unban கோப்புகளை நீக்கலாம், /members, /admins, /invited, /CRLs இல் Bob க்கான அனைத்து கோப்புகளும், மீண்டும் சேர்க்கப்படலாம் (அல்லது /devices இல் மட்டுமே அது தடை செய்யப்படாத சாதனமாக இருந்தால்) மற்றும் repo க்கு அர்ப்பணிக்கப்படலாம்
உரையாடலை நீக்கவும்
convInfos நீக்கப்பட்ட =time::now() (எடுத்து நிறுத்தவும்போல் தொடர்புகளில் சேமிக்கிறது) உரையாடல் நீக்கப்பட்டு மற்ற பயனர்களின் சாதனங்களுடன் ஒத்திசைக்கப்படுகிறது
இப்போது, இந்த உரையாடலுக்கு ஒரு புதிய உறுதிமொழி பெறப்பட்டால் அது புறக்கணிக்கப்படுகிறது
இப்போது, ஜாமி தொடக்க மற்றும் ரெபோ இன்னும் இருக்கும் என்றால், உரையாடல் வாடிக்கையாளர்களுக்கு அறிவிக்கப்படவில்லை
Two cases: a. If no other member in the conversation we can immediately remove the repository b. If still other members, commit that we leave the conversation, and now wait that at least another device sync this message. This avoids the fact that other members will still detect the user as a valid member and still sends new message notifications.
யாரோ ஒத்திசைக்கப்பட்டுள்ளது என்று நாம் உறுதியாக இருக்கும் போது, நீக்கப்பட்டது=time::now() மற்றும் மற்ற பயனர் சாதனங்கள் ஒத்திசைக்க
பயனரின் சொந்தமான அனைத்து சாதனங்களும் இப்போது சேமிப்பகத்தையும் தொடர்புடைய கோப்புகளையும் நீக்க முடியும்
ஒரு பயன்முறையை எவ்வாறு குறிப்பிட வேண்டும்
நேரம் போக்கில் மோட்களை மாற்ற முடியாது. அல்லது இது மற்றொரு உரையாடல். எனவே, இந்த தரவு ஆரம்ப commit செய்தியில் சேமிக்கப்படுகிறது. commit செய்தியில் பின்வருமாறு இருக்கும்ஃ
{
"type": "initial",
"mode": 0,
}
இப்போது, "மாட்" மதிப்புகள் 0 (ONE_TO_ONE), 1 (ADMIN_INVITES_ONLY), 2 (INVITES_ONLY), 3 (PUBLIC) ஏற்றுக்கொள்கிறது
Processes for 1:1 chats
The goal here is to keep the old API (addContact/removeContact, sendTrustRequest/acceptTrustRequest/discardTrustRequest) to create a chat with a peer and its contact. This still implies some changes that we cannot ignore:
செயல்முறை இன்னும் அதே தான், ஒரு கணக்கு addContact வழியாக ஒரு தொடர்பு சேர்க்க முடியும், பின்னர் DHT வழியாக ஒரு TrustRequest அனுப்ப முடியும். ஆனால் இரண்டு மாற்றங்கள் தேவைஃ
TrustRequest ஒரு "conversationId" ஐ உள்ளடக்கியது, இது கோரிக்கையை ஏற்றுக்கொள்வதற்கு போது எந்த உரையாடலை குளோன் செய்ய வேண்டும் என்பதை சக ஊழியருக்கு தெரிவிக்கிறது
TrustRequest மீண்டும் ஆன்லைனில் வரும்போது மீண்டும் முயற்சி செய்யப்படுகிறது. இது இன்று இல்லை (நாம் ஒரு புதிய TrustRequest ஐ உருவாக்க விரும்பவில்லை என்றால், சகாக்கள் முதல் ஒன்றை நிராகரிக்கின்றனர்). எனவே, ஒரு கணக்கு ஒரு நம்பிக்கை கோரிக்கையைப் பெற்றால், தொடர்புடைய உரையாடலுடன் கோரிக்கை நிராகரிக்கப்பட்டால் அது தானாகவே புறக்கணிக்கப்படும் (convRequests ஒத்திசைக்கப்படும்போது)
பின்னர், ஒரு தொடர்பு கோரிக்கையை ஏற்றுக்கொண்டால், ஒரு ஒத்திசைவு காலம் அவசியம், ஏனென்றால் தொடர்பு இப்போது உரையாடலை குளோன் செய்ய வேண்டும்.
removeContact() தொடர்பு மற்றும் தொடர்புடைய 1:1 உரையாடல்களை நீக்குகிறது (அதே செயல்முறையுடன் "ஒரு உரையாடலை நீக்கு"). இங்கே ஒரே குறிப்பு ஒரு தொடர்பு தடை என்றால், நாம் ஒத்திசைவு காத்திருக்க வேண்டாம், நாம் தொடர்புடைய கோப்புகளை நீக்குகிறோம்.
கடினமான சூழ்நிலைகள்
சில சந்தர்ப்பங்களில் இரண்டு உரையாடல்களை உருவாக்க முடியும். இது குறைந்தது இரண்டு சூழ்நிலைகளில் ஒன்றாகும்ஃ
Alice adds Bob.
Bob accepts.
Alice removes Bob.
Alice adds Bob.
அல்லது
Alice adds Bob and Bob adds Alice at the same time, but both are not connected together.
In this case, two conversations are generated. We don't want to remove messages from users or choose one conversation here. So, sometimes two conversations between the same members will be shown. It will generate some bugs during the transition time (as we don't want to break API, the inferred conversation will be one of the two shown conversations, but for now it's "ok-ish", will be fixed when clients will fully handle conversationId for all APIs (calls, file transfer, etc)).
Important
After accepting a conversation's request, there is a time the daemon needs to retrieve the distant repository. During this time, clients MUST show a syncing view to give informations to the user. While syncing:
ConfigurationManager::getConversations() will return the conversation's id even while syncing.
ConfigurationManager::conversationInfos() சமன்பாடு செய்தால் {{"ஒத்திசைவு": "உண்மையானது"}} ஐ திருப்பித் தருகிறது.
ConfigurationManager::getConversationMembers() will return a map of two URIs (the current account and the peer who sent the request).
உரையாடல்கள் விவரக்குறிப்பு கோருகின்றன
உரையாடல் கோரிக்கைகள் பின்வரும் விசைகளுடன் ** வரைபடம்<String, String>** மூலம் குறிப்பிடப்படுகின்றனஃ
id: the conversation ID
from: URI of the sender
பெற்றதுஃ நேர முத்திரை
தலைப்புஃ உரையாடலின் (விருப்ப) பெயர்
விவரம்ஃ (விருப்பம்)
avatar: (optional) the profile picture
உரையாடலின் சுயவிவர ஒத்திசைவு
ஒரு உரையாடலுக்கு பொதுவாக ஒரு தலைப்பு (எ. கா. ஜாமி), ஒரு விளக்கம் (எ. கா. சில இணைப்புகள், திட்டம் என்ன, முதலியன) மற்றும் ஒரு படம் (தொழில் சின்னம்) போன்ற மெட்டாடேட்டாக்கள் தேவை. அந்த மெட்டாடேட்டாக்கள் விருப்பமானவை, ஆனால் அனைத்து உறுப்பினர்களுக்கும் பகிரப்படுகின்றன, எனவே அவை ஒத்திசைக்கப்பட வேண்டும் மற்றும் கோரிக்கைகளில் சேர்க்கப்பட வேண்டும்.
சேமிப்பகத்தில் சேமிப்பு
உரையாடலின் சுயவிவரம் ஒரு பாரம்பரிய vCard கோப்பில் ரூட்டில் (/profile.vcf
) சேமிக்கப்படுகிறதுஃ
BEGIN:VCARD
VERSION:2.1
FN:TITLE
DESCRIPTION:DESC
END:VCARD
ஒத்திசைவு
To update the vCard, a user with enough permissions (by default: =ADMIN) needs to edit /profile.vcf
and will commit the file with the mimetype application/update-profile
.
The new message is sent via the same mechanism and all peers will receive the MessageReceived signal from the daemon.
The branch is dropped if the commit contains other files or too big or if done by a non-authorized member (by default: <ADMIN).
கடைசியாக காட்டப்பட்டது
ஒத்திசைக்கப்பட்ட தரவுகளில், ஒவ்வொரு சாதனமும் மற்ற சாதனங்களுக்கு உரையாடல்களின் நிலையை அனுப்புகிறது. இந்த நிலையில், கடைசியாக காண்பிக்கப்படும் ஒன்று அனுப்பப்படுகிறது. இருப்பினும், ஒவ்வொரு சாதனமும் ஒவ்வொரு உரையாடலுக்கும் அதன் சொந்த நிலையைக் கொண்டிருக்கலாம், மேலும் ஒரு கட்டத்தில் அதே கடைசி உறுதிப்படுத்தல் இல்லாமல் இருக்கலாம், பல சூழ்நிலைகள் கணக்கில் எடுத்துக்கொள்ளப்பட வேண்டும்ஃ
5 சூழ்நிலைகள் ஆதரிக்கப்படுகின்றனஃ
மற்ற சாதனங்களால் அனுப்பப்பட்ட கடைசி காட்சி தற்போதைய காட்சிக்கு ஒத்ததாக இருந்தால், எதுவும் செய்ய முடியாது.
தற்போதைய சாதனத்திற்கு கடைசியாக காண்பிக்கப்படாவிட்டால், தொலைநிலை காண்பிக்கப்படும் செய்தியைப் பயன்படுத்துகிறது.
கடைசியாக காட்டப்பட்ட தொலைநிலை ரெபோவில் இல்லை என்றால், அது பின்னர் மீட் வர வேண்டும் என்று அர்த்தம், எனவே காஷ் விளைவு
தொலைநிலை ஏற்கனவே வரப்பட்டிருந்தால், அதை மாற்ற கடைசியாக காட்டப்பட்ட உள்ளூர் வரலாற்றில் முன்னதாக இருப்பதை சரிபார்க்கிறோம்
இறுதியாக, அதே ஆசிரியரிடமிருந்து ஒரு செய்தி அறிவிக்கப்பட்டால், கடைசியாக காட்டப்பட்டதை நாங்கள் புதுப்பிக்க வேண்டும் என்று அர்த்தம்.
விருப்பங்கள்
ஒவ்வொரு உரையாடலுக்கும் பயனரால் அமைக்கப்பட்ட விருப்பத்தேர்வுகள் இணைக்கப்பட்டுள்ளன. அந்த விருப்பத்தேர்வுகள் பயனரின் சாதனங்களில் ஒத்திசைக்கப்படுகின்றன. பயனர் அறிவிப்புகளை புறக்கணிக்க விரும்பினால் உரையாடலின் நிறம் இதுவாக இருக்கலாம், கோப்பு பரிமாற்ற அளவு வரம்பு போன்றவை. இப்போதைக்கு, அங்கீகரிக்கப்பட்ட விசைகள்ஃ
"color" - the color of the conversation (#RRGGBB format)
"அறிவிப்புகளை புறக்கணிக்கவும்" - இந்த உரையாடலில் புதிய செய்திகளுக்கான அறிவிப்புகளை புறக்கணிக்கவும்
"சிம்போல்" - ஒரு இயல்புநிலை ஈமோஜி வரையறுக்க.
இந்த விருப்பத்தேர்வுகள் MapStringString தொகுப்பில் சேமிக்கப்படுகின்றன, accountDir/conversation_data/conversationId/preferences
இல் சேமிக்கப்படுகின்றன, மேலும் ஒரே பயனரின் சாதனங்களுக்கு மட்டுமே SyncMsg வழியாக அனுப்பப்படுகின்றன.
விருப்பங்களுடன் தொடர்பு கொள்ளும் API:
// Update preferences
void setConversationPreferences(const std::string& accountId,
const std::string& conversationId,
const std::map<std::string, std::string>& prefs);
// Retrieve preferences
std::map<std::string, std::string> getConversationPreferences(const std::string& accountId,
const std::string& conversationId);
// Emitted when preferences are updated (via setConversationPreferences or by syncing with other devices)
struct ConversationPreferencesUpdated
{
constexpr static const char* name = "ConversationPreferencesUpdated";
using cb_type = void(const std::string& /*accountId*/,
const std::string& /*conversationId*/,
std::map<std::string, std::string> /*preferences*/);
};
இணைப்பு மோதல் மேலாண்மை
இரண்டு நிர்வாகிகள் ஒரே நேரத்தில் விவரத்தை மாற்ற முடியும் என்பதால், profile.vcf
இல் ஒரு இணைப்பு மோதல் ஏற்படலாம். இந்த வழக்கில், அதிக ஹாஷுடன் (எ. கா. ffffff > 000000) commit தேர்ந்தெடுக்கப்படும்.
ஏபிஐகள்
உரையாடலின் மெட்டாடேட்டாவைப் பெறுவதற்கும் அமைப்பதற்கும் பயனர் இரண்டு முறைகளைப் பெற்றார்ஃ
<method name="updateConversationInfos" tp:name-for-bindings="updateConversationInfos">
<tp:added version="10.0.0"/>
<tp:docstring>
Update conversation's infos (supported keys: title, description, avatar)
</tp:docstring>
<arg type="s" name="accountId" direction="in"/>
<arg type="s" name="conversationId" direction="in"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="VectorMapStringString"/>
<arg type="a{ss}" name="infos" direction="in"/>
</method>
<method name="conversationInfos" tp:name-for-bindings="conversationInfos">
<tp:added version="10.0.0"/>
<tp:docstring>
Get conversation's infos (mode, title, description, avatar)
</tp:docstring>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="VectorMapStringString"/>
<arg type="a{ss}" name="infos" direction="out"/>
<arg type="s" name="accountId" direction="in"/>
<arg type="s" name="conversationId" direction="in"/>
</method>
அங்கு info
என்பது பின்வரும் விசைகளுடன் map<str, str>
ஆகும்ஃ
முறைஃ வாசிப்பு மட்டும்
தலைப்பு
விவரம்
avatar: the profile picture
கணக்கை மீண்டும் இறக்குமதி செய்யவும் (இணைப்பு/ஏற்றுமதி)
ஒரு மீள் இறக்குமதி செய்யப்பட்ட பிறகு புதிய கமிட்டுகளில் உரையாடல்களை மீட்டெடுக்க காப்பகத்தில் உரையாடல் ID இருக்க வேண்டும் (ஏனென்றால் இந்த நேரத்தில் அழைப்பு இல்லை). ஒரு உரையாடலுக்கு ஒரு கமிட் வந்தால் இரு சாத்தியங்கள் உள்ளனஃ
உரையாடல் அங்கு உள்ளது, இந்த வழக்கில், டேமன் இந்த உரையாடலை மீண்டும் குளோன் செய்ய முடியும்
உரையாடல்Id காணாமல் போய்விட்டது, எனவே டேமன் (ஒரு செய்தியை
{{"பயன்பாடு/அழைப்பு", உரையாடல்Id}}
) பயனர் (மீண்டும்) ஏற்றுக்கொள்ள வேண்டிய புதிய அழைப்பைக் கேட்கிறது
Important
A conversation can only be retrieved if a contact or another device is there, else it will be lost. There is no magic.
பயன்படுத்தப்பட்ட நெறிமுறைகள்
கிட்
ஏன் இந்த தேர்வு
Each conversation will be a Git repository. This choice is motivated by:
நாம் செய்திகளை ஒத்திசைக்க வேண்டும். மெர்கல் மரம் அதைச் செய்ய சரியான கட்டமைப்பு மற்றும் கிளைகளை இணைப்பதன் மூலம் நேரியல் செய்ய முடியும். மேலும், அது Git மூலம் பரவலாகப் பயன்படுத்தப்படுகிறது, அது சாதனங்கள் இடையே ஒத்திசைக்க எளிதானது.
இயற்கையால் விநியோகிக்கப்படுகிறது, பரவலாகப் பயன்படுத்தப்படுகிறது, நிறைய பின்னணிகள் மற்றும் இணைப்பு.
ஹூக்க்கள் மற்றும் பரவலாக பயன்படுத்தப்படும் கிரிப்டோ மூலம் கடமைகளை சரிபார்க்க முடியும்
தேவைப்பட்டால் தரவுத்தளத்தில் சேமிக்க முடியும்
கோப்புகளை அல்ல, கமிண்ட் செய்தியை பயன்படுத்தி மோதல்களைத் தவிர்க்கலாம்.
நாம் சரிபார்க்க வேண்டியது
git.lock
குறைந்ததாக இருக்கலாம்libgit2 இல் கக்கிகள்
ஒரே நேரத்தில் பல இழுத்து?
வரம்புகள்
வரலாற்றை நீக்க முடியாது. உரையாடலை நீக்க, சாதனம் உரையாடலை விட்டு வெளியேறி மற்றொரு உரையாடலை உருவாக்க வேண்டும்.
இருப்பினும், நிரந்தரமற்ற செய்திகளை (ஒரு சில நிமிடங்களுக்கு மட்டுமே படிக்கக்கூடிய செய்திகள் போன்றவை) DRT வழியாக ஒரு சிறப்பு செய்தியை (டியப்பிங் அல்லது வாசிப்பு அறிவிப்புகள் போன்றவை) வழியாக அனுப்பலாம்.
கட்டமைப்பு
/
- invited
- admins (public keys)
- members (public keys)
- devices (certificates of authors to verify commits)
- banned
- devices
- invited
- admins
- members
- votes
- ban
- members
- uri
- uriAdmin
- devices
- uri
- uriAdmin
- unban
- members
- uri
- uriAdmin
- CRLs
கோப்பு பரிமாற்றம்
This new system overhauls file sharing: the entire history is now kept in sync, so any device in the conversation can instantly access past files. Rather than forcing the sender to push files directly—an approach that was fragile in the face of connection drops and often required manual retries—devices simply download files when they need them. Moreover, once one device has downloaded a file, it can act as a host for others, ensuring files remain available even if the original sender goes offline.
நெறிமுறை
அனுப்புநர் உரையாடலில் புதிய ஒரு commit ஐ பின்வரும் வடிவத்தில் சேர்க்கிறார்ஃ
value["tid"] = "RANDOMID";
value["displayName"] = "DISPLAYNAME";
value["totalSize"] = "SIZE OF THE FILE";
value["sha3sum"] = "SHA3SUM OF THE FILE";
value["type"] = "application/data-transfer+json";
மற்றும் ${data_path}/conversation_data/${conversation_id}/${file_id}
இல் ஒரு இணைப்பை உருவாக்குகிறது, அங்கு file_id=${commitid}_${value["கட்டணம்"]}.${extension}
பின்னர், பெறுநர் இப்போது கோப்பை ஹோஸ்டிங் செய்யும் சாதனங்களை தொடர்புகொண்டு கோப்பைப் பதிவிறக்கம் செய்யலாம் name="data-transfer://" + conversationId + "/" + currentDeviceId() + "/" + fileId
மற்றும் கோப்பு காத்திருக்கும் தகவலை ${data_path}/conversation_data/${conversation_id}/waiting
இணைப்பைப் பெறும் சாதனம் கோப்பு அனுப்பப்பட முடியுமா என்பதை சரிபார்க்கும் (sha3sum சரியானதா மற்றும் கோப்பு இருந்தால்). முதல் திறக்கப்பட்ட சேனலைப் பெறுநர் வைத்திருப்பார், மற்றவற்றை மூடுவார் மற்றும் அனுப்பும் நபருடன் ஒரே பாதையில் ( ${data_path}/conversation_data/${conversation_id}/${file_id}
) அனைத்து வருகும் தரவையும் கோப்பிற்கு எழுதுவார்.
பரிமாற்றம் முடிந்தவுடன் அல்லது சேனல் மூடப்பட்டால், கோப்பு சரியானதா என்பதை சரிபார்க்க sha3sum சரிபார்க்கப்படுகிறது (அல்லது அது நீக்கப்படுகிறது). செல்லுபடியாகும் என்றால், கோப்பு காத்திருப்பிலிருந்து அகற்றப்படும்.
தோல்வி ஏற்பட்டால், உரையாடலின் சாதனம் மீண்டும் ஆன்லைனில் இருக்கும்போது, காத்திருக்கும் அனைத்து கோப்புகளையும் அதே வழியில் கேட்கலாம்.
Call in Swarm
யோசனை
A swarm conversation can have multiple rendez-vous. A rendez-vous is defined by the following URI:
"accountUri/deviceId/conversationId/confId" கணக்குUri/deviceId ஹோஸ்டை விவரிக்கும் போது.
இரண்டு வழிகளில் புரவலன் தீர்மானிக்கப்படலாம்ஃ
In the swarm metadatas. Where it's stored like the title/desc/avatar (profile picture) of the room
அல்லது ஆரம்ப அழைப்பாளர்.
When starting a call, the host will add a new commit to the repository, with the URI to join (accountUri/deviceId/conversationId/confId). This will be valid till the end of the call (announced by a commit with the duration to show)
எனவே ஒவ்வொரு பகுதியும் அழைப்பு தொடங்கியதாக தகவல் பெறுவார்கள், அதை அழைப்பதன் மூலம் அதை சேர்க்க முடியும்.
தாக்குதல்கள்?
Avoid Git bombs
குறிப்புகள்
ஒரு கமிட்டின் நேர முத்திரை நம்பக்கூடியது ஏனெனில் அது திருத்தக்கூடியது. பயனரின் நேர முத்திரை மட்டுமே நம்பக்கூடியது.
TLS
Git செயல்பாடுகள், கட்டுப்பாட்டு செய்திகள், கோப்புகள் மற்றும் பிற விஷயங்கள் P2p TLS v1.3 இணைப்பைப் பயன்படுத்துகின்றன. PFS ஐ உறுதிப்படுத்தும் குறியீடுகளுடன் மட்டுமே. எனவே ஒவ்வொரு புதிய இணைப்பிற்கும் ஒவ்வொரு விசை மீண்டும் பேச்சுவார்த்தை நடத்துகிறது.
DHT (UDP)
மொபைல்களுக்கு செய்திகளை அனுப்பவும் (புஷ் அறிவிப்புகளைத் தூண்டவும்) மற்றும் TCP இணைப்புகளைத் தொடங்கவும் பயன்படுத்தப்படுகிறது.
நெட்வொர்க் செயல்பாடு
யாரையாவது அழைக்கும் செயல்முறை
ஆலிஸ் போப் அழைக்க விரும்புகிறார்ஃ
ஆலிஸ் பேச்சுக்கு போப் சேர்க்கிறது
Alice generates an invite: { "application/invite+json" : { "conversationId": "$id", "members": [{...}] }}
செய்தி அனுப்ப இரண்டு சாத்தியங்கள் a. இணைக்கப்படவில்லை என்றால், DHT b. வேறு, அலீஸ் SIP சேனல் அனுப்பும்
Bob a. அழைப்பைப் பெறுகிறது, ஒரு சமிக்ஞை கிளையண்டுக்கு அனுப்பப்படுகிறது b. இணைக்கப்படவில்லை, எனவே கோரிக்கையை ஒருபோதும் பெறாது ஏனெனில் ஆலிஸ் பாப் ஆலிஸை புறக்கணித்தாரா அல்லது தடுக்கவில்லையா என்பதை அறியக்கூடாது. ஒரே வழி ஒரு புதிய அழைப்பை புதிய செய்தியின் மூலம் புதுப்பிக்க வேண்டும் (பார்க்க அடுத்த காட்சி)
ஒருவருக்கு ஒரு செய்தியை அனுப்பும் செயல்முறை
ஆலிஸ் போப் ஒரு செய்தியை அனுப்ப வேண்டும்ஃ
அலிஸ் ஒரு செய்தியை ரெபோவில் சேர்க்கிறது, அடையாளங்காட்டி
அலிஸ் ஒரு செய்தியை பெறுகிறது (அவள் இருந்து) வெற்றிகரமாக இருந்தால்
இரண்டு சாத்தியங்கள், அலிஸ் மற்றும் பாப் இணைக்கப்பட்டுள்ளன அல்லது இல்லை. இரு சந்தர்ப்பங்களிலும் ஒரு செய்தி உருவாக்கப்படுகிறதுஃ { "பயன்பாடு/இம்-ஜிட்மெசேஜ்-ஐடி" : "{"ஐடி":"\(கன்விட்", "கட்டமைக்க":"\)கமிட்ஐடி", "சாதன ஐடி": "$alice_சாதன_ஹாஷ்"}"}.
பாப் நான்கு சாத்தியங்கள்ஃ a. பாப் ஆலிஸுடன் இணைக்கப்படவில்லை, எனவே அவர் ஆலிஸை நம்பினால், புதிய இணைப்பைக் கோருங்கள், b. b க்குச் செல்லுங்கள். இணைக்கப்பட்டால், ஆலிஸிடமிருந்து அழைத்து புதிய செய்திகளை அறிவிக்கவும் c. பாப் அந்த உரையாடலை அறியவில்லை. அந்த உரையாடலை ஏற்க முடிவதற்கு முதலில் DHT வழியாக அழைப்பைப் பெற கேளுங்கள் ({"பயன்பாடு / அழைப்பு", உரையாடல்Id}) d. பாப் இணைக்கப்படவில்லை (வலைப்பு இல்லை, அல்லது மூடப்பட்டது). அவர் புதிய செய்தியைப் பெற மாட்டார், ஆனால் அடுத்த இணைப்பு நிகழும் போது ஒத்திசைக்க முயற்சிப்பார்
நடைமுறைப்படுத்தல்
! [அட்டவணைஃ குவியல் அரட்டை வகுப்புகள்](படங்கள்/குவியல் அரட்டை-வகுப்புகள்-அட்டவணை.jpg)
Supported messages
Initial message
{
"type": "initial",
"mode": 0,
"invited": "URI"
}
Represents the first commit of a repository and contains the mode:
enum class ConversationMode : int { ONE_TO_ONE = 0, ADMIN_INVITES_ONLY, INVITES_ONLY, PUBLIC }
and invited
if mode = 0.
Text message
{
"type": "text/plain",
"body": "content",
"react-to": "id (optional)"
}
Or for an edition:
{
"type": "application/edited-message",
"body": "content",
"edit": "id of the edited commit"
}
அழைப்புகள்
Show the end of a call (duration in milliseconds):
{
"type": "application/call-history+json",
"to": "URI",
"duration": "3000"
}
Or for hosting a call in a group (when it starts)
{
"type": "application/call-history+json",
"uri": "host URI",
"device": "device of the host",
"confId": "hosted confId"
}
A second commit with the same JSON + duration
is added at the end of the call when hosted.
Add a file
{
"type": "application/data-transfer+json",
"tid": "unique identifier of the file",
"displayName": "File name",
"totalSize": "3000",
"sha3sum": "a sha3 sum"
}
totalSize
is in bits,
Updating profile
{
"type": "application/update-profile",
}
Member event
{
"type": "member",
"uri": "member URI",
"action": "add/join/remove/ban"
}
When a member is invited, join or leave or is kicked from a conversation
Vote event
Generated by administrators to add a vote for kicking or un-kicking someone.
{
"type": "vote",
"uri": "member URI",
"action": "ban/unban"
}
**!! பழைய வரைவு!
Note
Following notes are not organized yet. Just some line of thoughts.
கிரிப்டோ மேம்பாடுகள்.
ஒரு தீவிர குழு அரட்டை அம்சத்திற்காக, எங்களுக்கு தீவிர கிரிப்டோவும் தேவை. தற்போதைய வடிவமைப்பில், உரையாடலின் முந்தைய DHT மதிப்புகளாக ஒரு சான்றிதழ் திருடப்பட்டால், உரையாடலைக் குறியாக்கம் செய்யலாம். ஒருவேளை நாம் ** இரட்டை ரட்செட் ** போன்ற ஏதாவது செல்ல வேண்டும்.
Note
A lib might exist to implement group conversations.
OpenDHT இல் ECC ஆதரவு தேவை
பயன்பாடு
வேடங்களை சேர்க்க?
குழு அரட்டைகளுக்கு இரண்டு முக்கிய பயன்பாட்டு வழக்குகள் உள்ளனஃ
ஒரு நிறுவனத்தில் ஒரு Mattermost போன்றது, தனியார் சேனல்கள், மற்றும் சில பாத்திரங்கள் (நிர்வாக / பார்வையாளர் / போட் / முதலியன) அல்லது கல்வி (மற்றும் சில மட்டுமே செயலில் இருக்கும்).
நண்பர்கள் இடையே உரையாடல் போன்ற கிடைமட்ட உரையாடல்கள்.
Jami will be for which one?
நடைமுறைப்படுத்தல் யோசனை
ஒரு பாத்திரத்திற்கான கொடியுடன் பயனரை பதிவு செய்யும் குழுவிற்கு ஒரு சான்றிதழ். சேர்க்கல் அல்லது திரும்பப் பெறுதல் ஆகியவை செய்யப்படலாம்.
ஒரு உரையாடலுக்கு சேரவும்
நேரடி அழைப்பின் மூலமே
ஒரு இணைப்பு/QR குறியீடு/எதுவாக இருந்தாலும்
ஒரு அறை பெயர் மூலம்?
நமக்குத் தேவையானது
இரகசியம்ஃ குழு அரட்டைக்கு வெளியே உள்ள உறுப்பினர்கள் குழுவில் உள்ள செய்திகளை படிக்க முடியாது
முன்னோக்கி இரகசியம்ஃ குழுவிலிருந்து எந்த ஒரு திறவுகோலும் பாதிக்கப்பட்டால், முந்தைய செய்திகள் இரகசியமாக (எவ்வளவு முடியுமோ அவ்வளவு) இருக்க வேண்டும்
செய்திகளை ஒழுங்குபடுத்துதல்ஃ சரியான வரிசையில் செய்திகள் இருக்க வேண்டும்
ஒத்திசைவுஃ எல்லா செய்திகளும் விரைவில் கிடைப்பதை உறுதி செய்ய வேண்டும்.
தொடர்ச்சியாகஃ உண்மையில், DHT இல் உள்ள ஒரு செய்தி 10 நிமிடங்கள் மட்டுமே வாழும். ஏனெனில் இது இந்த வகை DHT க்கு கணக்கிடப்பட்ட சிறந்த நேரம். தரவுகளை நிலைநிறுத்த, முனை ஒவ்வொரு 10 நிமிடங்களுக்கும் DHT இல் மதிப்பை மீண்டும் வைக்க வேண்டும். முனை ஆஃப்லைனில் இருக்கும்போது செய்ய மற்றொரு வழி முனைகள் தரவை மீண்டும் வைக்க அனுமதிக்க வேண்டும். ஆனால், 10 நிமிடங்களுக்குப் பிறகு, 8 முனைகள் இன்னும் இங்கே இருந்தால், அவை 64 கோரிக்கைகளைச் செய்யும் (இது அதிவேகமானது). அதற்காக ஸ்பேமிங்கைத் தவிர்ப்பதற்கான தற்போதைய வழி வினவல். இது இன்னும் 64 கோரிக்கைகளைச் செய்யும் ஆனால் அதிகபட்ச redundancy ஐ 8 முனைகளுக்குக் கட்டுப்படுத்துகிறது.
பிற விநியோக வழிகள்
ஐபிஎஃப்எஸ்ஃ சில விசாரணைகள் தேவை
BitMessage: சில விசாரணைகள் தேவை
பணிப்பெண் பாதுகாப்புஃ சில விசாரணைகள் தேவை
தற்போதுள்ள பணிகளின் அடிப்படையில்
குழு அரட்டை பல சாதனங்களுக்கான அதே வேலையை அடிப்படையாகக் கொண்டிருக்கலாம் (ஆனால் இங்கே, குழு சான்றிதழுடன்). தீர்க்க வேண்டிய சிக்கல்கள்ஃ
வரலாறு ஒத்திசைவு. இது தரவுத்தளத்தை கிளையண்டிலிருந்து டேமன் வரை நகர்த்த வேண்டும்.
யாரும் இணைக்கப்படாவிட்டால், ஒத்திசைவு செய்ய முடியாது, அந்த நபர் உரையாடலைப் பார்க்க மாட்டார்
மற்றொரு அர்ப்பணிக்கப்பட்ட DHT
ஒரு DHT ஒரு superuser கொண்டு.
What's next for file transfers
Currently, the file transfer algorithm is based on a TURN connection (See கோப்பு பரிமாற்றம்). In the case of a big group, this will be bad. We first need a P2P connection for the file transfer. Implement the RFC for P2P transfer.
Other problem: currently there is no implementation for TCP support for ICE in PJSIP. This is mandatory for this point (in PJSIP or homemade)