All Questions
8 questions
1
vote
2
answers
133
views
ProducerConsumerSimulation.java: practicing concurrent programming in Java
Intro
This time, I was in the mood for concurrent programing (ProducerConsumerSimulation.java). To this end, I have ended up with the code below. My primary concerns are:
Class design is trash,
The ...
2
votes
2
answers
524
views
Write deduplicated 9-digit numbers from concurrent clients to a log
Problem Statement:
Write a server (“Application”) in Java that opens a socket and restricts input to at most 5 concurrent clients. Clients will connect to the Application and write any number of 9 ...
1
vote
1
answer
1k
views
Concurrent Queue with enqueue and dequeue using Stack as underlying data structure
This is a mix of data structure and multi threading concept based question. (This is only for understanding and learning purpose) The language for the solution : Java
A Queue with FIFO behavior needs ...
1
vote
0
answers
943
views
Socket server with consumer-producer design to handle concurrent connections
The usual way is to implement socket server to handle concurrent requests by creating new thread for each request.
Instead of this approach i tried to create a server using ...
5
votes
2
answers
730
views
Pausing and resuming a concurrent database update queue
I have a class DatabaseQueue which asynchronously runs SQLite updates that it takes from a LinkedBlockingQueue.
I implemented a ...
1
vote
1
answer
750
views
Find pairs of consecutive numbers fetched from blocking queues
I was coding for the following programming question:
Suppose you have two independent blocking queues that will keep getting new data, the new data will always be greater than the last element of ...
3
votes
1
answer
197
views
Receptive map queue
I've written a class I call ReceptiveMapQueue. Its purpose is to organize the internal structure of an AFKable RPG. It only has two public methods - dumping entries ...
-2
votes
2
answers
693
views
Simple Implementation of a BlockingQueue
An implementation of BlockingQueue
...