All Questions
13 questions
2
votes
2
answers
146
views
A thread-safe performant Money Transfer API in Java
This is a popular interview question. It is meant to be done within 30 minutes. The task is to implement a thread-safe performant Bank Account API that allows to transfer, deposit, withdraw and check ...
3
votes
0
answers
71
views
Concurrency control between a non-blocking and a blocking methods
In this program, there is a list of Holders that is managed by a singleton class. Each of the Holders keeps a copy of the ...
3
votes
2
answers
2k
views
Enforce execution order with collections of CompleteableFuture's
I receive a message that contains a collection of items that need to be processed.
Processing each item involves sequential calls to various services.
The services return a ...
1
vote
1
answer
85
views
Synchronize different tasks (I/O listening daemon, prompt scheduler, output etc)
Shortly, I need to create a Java application with client/server architecture (clients represent some sort of math functions and when they are done computing, server consumes these values and produces ...
6
votes
3
answers
367
views
URLEncoder implementation
I'm looking for feedback on my URLEncoder implementation, which is a drop-in replacement for Apache Tomcat's URLEncoder. It was ...
3
votes
0
answers
83
views
Methods to add and check elements in a Bloom Filter
I have a working Java implementation of Bloom Filter.
These are the methods to addElement and check for an element.
...
6
votes
0
answers
816
views
Pseudo-parallel depth-first search
I'm writing a small program that generates a file containing an adjancency matrix, it then reads from that file, constructs a graph and does something like a parallel depth-first search (dfs) on it.
...
4
votes
1
answer
83
views
Multiple Persons enter room simultaneously and exits after specific interval of time
Here is the link to git repo of my application I am currently implementing just to have better understanding of OOP as well as learning Concurrency (Atleast a try :D)
What is the whole ...
5
votes
2
answers
2k
views
Serialize/deserialize objects to and from database concurrently
I have a class which runs as spring bean in the container and its purpose is data persistence. In the overriden method ...
0
votes
2
answers
113
views
Replacing Synchronization with Atomics
I have tried to make modification in below specified code by removing synchronized and replacing Integer with AtomicInteger .
...
2
votes
1
answer
1k
views
Optimizing code using semaphore to control Netty channel pool - Part 2
Please have a look at my original question:
Optimizing code using semaphore to control Netty channel pool
I have made some changes as pointed out by @rolfl
The new code is as follows. Is this better?...
2
votes
1
answer
831
views
Optimizing code using semaphore to control Netty channel pool
I am using Netty to exchange messages between a client and server. For this, I am maintaining a channel pool on client side. Please help me in optimizing this code.
...
1
vote
2
answers
3k
views
Large arrays make runtime very slow
So I have the following code that takes the input of two arrays, and apply some queries to match elements from DBpediaClassesArray with elements from ...