패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.2.0+1

hlc_dart

논문 "글로벌 분산 데이터베이스에서의 논리적 물리 시계 및 일관된 스냅샷"을 기반으로 한 Dart 하이브리드 로직 시계 구현.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
637
좋아요
5
Pub 점수
160

패키지 설치

flutter pub add hlc_dart

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

HLC_Dart는 분산 시스템에서 인과적으로 일관된 타임스탬프를 제공하기 위해 설계된 하이브리드 논리 시계(HLC)의 Dart 구현입니다. 논리적 물리 시계에 관한 논문을 영감으로 삼아, 논리적 시간과 물리적 시간의 장점을 결합하여 글로벌하게 분산된 데이터베이스에서 강력한 일관성을 보장합니다. HLC_Dart는 이벤트의 정확한 순서를 유지하면서 실제 세계 시간과 동기화를 유지할 수 있어, CRDT 및 분산 레거시에 이상적입니다. 이 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원합니다.

사용 사례

  • 분산 데이터베이스 타임스탬프
  • CRDT 충돌 해결
  • 마이크로서비스 내 전역 이벤트 순서
  • 복제된 시스템에서 일관성 있는 스냅샷
  • 실시간 협업 애플리케이션

주요 기능

  • 하이브리드 논리-물리적 시간 동기화
  • 노드 간 인과 일관성
  • 저지연 시간스탬프 생성
  • 크로스 플랫폼 지원
  • CRDT와의 통합

적합한 대상

  • 분산 시스템을 구축하는 개발자
  • 데이터 일관성을 위해 CRDT를 사용하는 팀
  • 전역 이벤트 순서가 필요한 응용 프로그램
  • 다중 영역 배포에서의 백엔드 서비스

고려 사항

  • 시계 드리프트를 신중하게 다뤄야 합니다
  • 고정밀 시간 측정 요구 사항에 부적합합니다
  • 정확한 시스템 시간 소스에 의존합니다
  • 에지 케이스에서는 네트워크 조정이 필요할 수 있습니다
  • 안정적인 네트워크 연결 환경에서 가장 잘 사용됩니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

CRDT

github_starts melos_badge repo_size

logo

docs_badge

Apps

Packages

Roadmap

A roadmap is available in the project page. The roadmap provides a high-level overview of the project's goals and the current status of the project.

Workspace structure

This repository is a workspace that contains multiple packages and apps. Consistency is granted by the melos tool.

Melos

Melos (pub.dev) is a CLI tool for Dart/Flutter monorepos. It links the local packages together, so every package can depend on the others without publishing them first, and it runs the same command over all of them (format, analyze, test, publish, ...).

Every shared command lives in melos.yaml and runs with melos run <script>:

Script What it does
format formats the code (80 characters per line)
analyze runs the analyzer with warnings and infos as errors
test / test_flutter / test_chrome runs the Dart, Flutter and web tests
benchmark runs the benchmarks of every package with a benchmarks/ folder
devtools_build builds the DevTools extension
docs_bs / docs_build bootstraps and builds the documentation site
update_references propagates package/app references into the READMEs
Setup

The Flutter SDK is pinned with fvm, and the documentation site is a Docusaurus project, so Node.js (with npm) is required too.

fvm install                     # installs the pinned Flutter SDK
fvm dart pub get                # resolves the workspace tools (melos included)
fvm dart run melos bootstrap    # links the packages and prepares the examples
fvm dart run melos run docs_bs  # optional: installs the documentation site (needs Node.js)

Note Melos is a dev_dependency of the root pubspec.yaml, so running it as fvm dart run melos ... is the safest option: you use the melos version pinned by this repository, with the Flutter/Dart SDK pinned by fvm. A globally activated melos (dart pub global activate melos) works as well, but it may be a different version than the one the workspace expects, and the difference usually shows up at the worst possible moment 🙃.

A command is provided to try to publish all packages:

fvm dart run melos publish --dry-run

This ensures that every package is formatted, analyzed, tested and built.

Organization

The repository structure is organized as follows:

workspace/
├── melos.yaml # melos configuration file
├── packages/ # contains every package of the workspace
│   ├── core/ # the CRDT engine and its bindings
│   │   ├── crdt_lf/
│   │   │   ├── lib/
│   │   │   ├── example/
│   │   │   └── flutter_example/
│   │   └── .../
│   ├── adapters/
│   │   └── persistence/ # storage backends for crdt_lf
│   │       ├── crdt_lf_drift/
│   │       ├── crdt_lf_hive/
│   │       └── crdt_lf_sqlite/
│   └── _internal/ # private, unpublished packages
│       ├── benchmark_infrastructure/
│       └── shared_examples_infrastructure/
├── apps/ # contains the applications built on top of the packages
│   └── greyhound_markdown/
│       ├── client/
│       └── server/
├── docs/ # the documentation site (Docusaurus, Node.js project)
├── scripts/ # dart scripts used by the melos commands
└── assets/ # contains the assets used in the documentation
    └── .../
VS Code

If you work with VS Code, the repository already contains a .vscode folder with:

  • the recommended extensions (Dart, Flutter, Melos, Mermaid);
  • the settings (fvm SDK path, project dictionary for the spell checker);
  • the launch configurations for the apps and the examples;
  • the snippets used in the READMEs and the changelogs.

Accepting the recommended extensions gives you the smoothest experience on this workspace.

Contributing

Contributions are welcome: bug fixes, new features, documentation, performance work, or anything else — a fixed typo counts too 💚.

The whole flow (roadmap, issues, pull requests, AI-assisted work) is described in CONTRIBUTING.md. Please read it before opening an issue or a pull request.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.