@team: Monkey-Year-Horse-Month
Inspired by Jiayan Gan, the Ads searching system is an ads platform to rank and display ads for users.
By calculating the relativity between the user's query and the ads provided by merchants, this ads searching system displays the most relevant ads that users are most interested in so that user are more likely to click the ads. In the meantime, merchants can easily target the most potential customers and put the right ads with the lowest cost.
- Merchants provide a list of ads which contain keywords, bid price, and total budget. Our system store all the information and build the forwarded and inverted indexes.
- When user types the query on the search box, the system parses the query and calculates the relevant score between the query and the ads. Then the system processes a workflow to select, filter, price, and allocate the relevant ads.
- Finally the ads is sent and displayed to the user interface.
Lucene, Memcached, MongoDB, AngularJS+Bootstrap, Tomcat, JUnit, IntelliJ
Step1. Install MongoDB and Memcached
- Install mongodb and memcached by homebrew
- Start mongodb server:
$ mongod --config /usr/local/etc/mongod.conf
- Start memcached server:
$ memcached
Step2. Get source code from Github and run ads-searching-system server
- Clone the project from github:
$ git clone https://github.com/BitTigerInst/ads-searching-system.git
- Go to project folder, open the project in IntelliJ by the POM file
- Run
$ mvn clean install
to compile and install the project - Right click the
Main
java file under java folder, click onRun Main.main()
button
- Create an account on Heroku
- Login to Heroku, create an app on Heroku. Then you will get a random name as the first part of the url(i.e. https://random-name.herokuapp.com/). You can also specify a name for your project. So in our case the project url is https://ads-searching-system.herokuapp.com/.
- Add Memcached Cloud, mLab Mongodb as add-ons. These add-ons need account verification. So you need to set up a valid payment information. As for our project mLab MongoDB is free of charge if storage is under 496MB, and Memcached Cloud is free as well if memory size is under 30MB. More to read here and here
- Link your Github's targeted branch(in this case it's master branch) to Heroku so that latest changes can be shown on Heroku
- Update relevant settings for remote Memcached and MongoDB in the project, and push the latest changes to targeted branch
- Type the url(https://ads-searching-system.herokuapp.com/) to open the project on your browser
Bootstrap is a free and open-source front-end web framework for designing websites and web applications. Unlike many web framework, it concerns itself with front-end development only.
AngularJS is a complete JavaScript-based open-source client and server-side web application framework. It aims to simplify both the development and the testing of such applications by providing a framework for client-side MVC architectures, along with components commonly used in rich Internet applications.
Jetty is a Java HTTP (Web) server and Java Servlet container. It is often used for machine to machine communications, and it supports the latest Java Servlet API (with JSP support) as well as protocols HTTP/2 and WebSocket.
Apache Lucene is recognized for its utility in the implementation of Internet search engines and local, single-site searching. We utilize Lucene to parse the input query to lists of words in our project.
Memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read. In our project, we cache inverted index in order to speed up searching.
MongoDB is a free and open-source cross-platform document-oriented database. MongoDB avoids the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster.
Heroku is a cloud Platform-as-a-Service (PaaS) supporting several programming languages. It provides us one free instance to deploy our project without any cost. Plus, it contains lots of add-ons which are easy to use for our project.
JUnit is a unit testing framework to write repeatable tests. These unit tests are typically written and run by software developers to ensure that code meets its design and behaves as intended.
Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
- Project Overview
- Project Video by Jiayan Gan the project creator
- Slack for team meeting twice a week
- Trello for taking notes
- Heroku for deploying project in the cloud