<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 13, 2019, at 2:09 PM, James Y Knight <<a href="mailto:jyknight@google.com" class="">jyknight@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class="gmail_quote" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div dir="ltr" class="gmail_attr">On Fri, Dec 13, 2019 at 2:12 PM Chris Bieneman via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 12, 2019, at 5:58 AM, Sam McCall via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Short version: clangd would like to be able to build a client+server that can make RPCs across the internet. An RPC system isn't a trivial dependency and rolling our own from scratch isn't appealing.<div class="">Have other projects had a need for this? Any advice on how to approach such dependencies?</div><div class=""><br class=""></div><div class="">--</div><div class=""><br class=""></div><div class="">Longer: clangd (a language server, like an IDE backend) builds an index of the project you're working on in order to answer queries (go to definition, code completion...). This takes *lots* of CPU-time to build, and RAM to serve.</div><div class="">For large codebases with many developers,<span class="Apple-converted-space"> </span><a href="https://llvm.discourse.group/t/sharing-indexes-for-multiple-users/202" target="_blank" class="">sharing an index across users</a><span class="Apple-converted-space"> </span>is a better approach - you spend the CPU in one place, you spend the RAM in a few places, and an RPC is fast enough even for code completion. We have experience with this approach inside Google.</div><div class=""><br class=""></div><div class="">We'd like to build this index server upstream (just a shell around clangd's current index code) and put the client in clangd. For open-source projects, I imagine the server being publicly accessible over the internet.<br class=""></div><div class="">This means we care about</div><div class=""> - latency (this is interactive, every 10ms counts)</div><div class=""> - security</div><div class=""> - proxy traversal, probably</div><div class=""> - sensible behavior under load</div><div class=""> - auth is probably nice-to-have</div><div class=""><br class=""></div><div class="">I don't think this is something we want to build from scratch, I hear portable networking is hard :-)</div></div></div></blockquote><div class=""><br class=""></div><div class="">It really isn't that bad. Just as a note, LLDB does have portable socket communication already, so it could be a refactor and reuse exercise rather than building from scratch.</div></div></div></blockquote><div class=""><br class=""></div><div class="">It sounds as if the clangd index server is supposed to work across the open internet, which effectively means it needs to speak HTTPS. That's not really something that you can just write.</div></div></div></blockquote><br class=""></div><div>I think speaking over the open internet means they need TLS, which OpenSSL should be a sufficient and reasonable dependency for. Are they really talking HTTP? If so, I would have expected different suggestions for open source project dependencies because I'm not sure Thrift builds in HTTP support (gRPC does).</div><br class=""><div class="">-Chris</div></body></html>