पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv5.1.3

crdt

कॉन्फ्लिक्ट-फ्री रिप्लिकेटेड डेटा टाइप्स (CRDTs) का डार्ट इम्प्लीमेंटेशन।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
2.6 हज़ार
लाइक
83
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add crdt

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

कॉन्फ्लिक्ट-फ्री रिप्लिकेटेड डेटा टाइप्स (CRDTs) का एक डार्ट इम्प्लीमेंटेशन, जो निर्देशन के बिना वितरित प्रणालियों में सुसंगत, तत्काल सहयोग की अनुमति देता है। CRDTs नेटवर्क विभाजन या समकालिक अद्यतन की उपस्थिति में भी डेटा अभिसरण सुनिश्चित करते हैं, जिससे यह साझा दस्तावेज़, लाइव डैशबोर्ड और बहु-खिलाड़ी खेल जैसे सहयोगी एप्लिकेशन के लिए आदर्श हैं। पैकेज कई प्लेटफॉर्म जैसे मोबाइल, वेब और डेस्कटॉप को समर्थन देता है, जिससे प्लेटफॉर्म के बीच सुसंगतता सुनिश्चित होती है।

उपयोग

  • रियल-टाइम सहयोगात्मक संपादन
  • वितरित अवस्था समन्वय
  • ऑफलाइन-प्रथम एप्लिकेशंस
  • मल्टीप्लेयर गेम स्टेट प्रबंधन
  • लाइव डैशबोर्ड अपडेट

मुख्य विशेषताएँ

  • टकराव-मुक्त डेटा संगति
  • बहुत अधिक CRDT प्रकारों का समर्थन
  • क्रॉस-प्लेटफॉर्म संगतता
  • कम देरी वाले अपडेट
  • केंद्रीय समन्वय की आवश्यकता नहीं है

इनके लिए उपयुक्त

  • वास्तविक समय एप्लिकेशन बना रहे डेवलपर्स
  • ऑफलाइन-प्रथम कार्यक्षमता की आवश्यकता वाली टीमें
  • वितरित उपयोगकर्ताओं वाले अनुप्रयोग
  • ताकत के साथ एक संगठनात्मक उपकरण
  • अविश्वसनीय नेटवर्क कंडीशन वाले सिस्टम

विचार योग्य बातें

  • CRDT सिद्धांतों के बारे में समझने की आवश्यकता है
  • प्रतिलिपि के कारण डेटा का आकार बढ़ सकता है
  • उच्च आवृत्ति परमाणु संचालन के लिए उपयुक्त नहीं
  • विशिष्ट डेटा संरचनाओं तक सीमित
  • प्रदर्शन डेटा की जटिलता पर निर्भर करता है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Dart implementation of Conflict-free Replicated Data Types (CRDTs).

This project is heavily influenced by James Long's talk CRTDs for Mortals and includes a Dart-native implementation of Hybrid Local Clocks (HLC) based on the paper Logical Physical Clocks and Consistent Snapshots in Globally Distributed Databases (pdf).

It has minimal external dependencies, so it should run anywhere where Dart runs, which is pretty much everywhere.

The Crdt class implements CRDT conflict resolution and serves as a storage-agnostic interface for specific implementations. Als included with this package is MapCrdt, an ephemeral implementation using Dart HashMaps.

Other implementations include (so far):

  • hive_crdt, a no-sql implementation using Hive as persistent storage.
  • sql_crdt, an abstract implementation for using relational databases as a data storage backend.
  • sqlite_crdt, an implementation using Sqlite for storage, useful for mobile or small projects.
  • postgres_crdt, a sql_crdt that benefits from PostgreSQL's performance and scalability intended for backend applications.

See also crdt_sync, a turnkey approach for real-time network synchronization of Crdt nodes.

Usage

The simplest way to experiment with this package is to use the provided MapCrdt implementation:

import 'package:crdt/map_crdt.dart';

void main() {
  var crdt1 = MapCrdt(['table']);
  var crdt2 = MapCrdt(['table']);

  print('Inserting 2 records in crdt1…');
  crdt1.put('table', 'a', 1);
  crdt1.put('table', 'b', 1);

  print('crdt1: ${crdt1.getMap('table')}');

  print('\nInserting a conflicting record in crdt2…');
  crdt2.put('table', 'a', 2);

  print('crdt2: ${crdt2.getMap('table')}');

  print('\nMerging crdt2 into crdt1…');
  crdt1.merge(crdt2.getChangeset());

  print('crdt1: ${crdt1.getMap('table')}');
}

Implementations

crdt is currently helping build local-first experiences for:

  • Libra a weigh management app with 1M+ installs.
  • tudo an open-source simple to-do app + backend.

Are you using this package in your project? Let me know!

Features and bugs

Please file feature requests and bugs at the issue tracker.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 2 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।