-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propose: Full Bisq node as a "Black Box" with Restful interface #5
Comments
Feel free to add PRs for refactoring of existing dataModels which contain UI elements. Should not be the case anyway, so good to clean those up. I think most can be refactored easily without adding much risk/effort. |
Yes, needs a bit of discussion on the best common approach to messaging, ie. the dataModel clearly has something to say or complain about. ATM this is going to GUI as a pop-up or error. Easy enough to block this from happening in headless, but the API also needs to be informed about these events - so we need a common messaging vehicle. I am refactoring with something that works (message-wise) for me in the context of the bisq-engine module, but will break the stack if pulled into bisq-exchange. Good enough for now, but needs a considered solution. |
I just refactored a bit the Create- and TakeOfferDataModels: Use common superclass for Create- and TakeOfferDataModel to avoid code duplication: Move Notification out of DataModel to View: Still more to do but I think it's not hard. Duplicated code can be moved to the superclass and references to view domain should be represented as a property and the view registers a listener to it. The data for display is usually already available for the view so no need to pass over data. |
Much cleaner Manfred. So satisfying to get rid of repetition :) I am going to set up slack channels for bisq-engine and bisq-front, just getting my head around a few things ATM. A typical example of what needs co-ordination for compatibility is here: https://github.com/citkane/bisq-engine/blob/978d324e9468f191516fbad277689fedff0d0819/engine/src/main/java/io/bisq/gui/main/offer/takeoffer/TakeOfferDataModel.java#L308 The The I have declared it here for now: https://github.com/citkane/bisq-engine/blob/978d324e9468f191516fbad277689fedff0d0819/engine/src/main/java/io/bisq/engine/app/api/ApiData.java#L94 |
Regarding TakeOfferDataModel.java#L308: |
That should do it. Replied to your message on slack. I am at my desk for the next 30mins or so. |
I am proposing a module to provide a full Bisq node as a headless "Black Box" with Rest interface. It is optional from command line to launch a http API interface on localhost and/or the javaFX GUI client.
Code and instructions can be found here: bisq-engine
Packaging logic
Application logic
Business logic
Presently, the Bisq business logic resides in the
dataModels
of thegui
module. Engine uses interfaces on theio.bisq.gui
classpath for the REST service to interact with the logic. Minor refactoring on somedataModel
's is needed to prune out pre-existing GUI logic that would throw errors in headless.This is done by:
dataModel
class over to bisq-engine on it's existing classpath, thus overridinggui
.It is envisaged that this will allow development of bisq-engine to be unhindered, while providing a clear space for
diff
s and collaboration on building a common, gui agnostic, business logic architecture for the whole stack.The text was updated successfully, but these errors were encountered: