tvolkov / financialinstuments Goto Github PK
View Code? Open in Web Editor NEWCreditSuisse test task
CreditSuisse test task
The app reads the input file in a separate thread and puts the lines read into the queue. On the other end of the queue there're several threads pulling the lines from it, parse 'em and make necessary calculations. The problem which was difficult for me to solve is how to arrange the database support, i.e. how to access the data, since accessing db on each line is very time-consuming. On the other hand, I tried to cache the db data using Guava Cache, but it's is not 100% correct. This cache updates on timer, hence this approach can and will leave some db updates unattended. I also investigated how the cache can be updated by db trigger, but this approach is tied to the exact database technology (like h2, it has the Java API, unlike many other db's), so I decided to put it aside. I believe there're several ways to solve this problem (like using JMS for instance), but I didn't want to make it very sophisticated, so by default my app queries database each time (though I haven't delete the cacheable solution, you can try it by using -DuseCachedMultiplierProvider=true) usage examples: - run app with specified input file: mvn clean integration-test -PcustomFile -DinputFile=<path to the input file> - run app with specified input file and with multipliers cache: mvn clean integration-test -PcustomFile -DinputFile=<path to the input file> -DuseCachedMultiplierProvider=true
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.