All Questions
17 questions
3
votes
1
answer
137
views
Amount Transfer Between Different Accounts - Improved Version
This is an improved code version for Amount Transfer Between Different Accounts
Welcoming any further improvements for this.
...
4
votes
1
answer
233
views
Amount Transfer Between Different Accounts
I implemented the below classes for transfer amount between different accounts. Used ConcurrentHashMap and Stamped Lock to handle concurrency.
Am I missing any important concepts here? Are there any ...
5
votes
2
answers
907
views
Reduce String Length With Thread Safety & Concurrency
I implemented the below URL Shortener class. Used ConcurrentHashMap to handle concurrency.
Short URL building logic may not be optimal, but it ensures that only ...
4
votes
1
answer
807
views
Bank with factory method for accounts, multithreaded deposit and withdraw
I have a couple questions about this program
Should I implement runnable instead of using thread class? I like the idea of the consumer and producer being thread objects, it seems simpler to me, but ...
2
votes
1
answer
1k
views
Modelling a Call Center in Java (multithreading approach)
I wanted to give a shot to Modelling a Call Center from Cracking the Coding Interview. The problem statement is as follows:
You have a call center with three levels of employees: Respondent, Manager,...
5
votes
1
answer
3k
views
Simple Java Download Manager
I have written a simple download accelerator in java which downloads the same file in multiple threads and then combines them all.
I would love some feedback on my design. How the same implementation ...
6
votes
1
answer
287
views
Send records to messaging queue using either of one policy
I have bunch of keys (clientKey) and values (processBytes) that I want to send to our messaging queue by packing them in one ...
4
votes
1
answer
389
views
Send data synchronously or asynchronously
I am using below class to send data to our messaging queue by using socket either in a synchronous way or asynchronous way as ...
8
votes
2
answers
459
views
Hotel power management
A Hotel needs to reduce the overall power used by the equipments installed in its many floors. So the Hotel Management has installed sensors, like Motion Sensors, etc at appropriate places .I have to ...
2
votes
2
answers
1k
views
ASCII to Binary and reverse in java
Here is a simple app that i am trying to implement in java.
my goal is to write a program that can convert ASCII to Binary and back.
Questions:
Am i violating any OOP Rule.
Is my code readable ?
...
7
votes
1
answer
7k
views
File downloader using Java, multithreading and HTTP Range request
I'm making a file downloader using Java. The project is on GitHub; I have included the most relevant excerpts here.
I separate the file into parts and download them using HTTP Range request, with ...
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
1
answer
54
views
Fetch data from co-processor on network in background
My code communicates with a Raspberry Pi (with a static IP address) running on a network. The client sends a signal to the Pi, and the Pi sends back a double (encoded as a string) with the angle ...
4
votes
1
answer
322
views
Dynamic voting protocol implementation for replicated file system
I recently implemented a dynamic voting protocol for a replicated filesystem. I would really appreciate it if you can review the design and some choices made with regards to sharing of Locks & ...
5
votes
2
answers
163
views
Blocking reads when writes are happening on two flows
I am trying to implement lock by which I want to avoid reads from happening whenever I am doing a write.
My requirements are:
Reads block until all three maps have been set for the first time.
Now ...