Fill in Order Details

  • Submit paper details for free using our simple order form

Make Payment Securely

  • Add funds to your account. There are no upfront payments. The writer will only be paid once you have approved your paper

Writing Process

  • The best qualified expert writer is assigned to work on your order
  • Your paper is written to standard and delivered as per your instructions

Download your paper

  • Download the completed paper from your online account or your email
  • You can request a plagiarism and quality report along with your paper

GeoTrack Servlet – Build a Java Servlet that provides a web service that tracks the locations of users who are roaming around with their mobile devices. Users can update the system with their current location.

Cont. of the question: They can also query the system to find people within a given distance of their location.

 

Description: Overview. Each user in the system is uniquely identified by a string ID (e.g. a MAC address or cell phone ID). Only the user themselves knows their unique ID, the rest of the world only sees a friendly name that users get to choose themselves. You are building a Java servlet that provides the following functions:

  • Update – Allows a user to update their current position. The user must supply their unique ID, their friendly name, and their current position.
  • Delete – Allows a user to remove themselves from the tracking servlet. The user must supply their unique ID.
  • Query – Allows a user to find the name, position and distance to all users within a given distance of the user. The user must supply their unique ID and the radius of interest (in meters).

Coordinate system. Mobile devices report their position in UTM coordinates. UTM coordinates consist of two float-point numbers, an easting and a northing. The easting specifies how many meters the device is to the east of a fixed grid reference location. Similarly the northing is how far the device is north of the grid reference. To calculate the distance between two positions in UTM coordinates, use the Pythagorean theorem. 

Web service input. You are building a servlet that provides a RESTful web service. The following GET parameters are accepted by the web service:

  • command – Specifies the desired function, parameters is a string: updatedelete, or query. Required by all requests.
  • id – Unique string specifying the user making the request. Required by all requests.
  • name – Friendly name the user wants to be displayed as. Required by the update command.
  • northing – The northing coordinate of the device. Required by the update command.
  • easting – The easting coordinate of the device. Required by the update command.
  • distance – The radius in meters the user wants to search for users. Required by the query command.

Web service output. The web service returns results in JSON format. Every response always contains a string field status. The status contains the string “OK” if the request was successful. If their was an error, the string contains a human-readable description of what went wrong (e.g. “ERROR: unable to parse distance as a floating-point value!”). Your servlet should be robust to bad requests and always return a well-formed JSON result with a status field. 

The only command with an additional result field is the query command. This command returns a field near containing an array with 0 or more elements. Each element in the array contains information about a user within the queried radius. The fields returned in each element are:

  • name – friendly name of the nearby user
  • northing – northing coordinate of the nearby user
  • easting – easting coordinate of the nearby user
  • distance – the distance calculated between the user who made the request and the nearby user
  • timestamp – when the nearby user last update their position, expressed as the number of seconds since Jan 1, 1970

Here is an example result from a query request:

{
    "status": "OK",
    "near": [
        {
            "name": "carol",
            "northing": 50,
            "easting": 150,
            "distance": 70.710678,
            "timestamp": 1362722508
        },
        {
            "name": "bob",
            "northing": 150,
            "easting": 150,
            "distance": 70.710678,
            "timestamp": 1362722494
        }
    ]
}

Pruning data. Users may disappear from the network without deleting themselves from the tracker. You need to implement a pruning mechanism. If more than 1 minute has elapsed since a user’s last update command, then you should delete that user from the tracker. This pruning should happen in a timely manner (i.e. within a few seconds of being over 1 minute stale, the user is deleted). 

Concurrency. Remember that only one instance of your servlet object will exist. This object may get called by multiple threads in parallel. This will almost certainly happen when I test your submission. Thus you should ensure that all access to non-thread safe variables is appropriately protected. You can test your program with the Apache benchmark utility ab with a concurrency > 1. 

Example implementation. The course schedule page has links to a working servlet implementation. You can experiment by directly typing in URLs with GET parameters to the servlet. There is also a HTML test client. The HTML client uses a PHP proxy page to avoid the cross-origin restriction of the AJAX requests (due to the different port numbers of the servlet and web server). 

Servlet details. You should build a Java servlet as an embedded Jetty application (see the Java Servlets lecture/links for example code). You will need to download a copy of Jetty v9. You can develop your servlet in Eclipse if you like or work on the command line. The schedule page has example unix scripts showing the JAR files you need on your CLASSPATH to compile and run an embedded Jetty servlet. You can obtain the handyjetty-all JAR file from /home/staff/vertanen/jetty/lib on katie

Your application should take a single command-line argument specifying the port to start the server on. You can assume any HTTP request to the server is for the servlet (i.e. the server does nothing but provide the web service).

 

P.S.: I will need the URL (and port) and the source files (codes).

 

More information: https://katie.mtech.edu/classes/csci470/assign/geotrack/

WHAT OUR CURRENT CUSTOMERS SAY

  • Google
  • Sitejabber
  • Trustpilot
Zahraa S
Zahraa S
Absolutely spot on. I have had the best experience with Elite Academic Research and all my work have scored highly. Thank you for your professionalism and using expert writers with vast and outstanding knowledge in their fields. I highly recommend any day and time.
Stuart L
Stuart L
Thanks for keeping me sane for getting everything out of the way, I’ve been stuck working more than full time and balancing the rest but I’m glad you’ve been ensuring my school work is taken care of. I'll recommend Elite Academic Research to anyone who seeks quality academic help, thank you so much!
Mindi D
Mindi D
Brilliant writers and awesome support team. You can tell by the depth of research and the quality of work delivered that the writers care deeply about delivering that perfect grade.
Samuel Y
Samuel Y
I really appreciate the work all your amazing writers do to ensure that my papers are always delivered on time and always of the highest quality. I was at a crossroads last semester and I almost dropped out of school because of the many issues that were bombarding but I am glad a friend referred me to you guys. You came up big for me and continue to do so. I just wish I knew about your services earlier.
Cindy L
Cindy L
You can't fault the paper quality and speed of delivery. I have been using these guys for the past 3 years and I not even once have they ever failed me. They deliver properly researched papers way ahead of time. Each time I think I have had the best their professional writers surprise me with even better quality work. Elite Academic Research is a true Gem among essay writing companies.
Got an A and plagiarism percent was less than 10%! Thanks!

ORDER NOW


Consider Your Assignments Done

“All my friends and I are getting help from eliteacademicresearch. It’s every college student’s best kept secret!”

Jermaine Byrant
BSN

“I was apprehensive at first. But I must say it was a great experience and well worth the price. I got an A!”

Nicole Johnson
Finance & Economics

Our Top Experts

See Why Our Clients Hire Us Again And Again!


OVER

10.3k
Reviews

RATING
4.89/5
Average

YEARS
13
Mastery

Success Guarantee

When you order form the best, some of your greatest problems as a student are solved!

Reliable

Professional

Affordable

Quick

Using this writing service is legal and is not prohibited by any law, university or college policies. Services of Elite Academic Research are provided for research and study purposes only with the intent to help students improve their writing and academic experience. We do not condone or encourage cheating, academic dishonesty, or any form of plagiarism. Our original, plagiarism-free, zero-AI expert samples should only be used as references. It is your responsibility to cite any outside sources appropriately. This service will be useful for students looking for quick, reliable, and efficient online class-help on a variety of topics.