s ravi chandran

Ranch Hand
+ Follow
since Dec 20, 2010
s ravi likes ...
jQuery Java
I am a  java developer. Working in Financial domain with an investment bank.
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by s ravi chandran

Writing immutable classes makes the application more resilient. I believe its more a way of thinking once you become more familiar with handling immutable objects. The benefits include thread safety for multi threaded application, easy to debug for issues etc.

I am learning to write java lambdas since last year and still not comfortable in writing stateless code yet. I do try to refactor my code to make it as compact as possible though. Hoping to improve with time.
5 months ago
You can always use class diagram that reflects the sample view of your existing project. Its easier to understand the problem.

you can start with breaking down your requirement and code for each step.

taking your code snippet for reference with this crude mock up:

Also try to segregate the workflow into multiple methods, with each one doing a single action. so each step here would ideally go into a function.

do get back if you have more queries on this.
5 months ago
my bad  will correct the title again..

My sample is mostly different from the original example in two ways, one is use of Emp class instead of Employee class which I did not find anywhere and other is use of empBonusConsumer in method testBiConsumer(). So biconsumer empBonusAndHikeConsumer is created and not used anywhere.

Here is the code snippet from lesson:

But the confusion I had with this example is resolved.
1 year ago
Thanks for the responses. Yes, I see that the requirement for this example cannot be implemented with nested biconsumers. well I did understand the concept of biconsumer, only this example was confusing to me.

Meanwhile this lesson is from tutorial link and this particular lesson is from chapter "Additional Functions" section "Two Argument BiConsumers".

Edit: checked the lesson again, the presenter created empBonusAndHikeConsumer but did not use it anywhere. So in effect I was wrong to call it from testBiConsumer. Strangely though if this field is not used anywhere just defining the nested biconsumer does not seem that useful.
1 year ago
Sorry, I understood it to be biconsumer of biconsumer.

for the field empBonusAndHikeConsumer, how can I pass bonus of 5% and hike of 15%. That is the expected behavior.
1 year ago
Hi All,
I am going through a tutorial for lambda functions and came across an example using biconsumer of biconsumer.

Here is a sample code from that lesson:

The lesson did not explain one thing. If I create a biconsumer of biconsumer, how do I pass the arguments to it.

Would you please provide some insight into this scenario.


edit: corrected the title to reflect the proper question.
1 year ago

Paul Clapham wrote:

You could do that. I'm not sure what the difference would be if you used CompletableFuture instead but perhaps you could explain what you thought the difference would be when you planned to use it.

Thanks for the response. I updated my function with what you provided, hope this is how we should be handling the future results.

Coming back to by intention of using CompletableFuture, well I wanted to create sort of workflow pipeline and handle the result from all requests asynchronously.
But as I need the list of responses to process those further, that part is little murky for now.

Here is an incomplete code which I am trying to work out.
1 year ago
Hi All,
I have a multi threading problem where there are bunch of requests which will take varied time for processing. I want to  get response of all the requests and consume the responses.

My plan is to use CompletableFuture but not able to come up with how to code it. I created a mock up using ExecutorService and here too I am not sure how to handle the future result.
Would it be better to wait for a response with blocking call such as get() or should I use a while loop and loop around until all results are either done or canceled?

Here is the current mock up :




Would like to get advice on:
1) handling future result in current case.
2) if I use CompletableFuture, what should be the approach to this problem ?

1 year ago
Agreed. Automated algo trading is expanding at rapid rate..

AI CEOs would be a novel idea.
1 year ago
Thanks for the detailed explanation. Very informative. The type of commodities that can be traded is so vast I often loose track of it.

If we exclude proprietary aspects of a trading platform, there should be a generic architecture flow for all these systems, would that be correct assumption ?

For example, for any type of commodity to be traded, I can think of these many components needed in a basic trading system:

I think there would be some more components that would be required like risk evaluations, post trade feeds, trade report generators and some form of profit/loss stats for traders to know their overall position.

We would also have systems specific to commodity types.

Does this architecture seem reasonable ? With limited know how I have, I can think of these many components.
1 year ago
Hi All,
I would like to learn more about financial trading system (stock trading). I work on an java based equities trading platform but I only know the technical aspect of the service that I manage.

I would like to understand the overall architecture of trading systems and business usecase of each component. I also want to learn more about trader acronyms like long and short positions, hedging, ETF, RFQ etc.

I searched in google but all I find were things for actual traders, was unable to find something from developers perspective.

Please advice on where I can find resources for these.

Please move this thread to appropriate forum in case this is not the right platform, I was not sure which section this should belong to.
1 year ago
Sorry for delayed response.

Yes, I would like to get in touch with latest stuff in java development and also would like to understand things at software architecture level (top level view of enterprise applications).  

And regarding the books you have mentioned, is there any sequence that I should follow?
1 year ago
Hi All,
I have 10 years experience in java software development. I have worked across domains like e-commerce, CRM, financial. I learnt a lot from all these projects.

I have been part of a trading project for 2+ years now, I did learn new things with this project too. But I am beginning to feel that I have lost touch with technical skills and become more familiar with the project specific skills.

I wish to get back on track with learning new things and gaining more broader understanding of software development to reach somewhere close to architect level. I am unable to think of how to go about it.

What all things can I do to increase my knowledge. I do think about reading technical articles but dont know where to start.

Please advice on possible ways that I should explore.

1 year ago
I would say machine learning is what I want to focus on.

AI is not for me at the moment. Its too complex to be used for any solution.

Will try to get into some books in the section. Will also check the site. Maybe it might click for me.
Thanks for your suggestions. I will try some of these.
3 years ago