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
520
QUICについて調べた
cateiru
0
110
Other Decks in Education
See All in Education
Info Session MSc Computer Science & MSc Applied Informatics
signer
PRO
0
190
演習問題
takenawa
0
5.6k
Pydantic(AI)とJSONの詳細解説
mickey_kubo
0
100
新卒交流ワークショップ
pokotyamu
0
420
CHARMS-HP-Banner
weltraumreisende
0
180
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019538FNR)
signer
PRO
1
2k
SARA Annual Report 2024-25
sara2023
1
180
Education-JAWS #3 ~教育現場に、AWSのチカラを~
masakiokuda
0
170
JOAI2025講評 / joai2025-review
upura
0
160
教員向け生成AI基礎講座(2025年3月28日 東京大学メタバース工学部 ジュニア講座)
luiyoshida
1
570
Data Physicalisation - Lecture 9 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
440
SkimaTalk Tutorial for Corporate Customers
skimatalk
0
280
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
940
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Testing 201, or: Great Expectations
jmmastey
42
7.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
How to train your dragon (web standard)
notwaldorf
94
6.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Site-Speed That Sticks
csswizardry
10
670
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
The Language of Interfaces
destraynor
158
25k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
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