<div dir="ltr">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>Have other projects had a need for this? Any advice on how to approach such dependencies?</div><div><br></div><div>--</div><div><br></div><div>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>For large codebases with many developers, <a href="https://llvm.discourse.group/t/sharing-indexes-for-multiple-users/202">sharing an index across users</a> 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><br></div><div>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></div><div>This means we care about</div><div> - latency (this is interactive, every 10ms counts)</div><div> - security</div><div> - proxy traversal, probably</div><div> - sensible behavior under load</div><div> - auth is probably nice-to-have</div><div><br></div><div>I don't think this is something we want to build from scratch, I hear portable networking is hard :-)</div><div>The most obvious thing is to depend on something like Thrift, grpc, etc, but these aren't trivial dependencies to take on. They could probably be structured as an optional CMake dependency, which we'd want to ask distributors to enable.</div><div><br></div><div>Have other projects had anything like these requirements? Any solutions, or desire to use such infrastructure? I saw some RPC layer in ORC, but it seems mostly abstract/FD-based IPC.</div><div><br></div></div>