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
35
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
530
QUICについて調べた
cateiru
0
110
Other Decks in Education
See All in Education
技術文章を書くための執筆技術と実践法(パラグラフライティング)
hisashiishihara
19
6.6k
(キラキラ)人事教育担当のつらみ~教育担当として知っておくポイント~
masakiokuda
0
110
ビジネスモデル理解
takenawa
0
10k
Linuxのよく使うコマンドを解説
mickey_kubo
1
250
2025年度春学期 統計学 第8回 演習(1) 問題に対する答案の書き方(講義前配付用) (2025. 5. 29)
akiraasano
PRO
0
120
AIC 103 - Applications of Property Valuation: Essential Slides
rmccaic
0
280
Alumnote inc. Company Deck
yukinumata
0
830
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019538FNR)
signer
PRO
1
2.1k
IMU-00 Pi
kanaya
0
380
America and the World
oripsolob
0
520
Data Physicalisation - Lecture 9 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
460
Implicit and Cross-Device Interaction - Lecture 10 - Next Generation User Interfaces (4018166FNR)
signer
PRO
2
1.7k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
How to Ace a Technical Interview
jacobian
278
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
21
1.4k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
GitHub's CSS Performance
jonrohan
1031
460k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Code Reviewing Like a Champion
maltzj
524
40k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Adopting Sorbet at Scale
ufuk
77
9.5k
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