Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RepoSync
Search
cateiru
July 09, 2021
Education
0
30
RepoSync
https://github.com/yuto51942/netpro-project
cateiru
July 09, 2021
Tweet
Share
More Decks by cateiru
See All by cateiru
社内の開発便利ツールを作った話 / サブカル業界Developers 勉強会Vol.6
cateiru
0
370
QUICについて調べた
cateiru
0
69
Other Decks in Education
See All in Education
Tangible, Embedded and Embodied Interaction - Lecture 7 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.2k
2024年度春学期 統計学 第1回 イントロダクションー統計的なものの見方・考え方について (2024. 4. 11)
akiraasano
PRO
1
120
「小・中・高等学校における情報教育の体系的な学習を目指したカリキュラムモデル基本方針」
codeforeveryone
0
1.5k
Interaction - Lecture 10 - Information Visualisation (4019538FNR)
signer
PRO
0
1.4k
心房細動週間ポスター(2024年3月6日)
japanstrokeassociation
0
300
week4@tcue2024
nonxxxizm
0
420
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
180
Educación digital en la adolescencia
gonz1ale1
0
130
Sähköiset kyselyt, kokeet ja arviointi
matleenalaakso
1
16k
6 занятие. Четыре тактики метода "8 кубиков"бизнес-модели #ideaNN 1.03.2024.
karlov
0
160
Switches
irocho
0
200
Design Guidelines and Principles - Lecture 7 - Information Visualisation (4019538FNR)
signer
PRO
0
1.7k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
33
13k
It's Worth the Effort
3n
180
27k
Unsuck your backbone
ammeep
664
57k
Designing for humans not robots
tammielis
247
25k
Optimising Largest Contentful Paint
csswizardry
13
2.4k
Making the Leap to Tech Lead
cromwellryan
125
8.6k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Designing Experiences People Love
moore
136
23k
Teambox: Starting and Learning
jrom
128
8.4k
Designing with Data
zakiwarfel
96
4.8k
Faster Mobile Websites
deanohume
300
30k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
Transcript
Repo Sync
どういうもの? • 複数クライアントとファイルをリアルタイム同期するやつ • Gitの仕組みを利用することで変更を戻すことができる • ソケット通信を使用することでプライベートネットワーク間で通信 • 使いやすいCLI •
Python & Rust製 ↓ HackMDやGoogle DocのCLI、ソケット通信ver.
使用言語 • 更新確認、履歴管理 ◦ Rust • 通信、cli ◦ Python
動作説明1 依存関係のインストールとビルド • ./build.shでRustのビルド(cargoが必要) • pipenv installでPythonの依存関係インストール(pipenvが必要)
動作説明2 サーバーの起動 • pipenv shellでPythonの仮想環境へ • repo-server --port=8080 -a localhost
でも可
動作説明3 クライアントの起動 • repo-syncで、ファイルパス、ポート、サーバーのアドレスを入力
動作説明4 変更履歴の表示 • repo-git showで履歴表示 • --pager false とすることでpager無しになる
動作説明5 Revert • repo-git applyで履歴のハッシュ値と適用するファイルパスを指定
動作例(うまく動かなかったとき用)
アピールポイント • コア部分(ファイル更新確認、履歴保存)をRustで書く →パフォーマンス向上 • Gitの仕組みを参考に更新履歴を保存する →間違えて保存したときなどに任意の場所に戻せる
シーケンス図 サーバー側
シーケンス図 クライアント側
開発形態、使用ツール • GitHub ◦ CI/CD: GitHub actions ◦ GitHub flow
• Rust ◦ cargo ◦ PyO3 • Python ◦ tox ◦ pipenv ◦ flake8 ◦ mypy ◦ pylint
将来展望 • 同時に保存すると、コンフリクトが起きる→キューに格納 • PythonとRustを使用しておりPythonを使う意味がほぼないためすべてRustで再実 装 • 履歴表示時にPagerを使用しているが、画面にすべて表示されない出力の場合に qを押したときにエラーが起きる問題の修正 •
pypiにデプロイしたい
yuto51942/netpro-project https://github.com/yuto51942/netpro-project