Giter VIP home page Giter VIP logo

traderx's Introduction

FINOS - Incubating

FINOS | TraderX Example of a Simple Trading App

DEV Only Warning Local Dev Machine Supported

The Sample Trading Application is a usable simple yet distributed reference application in the financial services domain which can be used for experimenting with various techniques and other open source projects. It is designed to be simple and accessible to programmers of all backgrounds, and can serve as a starting point for educational and experimentation purposes.

It is designed to be runnable from any developer workstation with minimal assumptions other than Node, Java and Python runtimes.

It contains Java, NodeJS, Python, .NET components that communicate over REST APIs and messaging systems and are able to showcase a wide range of technical challenges to solve.

More detailed information about this project can be found in the website which is generated from the code under the docs directory of this project.

Current Project Status

This is currently a Work-In-Progress. At the moment there are some components which are just placeholder API contracts for an implementation to be created, while others are already runnable reference implementations.

Below is a table on status, listed in the order things need to start up for the system to operate.

Pleae note, that for things not yet implemented (or things you'd like to reimplement) the tech stack selected is a suggestion. Feel free to swap things out as you see fit!

Component Tech Stack Status Comment
docs markdown Architecture and Flow Diagrams are here!
database java/h2
reference-data node/nestjs
trade-feed node/socketio
people-service .Net core Initial implementation complete
account-service java/spring Initial Checkin Complete
position-service java/spring Initial Service Checked In
trade-service java/spring Initial Service Checked In
trade-processor java/spring Initial Implementation Checked in
web-front-end html/angular or react Initial Implementation in React and Angular

Installation (WIP)

This section will be filled out once the code is in place.

Usage example (WIP)

In order to get things working together, it is recommended to select a range of ports to provde all running processes with, so that the pieces can interconnect as needed. A more advanced instance of this project would do things using container/service location abstractions. Here's one such example convention.

export DATABASE_TCP_PORT=18082
export DATABASE_PG_PORT=18083
export DATABASE_WEB_PORT=18084
export REFERENCE_DATA_SERVICE_PORT=18085
export TRADE_FEED_PORT=18086
export ACCOUNT_SERVICE_PORT=18088
export PEOPLE_SERVICE_PORT=18089
export POSITION_SERVICE_PORT=18090
export TRADE_PROCESSOR_SERVICE_PORT=18091
export TRADING_SERVICE_PORT=18092
export WEB_SERVICE_ANGULAR_PORT=18093  #Angular
export WEB_SERVICE_REACT_PORT=18094  #React

The recommended starting sequence to let everything find what it needs is:

database
reference-data
trade-feed
people-service
account-service
position-service
trade-processor
trade-service
web-front-end

Usage (Docker + Docker Compose)

The easiest way to run up the entire system is using Docker Compose. This should work on your local computer using Docker Desktop / Docker Compose (tested on Mac Silicon) and also in Github Codespaces.

From the root traderX directory run

docker compose up

On first run this will build all of the containers from the project specific Dockerfile's and then start them in the correct sequence.

The Docker containers are configured via Docker Compose to connect to a shred virtual network enabling them to communciate whether running on your local computer or via a Codespace.

The WebUIs will be added to this setup later, but in the interim you should be able to start either (or both) in the same environment to connect to the backend components.

Development setup

At the moment, the repository has architecture documents and API schema doc documents. When the code is populated in this repo, build instructions will be listed here.

Roadmap

  1. Submit architecture diagram, API Specifications, and Flow Diagrams
  2. Submit a working, simple pub-sub engine to use with this demo
  3. Submit working implementations of components

Local Building (Company Specific)

When building locally, if you are using a corporate artifact repository, you might need to override certain settings such as mavenCentral() in gradle, for the Java projects.

In order to do this, we have designated a .gitignore'd folder where you can leave company-specific build scripts. This folder is not managed by git and can be modified locally.

Local Gradle Use Case

Create a .corp directory and in there you can create a settings.gradle file which will allow you to build all gradle projects

# in the traderX main directory
mkdir .corp
touch settings.gradle

The settings.gradle file should contain any overrides on your repositories and plugins block but should also contain these contents:

rootProject.name = 'finos-traderX'
includeFlat 'database'
includeFlat 'account-service'
includeFlat 'position-service'
includeFlat 'trade-service'
includeFlat 'trade-processor'

This will include projects in directories at the same level as the .corp directory.

You can also store a separate gradle wrapper here, if you need the distributionUrl in your gradle.properties to differ from the public internet one.

To build and run these projects, you can do the following:

###### From traderX root #####
# Note: gradle or ./gradlew can be used, depending on your path

gradle --settings-file .corp/settings.gradle build

# Build specific project
gradle --settings-file .corp/settings.gradle database:build

# Run specific project
gradle --settings-file .corp/settings.gradle account-service:bootRun

##### From inside the .corp directory ####
cd .corp
./gradlew build
./gradlew account-service:bootRun

Contributing

  1. Fork it (https://github.com/finos/TraderX/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Read our contribution guidelines and Community Code of Conduct
  4. Commit your changes (git commit -am 'Add some fooBar')
  5. Push to the branch (git push origin feature/fooBar)
  6. Create a new Pull Request

NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool. Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.

Need an ICLA? Unsure if you are covered under an existing CCLA? Email [email protected]

License

Copyright 2023 UBS, FINOS, Morgan Stanley

Distributed under the Apache License, Version 2.0.

SPDX-License-Identifier: Apache-2.0

traderx's People

Contributors

chrisjstevo avatar dovops avatar finos-admin avatar rocketstack-matt avatar theiceoan avatar thejuanandonly99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.