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
32
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
490
QUICについて調べた
cateiru
0
98
Other Decks in Education
See All in Education
ビジネススキル研修紹介(株式会社27th)
27th
PRO
1
440
複式簿記から純資産を排除する/eliminate_net_assets_from_double-entry_bookkeeping
florets1
0
280
ISMS審査準備ブック_サンプル【LRM 情報セキュリティお役立ち資料】
lrm
0
1.1k
Power Automate+ChatGPTを使ってエンジニア教育を改善してみた #RPALT
masakiokuda
0
120
Medicare 101 for 2025
robinlee
PRO
0
440
A Chatbot is Not a Search Engine (it's more like a roleplaying game)
dsalo
0
130
脳卒中になってしまった さあ、どうする
japanstrokeassociation
0
1.6k
Use Cases and Course Review - Lecture 8 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
850
ルクソールとツタンカーメン
masakamayama
1
1.1k
Carving the Way to Ruby Engineering
koic
3
780
Ch2_-_Partie_2.pdf
bernhardsvt
0
120
1106
cbtlibrary
0
440
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Thoughts on Productivity
jonyablonski
68
4.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Rails Girls Zürich Keynote
gr2m
94
13k
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