Find Jobs
Hire Freelancers

Modify an old android based project

$30-250 USD

Geschlossen
Veröffentlicht vor mehr als 11 Jahren

$30-250 USD

Bezahlt bei Lieferung
Introduction Before reading further, you may wish to review the general project description from Old project: You can use this OLD PROJECT SOLUTION as your starting point. There is no change to the client side of the code. Follow the instructions in Oldproject to prepare and run your code. Only the server needs to be changed for this project. Creating the Request Matcher For this project, you will create a concurrent request-response matcher. In old project , every time a request or response is submitted, the server checks if the request/response can be assigned and if not possible, it was added to an internal list. For Project 8, we separate this into two different tasks, each to be executed as a thread. For this project the server will have two threads of execution. We will call them Listener thread and Matcher thread. The Listener is your 'main' thread. The Listener will listen for incoming connections. When it receives a request/response, the server adds it to either the request or response list and goes back to listening. In other words, this thread does NOT do any scheduling or matching. When the server starts, you need to create a new thread(the Matcher thread) that will monitor the set of requests and responses every 'x' seconds. This Matcher thread will wake up after 'x' seconds and check both request and response lists. If there are values in the request list that can be matched with a response, it will perform the matching - that is assign the request to the response. The Matcher thread will try to match all requests with responses before going back to sleep again. Implementation Server You should modify your Server class from Old project. The server should start a Matcher thread(see below) when it starts. Also you should modify your server logic in such a way that when messages are received, it is added to the request or response list and no assignment or matching happens. Your server should also take in two extra parameters from the command line - matching type and sleep time. This means now your server takes in 3 command line parameters java Server port matchtype sleep. eg: java Server 1234 FCFS 1000 means start the server at port 1234, with matching type FCFS and a sleep time of 1000 milli seconds. DataFeeder Interface Create a new interface DataFeeder with the code given below in the appropriate folder. Note the package structure and make sure your folder structure matches it. package ll give you public interface DataFeeder { a pseudo code will be provided; } Matcher Thread 'f', An implementation of DataFeeder interface. 'sleep', the sleep interval for the thread in milli seconds. 'matchingType', The type of matching to be performed. 'channel', The channel you have defined and initialized in the server. By using this, you can send messages to the responder and requester after each assignment. Every time the matcher thread wakes up, it calls methods in DataFeeder interface to assign requests to a response. If it cannot find a match, it will just go back to sleep. The thread keeps on matching as many requests and responses as possible. Once it has matched all possibilities, it goes back to sleep. You have to implement two kinds of matchers, FCFS in which the first request is matched with the first response and MostRecent in which the last request is matched with the last response first. package will be provided public class Matcher extends Thread { a pseudo code will be provided } } DataFeeder Implementation You need to create one class that implements the DataFeeder interface. This class should have request and response lists into which the main Listener thread keeps adding entries. Synchronization Issues You can use synchronized block/methods or use thread safe data structures like vectors to ensure this.
Projekt-ID: 3997142

Über das Projekt

4 Vorschläge
Remote Projekt
Aktiv vor 11 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
4 Freelancer bieten im Durchschnitt $185 USD für diesen Auftrag
Avatar des Nutzers
Hello, I have many years of experience in this field. Can you explain better what do you need for this project? I think that in 20 days i can give you the result . regards
$200 USD in 20 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
We are freelance software developers. If you contact me I can give a quote for your project and we can discuss the details. <b><i>Removed by Admin</i></b>
$140 USD in 1 Tag
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
Hello Sir, I can do this task.
$200 USD in 30 Tagen
0,0 (0 Bewertungen)
0,0
0,0
Avatar des Nutzers
Hi, I have 5 years of exp. in java/j2ee development.I would like to take up this project.
$200 USD in 20 Tagen
0,0 (0 Bewertungen)
0,0
0,0

Über den Kunden

Flagge von UNITED STATES
United States
0,0
0
Mitglied seit Nov. 12, 2012

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.