{"action":"created","issue":{"url":"https://api.github.com/repos/exch-bms2/beatoraja/issues/289","repository_url":"https://api.github.com/repos/exch-bms2/beatoraja","labels_url":"https://api.github.com/repos/exch-bms2/beatoraja/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/exch-bms2/beatoraja/issues/289/comments","events_url":"https://api.github.com/repos/exch-bms2/beatoraja/issues/289/events","html_url":"https://github.com/exch-bms2/beatoraja/issues/289","id":314389781,"number":289,"title":"Issue,Todo about IPFS","user":{"login":"LNTakeshi","id":4867425,"avatar_url":"https://avatars2.githubusercontent.com/u/4867425?v=4","gravatar_id":"","url":"https://api.github.com/users/LNTakeshi","html_url":"https://github.com/LNTakeshi","followers_url":"https://api.github.com/users/LNTakeshi/followers","following_url":"https://api.github.com/users/LNTakeshi/following{/other_user}","gists_url":"https://api.github.com/users/LNTakeshi/gists{/gist_id}","starred_url":"https://api.github.com/users/LNTakeshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LNTakeshi/subscriptions","organizations_url":"https://api.github.com/users/LNTakeshi/orgs","repos_url":"https://api.github.com/users/LNTakeshi/repos","events_url":"https://api.github.com/users/LNTakeshi/events{/privacy}","received_events_url":"https://api.github.com/users/LNTakeshi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-15T06:27:40Z","updated_at":"2018-04-16T03:07:30Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"#285 に関するIssue,Todoです\r\n- beatorajaが異常終了するとipfsのdaemonがずっと残り続ける\r\n  - このような場合や、beatorajaとは別にdaemonを立ち上げた時に何度もdaemonを立ち上げようとしてしまう\r\n    - ipfs shutdownみたいなコマンドがあれば良いが、無い\r\n- ipfs(.exe)の同梱\r\n  - ファイルが大きすぎる、Windows版/Linux版がある、アップデートが必要→各自でInstallが楽\r\n- ダウンロード開始までが遅い\r\n  - 恐らくファイル保持者が増えれば短縮されると思う、しかし現状では遅すぎる\r\n- BMSONについて\r\n  - AppendIpfsのハッシュの中身がファイルの場合、現状は(Hash値).bmsというファイル名で作成するのでbmsonは無理\r\n  - ディレクトリとしてダウンロードするとファイル名が保持されるので、そちらの方法でbmson差分は自動適用できる\r\n- EventTable\r\n  - \"BMS(ON)は変更しないが、Movieの差し替え\"などの例が考えられるので、これに対応しないといけない\r\n  - 最終更新日時とか、バージョンなどがEventTableに必要かもしれない(更に楽曲データベースにもこの情報を保持する必要がある)\r\n"},"comment":{"url":"https://api.github.com/repos/exch-bms2/beatoraja/issues/comments/381467690","html_url":"https://github.com/exch-bms2/beatoraja/issues/289#issuecomment-381467690","issue_url":"https://api.github.com/repos/exch-bms2/beatoraja/issues/289","id":381467690,"user":{"login":"LNTakeshi","id":4867425,"avatar_url":"https://avatars2.githubusercontent.com/u/4867425?v=4","gravatar_id":"","url":"https://api.github.com/users/LNTakeshi","html_url":"https://github.com/LNTakeshi","followers_url":"https://api.github.com/users/LNTakeshi/followers","following_url":"https://api.github.com/users/LNTakeshi/following{/other_user}","gists_url":"https://api.github.com/users/LNTakeshi/gists{/gist_id}","starred_url":"https://api.github.com/users/LNTakeshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LNTakeshi/subscriptions","organizations_url":"https://api.github.com/users/LNTakeshi/orgs","repos_url":"https://api.github.com/users/LNTakeshi/repos","events_url":"https://api.github.com/users/LNTakeshi/events{/privacy}","received_events_url":"https://api.github.com/users/LNTakeshi/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T03:07:30Z","updated_at":"2018-04-16T03:07:30Z","author_association":"CONTRIBUTOR","body":"IPFS folderの中身が変わると新しいIPFS hashに変わる仕様は上手く利用したいですね。\r\nただし、beatorajaでは現在md5/sha256を利用してTableのBMSを参照しているので、(例えばmovieを変更した場合)md5は変化しないので、例えIPFS hashが変わったとしてもBMSは持っているものとして扱われます。\r\nそこで、将来的にはdatabaseにmd5/sha256に加え、IPFS hashも保存しておく必要があるかなと思います。(現在はディレクトリ名で代用していますが)\r\nこうすることでdatabaseのIPFS hashとTableの\"ipfs\"が異なれば再ダウンロードが行えるようになります。\r\n\r\nこの場合、BMSに修正が入った場合md5に加えIPFS hashも異なるため、Tableの\"ipfs\"を書き換えただけでは別のディレクトリが作られてgetが行われると考えられます。\r\nそこで、EventTableで利用する際には、\"org_md5\"に修正前のBMSのmd5を含めることで旧ディレクトリが参照出来るようになり、上書き適用出来るかなと考えています。\r\nDifficultyTableでは\"org_md5\"に含むBMSを持っていると\"ipfs\"を無視して\"ipfs_diff\"だけをダウンロードするのに対し、EventTableでは\"md5/sha256\"に一致するBMSが未所持で且つ\"org_md5\"に含まれるBMSを持っている場合、該当するディレクトリに\"ipfs\"を上書き適用するのが良いかなと思います。\r\n\r\nこれらすべての場合で、databaseにipfs hashが含まれない場合(=ユーザーがIPFSを利用せずにダウンロードした場合)はどのipfs hashに該当するファイルを持っているのか不明であるため、無視するべきかなと思います。\r\n\r\n(Google Translate was used in part)\r\nIf you change the contents of the IPFS folder, I would like to make good use of the specification that changes to the new IPFS hash.\r\nHowever, since beatoraja currently uses md5 / sha256 to refer to BMS of Table, md5 does not change (for example, when movie is changed), so even if IPFS hash changes, possessing BMS It is judged to be.\r\nSo in the future, I think that it is necessary to store IPFS hash in addition to md5 / sha256 in database. (Currently it substitutes for directory name)\r\nBy doing this, you can re-download if the IPFS hash of database and \"ipfs\" of Table are different.\r\n\r\nIn this case, when the modification is made to BMS, IPFS hash also differs in addition to md5, so even if you rewrite \"ipfs\" in the table, another directory is created and get is assumed to be executed.\r\nSo, when using it in EventTable, I think that we can refer to the old directory by including md5 of BMS before modification in \"org_md5\", so that overwriting can be applied.\r\nDifficultyTable ignores \"ipfs\" and downloads only \"ipfs_diff\" if you have a BMS included in \"org_md5\", whereas even if you do not have a BMS that matches \"md5 / sha256\" in EventTable, If you have a BMS that included in \"org_md5\", I think that it is better to overwrite \"ipfs\" over the corresponding directory.\r\n\r\nIn all of these cases, if ipfs hash is not included in database (= if the user downloaded without using IPFS) it is unknown which ipfs hash the corresponding file is, so it should be ignored I think whether it is.\r\n\r\nBy the way, Thanks to you I was able to know about IPFS.I am grateful."}}
{"actor":{"display_login":"LNTakeshi"}}