Commit Graph

10 Commits

Author SHA1 Message Date
Chad Austin
e2d26877d6 enable py3 thrift language
Summary:
The old `py` Thrift language support doesn't correctly handle string
vs. bytes, which causes an exception to be thrown when deserializing
paths or blobs that aren't UTF-8.

We will eventually want to migrate to the py3 language implementation,
which supports streaming.

Reviewed By: genevievehelsel

Differential Revision: D21693082

fbshipit-source-id: 0ea10fd3960f5acba353bccb83b5cf539e7eeffb
2020-06-10 19:29:17 -07:00
Andres Suarez
fbdb46f5cb Tidy up license headers
Reviewed By: chadaustin

Differential Revision: D17872966

fbshipit-source-id: cd60a364a2146f0dadbeca693b1d4a5d7c97ff63
2019-10-11 05:28:23 -07:00
Jon Maltiel Swenson
fed01de284 Reclaim stream<> syntax
Summary: Rename `stream i32` to `stream<i32>` in Thrift IDL.

Reviewed By: rhodo

Differential Revision: D15981680

fbshipit-source-id: 98ac56c52e57d2e43484b8a37969f74a0fc15219
2019-06-26 07:51:50 -07:00
Jon Maltiel Swenson
a56edd2812 Kill legacySubscribe method for establishing streams
Summary:
watchman/eden have been using the new Thrift streaming for nearly a year now and are the last users of the old
Thrift streaming. This diff kills the fallback `legacySubscribe` method, which complete's migration to the new Thrift
streaming and unblocks the complete removal of wangle-based streaming from Thrift and fbcode.

Reviewed By: wez

Differential Revision: D15878892

fbshipit-source-id: ec0d270dba79e56c7e41afbf36669a08e5a15518
2019-06-24 11:06:22 -07:00
Adam Simpkins
92fc1d83d9 update license headers in thrift files
Summary:
Update the copyright & license headers in thrift files to reflect the
relicensing to GPLv2+

Reviewed By: wez

Differential Revision: D15487082

fbshipit-source-id: 33f68617037f36c07075fb962a16a4d8f55bd6a6
2019-06-19 17:02:46 -07:00
Matt Glazar
49f4c37b67 Add missing copyright notices
Summary: Internal Facebook infrastructure is nagging me about some files not having a Facebook copyright notice. Add a notice to these files to make the nagging stop.

Reviewed By: simpkins

Differential Revision: D14173944

fbshipit-source-id: 7234431224fcf4f86ea56ca2f9108f47ef959d87
2019-03-07 19:32:39 -08:00
Wez Furlong
08323479d6 adopt new thrift streaming API
Summary:
In heap profiles we observed a lot of objects associated
with the journal related to the subscription path.   Those objects
appear to be alive for the duration of the subscription session,
so it gives us good reason to move forwards with updating to the
newer thrift streaming API.

This diff introduces a new endpoint `subscribeStream` that uses
the new RSocket based subscription channel.

Both the Eden server and the watchman client are able to deal
with connections from/to old versions of the server which checks
off the box around push safety.

Once this is widely deployed we can remove `StreamingSubscriber.{cpp|h}`
from the eden code base, and can remove the `legacySubscribe` code
from the watchman code base.

Reviewed By: strager

Differential Revision: D9595967

fbshipit-source-id: 0843e56315f83f1e5fb9bc827b7ee6cf1bf507a6
2018-09-20 12:54:23 -07:00
Philip Jameson
db24c8b7c9 Fix the include prefix for c++ generated code
Summary: We were previously potentially deleting the include prefix. We also weren't using the cpp2 include prefix if the global one wasn't set. This makes sure we use it, and fixes a bug where 'X_types.h' was included without a full prefix.

Reviewed By: yfeldblum

Differential Revision: D6236108

fbshipit-source-id: 076747fcab2b1414bafa42c9e481ba1e1e5df4b1
2017-11-09 15:35:58 -08:00
Wez Furlong
5ca8bcdc60 implement eden->watchman subscriptions
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
2017-03-21 13:35:20 -07:00
Wez Furlong
2fc9fc155c enable StreamingEdenService
Summary:
In order to send realtime subscription information to watchman
we need to use the thrift streaming data functionality.  Since this
isn't supported in java we originally broke this out into its own
thrift file.

It's now time to hook this up; this diff adds some plumbing so that
our thrift server knows to implement this interface.

This was made a bit more complicated because the inheritance in
the thrift definitions causes some ambiguities in the header maps
that buck uses to manage the includes.

I also had to rename the file from `eden.stream.thrift` to `streamingeden.thrift`
to avoid a problem with the period in the middle of the identifier.

For the server side of things, I've removed the `:thrift-cpp2` target
and replaced it with `thrift-streaming` instead.

This diff doesn't implement the endpoint, it is just setting things
up for the follow-on diff that does.

Reviewed By: bolinfest

Differential Revision: D4640639

fbshipit-source-id: b3625b0ff33a42945bf523944beed050f549a18c
2017-03-01 23:12:50 -08:00