Find Jobs
Hire Freelancers

Consensus Server

$30-250 USD

Closed
Posted over 3 years ago

$30-250 USD

Paid on delivery
Your task is to develop a consensus server, and ensure that the code you develop is correct. The consensus server will JeroMQ use the ZeroMQ open source messaging library, receive proposed consensus values using threads, process them, and return the decided value as a result. You should create a new project using Maven. In order to use JeroMQ, you must include the following lines in the <dependencies> section of your [login to view URL] file: <dependency> <groupId>[login to view URL]</groupId> <artifactId>jeromq</artifactId> <version>0.5.2</version> </dependency> To run your project with external dependencies, you can use the following command line, where "[login to view URL]" is the name of your Java package, and "hwserver" is the name of the class you wish to execute. mvn exec:java -Dexec.mainClass='[login to view URL]' You should use the ZeroMQ framework to develop a multithreaded server. You may wish to consider the JeroMQ's multithreaded service code. JeroMQ's multithreaded service code creates a "router" and a "dealer." The router binds to a TCP port, and waits for client messages. The dealer transfers received messages to "worker" threads. Each worker thread should submit the value it received from a client, to a Consensus object. That consensus object should inherit from the abstract Consensus class. Note that there are several important differences between the Consensus class given here, and the one provided in your textbook. First, since there is no longer a 1:1 mapping between threads and calls to the decide method (a single thread might handle more than one call to decide() for different clients), each thread must provide a unique index of the client, when it calls the decide() method. Second, since the decide() method must function for an arbitrary number of threads, we now use a ConcurrentHashMap, instead of an array, for proposed. import [login to view URL]; import java.util.concurrent.*; abstract class Consensus { protected ConcurrentHashMap<Integer,Object> proposed = new ConcurrentHashMap<Integer,Object>(); public void propose(int threadIdx, Object value) { [login to view URL]("propose Id: " + threadIdx); [login to view URL](threadIdx, value); } abstract public Object decide(int threadIdx, Object val); } There are quite a few Consensus objects, and each has a Consensus number. Consensus Number Object 1 reader/writer registers 2 test & set, swap, fetch & add, queue, stack 2n-2 n-register assignment ∞ memory-to-memory move and swap, queue with peek, compare & swap, sticky register Some Consensus objects, such as stack, test & set, queue, and several others, have a corresponding data structure in Java. Others, such as sticky register, do not, and must be implemented separately. For example, sticky register can be implemented as follows.
Project ID: 26503283

About the project

4 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
4 freelancers are bidding on average $124 USD for this job
User Avatar
Hi Greetings from MDS! I would like to bid for this challenging opportunity . I have very good experience with core java and JMS/AMQP messaging systems . i understand your requirement and capable to implement all the features mentioned. Thanks MDS
$125 USD in 5 days
4.8 (11 reviews)
3.9
3.9
User Avatar
Hello There, I'm a Java Developer and i have a +3 Years Experience and I'm Ready to work With you on this Project.
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I have experience with ZeroMQ and a lot of experience with various different consensus protocols. I would be able to do this in one day, providing you with clean code that would get you an A. I read all of the instructions and will be able to deliver you exactly what is required for submission provided by the screenshots.
$90 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Minneapolis, United States
0.0
0
Member since Jul 9, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.