ly16/Java-Web-Service

Repository files navigation

This is a restaurant search and recommendation web service (backend) to improve personal experience for restaurant seekers. The project would provide a Java service and a database to process and store data.

Preparation: Eclipse Java EE, Apache Tomcat server, Postman


  • API(by Yelp API)
  • Show items near your location (named SearchItems)
  • Set favored items (named VisitHistory)
  • Recommend new items (named RecommendItems)
  • HTTP methods (GET, POST, PUT, DELETE)

It is an open API for public users to access information from Yelp such that we can fetch real restaurant information including name, description, location, category, etc. It plays a role as the following:

When the number of user is large, we need DSMS to manage data. We can fullfill functions like store all of informations related to each user, retrieve data based on conditions quackly, update, add or delete data timely, access data with authorization. We involve four tables in our case:

  • users - store user information.
  • items - store item information.
  • history - store user favorite/purchase history (many-to-many).
  • category - store item-category relationship (many-to-many).

E.g. we want to get the table of history

http://localhost:8080/Titan/history?user_id=1111

  • User-based method(similarity of users)
  • Item-base method(similarity of items)
  • Content-based recommendation(similarity of characterastics)

When the recommendation system does not contain enough users/data, we use contend-based method firstly, combined with user/ item-based recommendation method. In this case, We recommend restaurants with similar categories as those in history table and rank items based on distance.


  • Items in history table

  • Recommendations by different latitude and longitude

http://localhost:8080/Titan/recommendation?user_id=1111&lat=37.38&lon=-122.08


http://localhost:8080/Titan/recommendation?user_id=1111&lat=40.73&lon=-73.94


http://localhost:8080/Titan/recommendation?user_id=1111&lat=27.99&lon=-81.76

About

A Java web service by Apache Tomcat for personalized restaurants recommendation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published