Commit Graph

11 Commits

Author SHA1 Message Date
Chris Beams
900c13ef8f
Rename submodule grpc => daemon
- Rename package bisq.grpc => bisq.daemon.app
 - Rename BisqGrpcApp => BisqDaemon
 - Rename BisqGrpcServerMain => BisqDaemonMain

The script `bisq-grpc` has been renamed to `bisq-daemon` accordingly
(and will later be customized to `bisqd`). To see everything in action,
issue the following commands:

    $ gradle build
    $ ./bisq-daemon --appName=Bisq-throwaway --daoActivated=false
    $ echo getVersion | ./bisq-cli         # in a second terminal
    1.2.3
2020-01-20 12:13:30 +01:00
Chris Beams
29698fd58a
Introduce 'cli' subproject
This change stubs out the `bisq-cli` utility with a placeholder main
method, such that the following now works:

    $ gradle :cli:build
    $ ./bisq-cli
    Hello, World!
2020-01-20 12:07:55 +01:00
chimp1984
5c02ce5766
Introduce gRPC API proof of concept
This commit introduces a new `grpc` module including the following key
types:

 - BisqGrpcServer: The API implementation itself, along with generated
   gRPC Response/Reploy types defined in grpc/src/main/proto/grpc.proto.

 - BisqGrpcServerMain: A 'headless' / daemon-like entry point for
   running a Bisq node without the JavaFX desktop UI.

 - BisqGrpcClient: A simple, repl-style client for the API that allows
   the user to exercise the various endpoints as seen in the example
   below.

In the `desktop` module, the BisqAppMain class has been modified to
start a BisqGrpcServer instance if the `--desktopWithGrpcApi` option has
been set to `true`.

In the `core` module, a new `CoreApi` class has been introduced
providing a kind of comprehensive facade for all Bisq functionality to
be exposed via the RPC API.

How to explore the proof of concept:

 1. Run the main() method in BisqAppMain providing
 `--desktopWithGrpcApi=true` as a program argument or alternatively, run
 the main() method in BisqGrpcServerMain, where no special option is
 required. In either case, you'll notice the following entry in the log
 output:

    INFO  bisq.grpc.BisqGrpcServer: Server started, listening on 8888

 2. Now run the main() method in BisqGrpcClient. Once it has started up
 you are connected to the gRPC server started in step 1 above. To
 exercise the API, type `getVersion` via stdin and hit return. You
 should see the following response:

    INFO bisq.grpc.BisqGrpcClient - 1.2.4

 Likewise, you can type `getBalance` and you'll see the following
 response:

    INFO bisq.grpc.BisqGrpcClient - 0.00 BTC

 and so forth for each of the implemented endpoints. For a list of
 implemented endpoints, see BisqGrpcServer.start().

Note once again that the code here is merely a proof of concept and
should not be considered complete or production-ready in any way. In a
subsequent commit, the `--desktopWithGrpcApi` option will be disabled in
order to avoid any potential production use.

The content of this commit is the result of squashing a number of
commits originally authored by chimp1984 in the `chimp1984` fork's `grpc`
branch.

Co-authored-by: Chris Beams <chris@beams.io>
2020-01-10 19:48:26 +01:00
Christoph Atteneder
d1be121b57
Merge statsnode repository at fc0a288 2018-09-14 11:53:35 +02:00
Christoph Atteneder
3de0a8b964
Merge seednode repository at eedf81c 2018-09-14 11:51:34 +02:00
Christoph Atteneder
a55673fe52
Merge relay repository at 5c730b0 2018-09-14 11:48:49 +02:00
Christoph Atteneder
9a7b761549
Merge pricenode repository at 85df033 2018-09-14 11:45:35 +02:00
Christoph Atteneder
ecef18a437
Merge monitor repository at fd01ee4 2018-09-14 11:42:51 +02:00
Chi Nul
14efcbce98
Merge "Update root gradle scripts":9c628bb873cbfd7fd9c56fbbd022470a205561f9 from @chirhonul 2018-09-05 11:15:30 +02:00
Christoph Atteneder
c1c38a3ceb
Move desktop to subdirectory 2018-09-05 09:50:29 +02:00
Chris Beams
6e87bee784
Add Gradle build 2018-03-21 06:14:48 +01:00