mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
5ca8bcdc60
Summary: This tweaks the definition of the subscribe method in the streamingeden thrift file and implements the server side of the thrift service, and the client side to consume it in watchman. The definition is now a bit simpler than it was previously; we're now just sending a stream of the updated JournalPosition objects to the client rather than computing and sending FileDelta objects. This is cheaper for Eden to deal with because it is very cheap to take the current journal position and pass that over the wire. This is important because a burst of mutations will likely queue up a bunch of these in quick succession. In a future diff I'm considering adding a latency parameter for the subscription so that we can constrain the number of updates over a certain time period (likely in the 10's of milliseconds range). For now I just want to prove that the concept works. On the watchman side we just need to pull these off the wire as they are sent by eden, then wait for the subscription stream to settle before internally broadcasting to any connected subscribers. Reviewed By: bolinfest Differential Revision: D4647259 fbshipit-source-id: 03aa16e59a43195a2505a8d03bce1ccf88a8d42f
48 lines
1.3 KiB
Plaintext
48 lines
1.3 KiB
Plaintext
def create_eden_fs_rules(suffix, subdir, server_srcs, server_deps):
|
|
cpp_binary(
|
|
name = "edenfs" + suffix,
|
|
output_subdir = subdir,
|
|
srcs = [
|
|
"main.cpp",
|
|
],
|
|
deps = [
|
|
":server" + suffix,
|
|
"@/eden/fs/inodes:inodes",
|
|
],
|
|
)
|
|
|
|
cpp_library(
|
|
name = "server" + suffix,
|
|
output_subdir = subdir,
|
|
headers = [
|
|
"EdenError.h",
|
|
"EdenServer.h",
|
|
"EdenServiceHandler.h",
|
|
"GlobNode.h",
|
|
"StreamingSubscriber.h",
|
|
],
|
|
srcs = [
|
|
"EdenError.cpp",
|
|
"EdenServer.cpp",
|
|
"EdenServiceHandler.cpp",
|
|
"GlobNode.cpp",
|
|
"StreamingSubscriber.cpp",
|
|
] + server_srcs,
|
|
deps = [
|
|
":thrift_cpp",
|
|
"@/common/fb303/cpp:fb303",
|
|
"@/eden/fuse:fusell",
|
|
"@/eden/fuse/privhelper:privhelper",
|
|
"@/eden/fs/config:config",
|
|
"@/eden/fs/inodes:inodes",
|
|
"@/eden/fs/store/git:git",
|
|
"@/eden/fs/store/hg:hg",
|
|
"@/folly/experimental:experimental",
|
|
"@/folly/init:init",
|
|
"@/thrift/lib/cpp2:server",
|
|
] + server_deps,
|
|
external_deps = [
|
|
("boost", None, "boost_filesystem"),
|
|
],
|
|
)
|