GithubHelp home page GithubHelp logo

ibmstocktrader / portfolio-spring Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 10.0 14.48 MB

Microservice implemented with Spring that persists stock portfolios to JDBC (such as DB2)

License: Apache License 2.0

Java 100.00%

portfolio-spring's Introduction

-------------------------------------------------------------------------------

WORK IN PROGRESS

Note: This is a work in progress Spring port of the orginal portfolio service.

-------------------------------------------------------------------------------

This service manages a stock portfolio. The data is backed by two DB2 tables, communicated with via JDBC. The following operations are available:

GET /portfolio/ - gets summary data for all portfolios

POST /portfolio/{owner} - creates a new portfolio for the specified owner

GET /portfolio/{owner} - gets details for the specified owner

PUT /portfolio/{owner} - updates the portfolio for the specified owner (by adding a stock)

DELETE /portfolio/{owner} - removes the portfolio for the specified owner

POST /portfolio/{owner}/feedback - submits feedback (to the Watson Tone Analyzer)

Build & Config.

Building

mvn package Will produce an executable jar in the target folder.

mvn package boost:docker-build Will create a docker image portfolio-spring:latest that uses OpenLiberty to execute the application.

Configuration

The application/container expects the following environment variables to be populated and carry configuration forthe application.

Env Var Purpose
MQ_QUEUE_MANAGER The queue manager to connect to. eg. QM1
MQ_CHANNEL The channel to connect to. eg DEV.ADMIN.SVRCONN
MQ_HOST The host for MQ.
MQ_PORT The port for MQ.
MQ_ID The userid for MQ.
MQ_PASSWORD The password for MQ.
LOYALTY_URL The url of the loyalty service, eg. http://192.168.18.100:31422/DecisionService/rest/v1/ICP_Trader_Dev_1/determineLoyalty
LOYALTY_ID The user id for the loyalty service
LOYALTY_PWD The password for the loyalty service
JDBC_HOST The host for the jdbc connection
JDBC_PORT The port for the jdbc connection
JDBC_ID The userid for the jdbc connection
JDBC_PASSwORD The password for the jdbc connection
JDBC_DB The database to user with the jdbc connection
WATSON_APIKEY (formerly WATSON_ID and WATSON_PWD) The api key used to access Watson Tone Analyzer service
WATSON_URL Url for Watson Tone Analyzer service
STOCK_QUOTE_URL Url for Stock Quote service
JWT_AUDIENCE The expected audience for jwt authentication
JWT_ISSUER The expected isser for jwt authentication
JWT_KEY (note : temporary) shared key for jwt authentication

portfolio-spring's People

Contributors

brutif avatar greghint avatar karricar avatar rtclauss avatar

Watchers

 avatar  avatar  avatar  avatar

portfolio-spring's Issues

Add Kafka support (matching what the MP `portfolio` now does)

hey @BarDweller - when you get a chance, we should look at whether you can update your portfolio-spring to do the Kafka stuff for talking to IBM Event Streams, like portfolio now does (as requested for the FastStart and Think demos). presumably you'd use https://spring.io/projects/spring-kafka. would be another good comparison point of possible ease-of-use in Spring versus the approach you'd currently use in Java without it (which will get much better, once mpReactiveMessaging becomes available). we should be able to get to where trade-history can consume the message you'd post from Spring, just like it can the message I currently post to the stocktrader topic.

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.