Database and Web Technologies
Backend:
- Java
- Java Spring Boot Framework
Database:
- MySQL
Frontend:
- PHP
- Javascript
- HTML5, CSS and Bootstrap - Intellij Idea,
- Postman
- Eclipse - Doston Hamrakulov
- Sagar KafleSoftware Engineers, Web Developers, Freelancers
- - 1.The backend aggregates and processes the data of the various web feeds.
- - It can handle multiple standards of web feeds, supporting at least one version of RSS and the Atom format.
- - It prevents the updating of web feeds in a too small time interval, so that it waits at least 10 minutes between two requests for a web feed (and blocks other requests to do so).
- - It ensures a consistent storage of the data in a database.
- - Existing records can also be updated, but no duplicates are created.
- - Records that have reached a certain age are deleted and no longer inserted. By default, this age should be 30 days.
- - The database stores the aggregated and processed data of the web feeds.
- - It can also be used to store the configuration.
- - The frontend must never communicate directly with the database.
- - The REST based interface provides communication between the frontend and the database.
- - It delivers the data from the database to the frontend.
- - It can also be used to store configuration settings in the database.
- - Furthermore, it is possible to use the REST based interface to initiate an update of the web feeds by the backend. Therefore, it is not necessary to implement a proactive service which automatically performs the update.
- - The information of all web feeds can be displayed. The following details must at least
be available:
- - a)title of the content
- - b)clickable link to the webpage with the actual content
- - c)date when the content was published according to the web feed
- - d)date when the entry in the web feed first got detected by the program
- - e)provider where the content is available
- - The display of the contents of individual providers, i.e. web feed links, can be enabled or disabled.
- - Usability aspects are taken into account.
- - The design is appealing.
- - The following information can be displayed for each provider:
- - a)address (URL) of the web feed
- - b)date of the last successful update of the web feed
- - c)Date of the latest record according to information from the web feed (the date should also be available if all records are older than the threshold for deleting old records and therefore no record of the web feed is in the database anymore)
- - d)date of the last attempt to update with the number of records found or an indication of an error that occurred during the update attempt
- - At least five different working web feeds and a malfunctioning web feed are available for demonstration purposes.
-
- The backend can also handle "broken" web feeds that do not fully adhere to the labelled standard.
-
- For each record, there is a detail view that shows the contents included in the web feed.
-
- The time interval for the web feed update blockade and the age for deleting old records can be set via the frontend.
-
- The complete web feed management takes place via the frontend, whereby at least the following options exist beyond the previous display options:
- - Insert new web feeds with address (UsRL) and display name, which is also used in the overview
- - Modify the entry of a web feed (change the URL or display name) while preserving existing records in the database
- - Delete the entry of a web feed, deleting all associated data from the database
-
- It is possible to export the data of the web feeds selected in the frontend view as a new web feed in RSS or Atom format. This export should also be reachable via a normal URL with a GET request and contain all stored data. Ultimately, this should make it possible to transform a web feed from RSS to Atom format or vice versa.
-
- It can handle multiple standards of web feeds, supporting at least one version of RSS and the Atom format.
- - supporting RSS format
- - supporting Atom format
-
- It prevents the updating of web feeds in a too small time interval, so that it waits at least 10 minutes between two requests for a web feed (and blocks other requests to do so).
-
- Records that have reached a certain age are deleted and no longer inserted. By default, this age should be 30 days.
-
- Connecting to Database
-
- Queries over DB with Spring
-
- APIs for web_feed_providers
-
- APIs for web_feed
-
- APIs for User
-
- APIs for User Login
-
- RSS Reading
- - Validating RSS data
- - Reading whole RSS file from url
- - Getting individual RSS items
- - Validating RSS items before inserting into DB
-
- Writing individual RSS items into DB in time interval
- - checking whether a link is present or not
- - Consitancy of data like whether title is there or published date
-
- Getting all new web feeds from web feed provider when program starts
-
- sdds
-
- Update web_feed_provider
-
- Delete all feeds of web_feed_provider after provider is deleted
-
- Rewrite delete method of web_feed_providers properly with userid
- - Check if feed_provider exists or not
- - Check if a user exists or not
- - return Status Code, OK, NOT FOUND
- - Make DELETE request
-
- Inserting web feeds when a provider is added
- - checking whether a link is present or not
- - Consistancy of data like whether title is there or published date
-
- getting number of all feeds -- GET request
-
- getting number of feeds for a specific provider -- GET request
-
- It prevents the updating of web feeds in a too small time interval, so that it waits at least 10 minutes between two requests for a web feed (and blocks other requests to do so). Sagar
-
- It ensures a consistent storage of the data in a database.
-
- Existing records can also be updated, but no duplicates are created
- - based on title and published date
-
- Records that have reached a certain age are deleted and no longer inserted. By default, this age should be 30 days.
-
- Furthermore, it is possible to use the REST based interface to initiate an update of the web feeds by the backend. Therefore, it is not necessary to implement a proactive service which automatically performs the update.
-
- The display of the contents of individual providers, i.e. web feed links, can be enabled or disabled.
-
- Date of the latest record according to information from the web feed (the date should also be available if all records are older than the threshold for deleting old records and therefore no record of the web feed is in the database anymore)
-
- date of the last attempt to update with the number of records found or an indication of an error that occurred during the update attempt
-
-
-
- The time interval for the web feed update blockade and the age for deleting old records can be set via the frontend.
-
- Fixing userid is always zero while adding provider
-
- Deleting all feeds when their provider is deleted by id
16 June 2019
- - updating number of Feeds of a provider
- - updating Latest_record_date of a provider(it means taking a publishedDate of latest web_feed and inserting into the provider)
- - update providers of a user based on his/her update-period
- - The backend can also handle "broken" web feeds that do not fully adhere to the labelled standard.
- - For each record, there is a detail view that shows the contents included in the web feed.
- - The time interval for the web feed update blockade and the age for deleting old records can be set via the frontend.
- - The complete web feed management takes place via the frontend, whereby at least the following
options exist beyond the previous display options:
- - Insert new web feeds with address (URL) and display name, which is also used in the overview
- - Modify the entry of a web feed (change the URL or display name) while preserving existing records in the database
- - Delete the entry of a web feed, deleting all associated data from the database
- - It is possible to export the data of the web feeds selected in the frontend view as a new web feed in
RSS or Atom format. This export should also be reachable via a normal URL with a GET request
and contain all stored data. Ultimately, this should make it possible to transform a web feed from
RSS to Atom format or vice versa.
- - Exporting as JSON to Frontend is done
- - Converting JSON into RSS or ATOM Sagar
- - add a user --- PUT request
- - http://localhost:8080/user/add-user Request:
{
"email": "user1@gmail.com",
"name": "user1",
"password":"user1@"
}Response:
Created - CREATED 301
or bad quest- - log in a user request -- POST request
{
"email": "user1@gmail.com",
"password":"user1@"
}Response:
{
"id": 1084,
"email": "user1@gmail.com",
"name": "user1",
"password": "user1@",
"status": 0,
"feedage": 0,
"updateperiod": 0
}
with Status code: FOUND 302
or
HTTP Status Code: NOT_FOUND- - update feed-age by id and feed-age PUT request
- - http://localhost:8080/user/update-feed-age Request:
{
"id": 101,
"feedage": 22
}Response
{
"id": 101,
"name": "user1",
"email": "user1@gmail.com",
"status": 1,
"feedage": 22,
"updateperiod": 55
}
with Http Status: OK (200)
if not found, it will return Status: BAD_REQUEST(400)- - update update-period by id and update-period PUT request
{
"id": 101,
"updateperiod": 66
}Response
{
"id": 101,
"name": "user1",
"email": "user1@gmail.com",
"status": 1,
"feedage": 22,
"updateperiod": 66
}
with Http Status: OK (200)
if not found, it will return Status: BAD_REQUEST(400)- - get all users --- GET request
Response:
[
{
"id": 101,
"email": "user1@gmail.com",
"name": "user1",
"password": "user1_pass",
"status": 1,
"feedage": 30,
"updateperiod": 1
}
]
with Http Status: FOUND (302)
if not found, it will return Status: NOT_FOUND (404)- - get user by id --- --- GET request
- - http://localhost:8080/user/?id=101 Response:
{
"id": 101,
"email": "user1@gmail.com",
"name": "user1",
"password": "user1_pass",
"status": 1,
"feedage": 30,
"updateperiod": 1
}
with Http Status: FOUND (302)
if not found, it will return Status: NOT_FOUND (404)- - request for Update button --- --- GET request
- - http://localhost:8080/user/update-button?id=101 Response:
{
"last_updated_date": "Wed, 03 Jul 2019 15:54:01 CEST",
"current_date": "Wed, 03 Jul 2019 16:02:11 CEST",
"updated_ago": "8",
"updated_willbe": "Wed, 03 Jul 2019 16:04:01 CEST",
"updated": "False"
}
with Http Status: OK- - getting all web_feed_providers: --- GET request
[
{
"id": 1,
"name": "Name_1",
"link": "https://www.espn.com/espn/rss/news",
"updateddate": "Sat, 22 Jun 2019 19:57:38 CEST",
"latestrecorddate": "",
"lastattempt": "Sat, 22 Jun 2019 19:57:38 CEST",
"numfeeds": 32,
"error": 3,
"userid": 101
},
...
]
with Http Status: OK
if not found, it will return Status: 404 Not Found- - getting a web_feed_provider by id --- GET request
- - http://localhost:8080//web-feed-provider/{provider} -- provider=1
Response will be :
{
"id": 1,
"name": "Name_1",
"link": "https://www.espn.com/espn/rss/news",
"updateddate": "Sat, 22 Jun 2019 19:57:38 CEST",
"latestrecorddate": "",
"lastattempt": "Sat, 22 Jun 2019 19:57:38 CEST",
"numfeeds": 32,
"error": 3,
"userid": 101
}
with Http Status: OK
if not found, it will return Status: 404 Not Found- - deleting a web_feed_provider by id --- DELETE request
Response HTTP OK- - adding Web Feed Proviver - POST request
{
"name":"Name_1",
"link" : "https://rss.nytimes.com/services/xml/rss/nyt/Technology.xml",
"userid":11
}
- - get all web_feed_providers by user_id: GET request
[
{
"id": 1,
"name": "Name_1",
"link": "https://www.espn.com/espn/rss/news",
"updateddate": "Sat, 22 Jun 2019 19:57:38 CEST",
"latestrecorddate": "",
"lastattempt": "Sat, 22 Jun 2019 19:57:38 CEST",
"numfeeds": 32,
"error": 3,
"userid": 101
},
...
]- - delete a provider by user_id - DELETE request
Deleted with Status code: OK 200
or
cannot delete with Status code: NOT_FOUND 404- - update a provider with new number of feeds, updateDate, LastAttempDate, LatestFeedDate
- - http://localhost:8080//web-feed-provider/update-provider -- PUT request Request:
{
"id": 1173,
"updateddate": "Tue, 11 Jun 2019 00:30:19 CEST",
"latestrecorddate": "Tue, 30 Jun 2019 00:30:21 CEST",
"lastattempt": "Tue, 30 Jun 2019 00:30:21 CEST",
"numfeeds": 130
}
Reponse:
1 (Updated) with Status code: OK 200
or
0(cannot update) with Status code: NOT_FOUND 404- - update a provider with new name and link
- - http://localhost:8080/web-feed-provider/update-only-provider -- PUT request Request:
{
"id": 1173,
"name": "New name",
"link": "new url"
}
Reponse:
Updated with Status code: OK 200
or
cannot update with Status code: NOT_FOUND 404- - update a provider with new number of feeds, updateDate, LastAttempDate, LatestFeedDate
- - http://localhost:8080//web-feed-provider/update-error-of-provider -- PUT request Request:
{
"id": 1173,
"error": 111
}
Reponse:
Updated with Status code: OK 200
or
cannot update with Status code: NOT_FOUND 404- - getting a web_feed by id
- - http://localhost:8080/feeds/{id} -- id=2 GET request
Response:
{
"id": 2,
"title": "Round-by-round picks from the NBA draft",
"link": "https://www.espn.com/nba/draft/rounds",
"description": "Check out every pick from 1-60, including Zion Williamson and Ja Morant as the top two selections.",
"publisheddate": "Fri, 21 Jun 2019 04:28:35 CEST",
"importeddate": "Fri, 21 Jun 2019 14:27:11 CEST",
"providerid": 1,
"deleted": "False",
"error": "True"
}
with Http Status: OK
if not found, it will return Status: 404 Not Found- - http://localhost:8080/feeds/all ----> GET request Response will be:
[
{
"id": 2,
"title": "Round-by-round picks from the NBA draft",
"link": "https://www.espn.com/nba/draft/rounds",
"description": "Check out every pick from 1-60, including Zion Williamson and Ja Morant as the top two selections.",
"publisheddate": "Fri, 21 Jun 2019 04:28:35 CEST",
"importeddate": "Fri, 21 Jun 2019 14:27:11 CEST",
"providerid": 1,
"deleted": "False",
"error": "True"
},
...
]
with Http Status: OK
if not found, it will return Status: 404 Not Found- - get a single web feed by a link
- - http://localhost:8080/feeds/link - POST request RequestBody:
{
"link": "https://www.nytimes.com/2019/06/08/world/americas/mexico-tariffs-migration.html?emc=rss&partner=rss"
}
ResponseBody:
[
{
"id": 2,
"title": "Round-by-round picks from the NBA draft",
"link": "https://www.espn.com/nba/draft/rounds",
"description": "Check out every pick from 1-60, including Zion Williamson and Ja Morant as the top two selections.",
"publisheddate": "Fri, 21 Jun 2019 04:28:35 CEST",
"importeddate": "Fri, 21 Jun 2019 14:27:11 CEST",
"providerid": 1,
"deleted": "False",
"error": "True"
},
...
]
with Http Status: FOUND
if not found, it will return Status: NO_CONTENT- - adding a single web feed - POST request
- - http://localhost:8080/feeds/add Request:
{
"title": "Title_3",
"link": "Link4",
"description": "Description4",
"publisheddate": "cfbfgb1",
"importeddate": "bfgbfgb fg",
"providerid": 1,
"deleted": "False",
"error":"False"
}
Reponse:
with Http Status: Created
if not found, it will return Status: BAD_GATEWAY- - Get total number of web feeds
- - http://localhost:8080/feeds/number-of-feeds --- GET request Response is Integer number:
88
with Http Status: OK
if not found, it will return Status: BAD_GATEWAY
- - get all feeds by provider_id: --- GET request
[
{
"id": 2,
"title": "Round-by-round picks from the NBA draft",
"link": "https://www.espn.com/nba/draft/rounds",
"description": "Check out every pick from 1-60, including Zion Williamson and Ja Morant as the top two selections.",
"publisheddate": "Fri, 21 Jun 2019 04:28:35 CEST",
"importeddate": "Fri, 21 Jun 2019 14:27:11 CEST",
"providerid": 1,
"deleted": "False",
"error": "True"
},
...
]- - delete feeds by provider_id - DELETE request
Deleted with Status code: OK 200
or
cannot delete with Status code: NOT_FOUND 404- - delete feeds by provider_id and userid - DELETE request
{
"id": 1003,
"userid": 102
}Response:
Deleted with Status code: OK 200
or
cannot delete with Status code: NOT_FOUND 404- - Update a web_feed--- PUT request
- - http://localhost:8080/feeds/update Request:
{
"title": "Updated again",
"link": "https://www.nytimes.com/2019/06/10/world/asia/sewol-ferry-accident.html?emc=rss&partner=rss",
"publisheddate": "Mon, 10 Jun 2019 23:54:20 CEST"
}Response:
Updated with Status code: OK 200
or
cannot update with Status code: BAD_REQUEST- - Export feeds --- GET request
- - http://localhost:8080/feeds/export?ids=1322,1323,1324,1325,1326 --- ids are separated by commas Response:
[
{
"id": 2,
"title": "Round-by-round picks from the NBA draft",
"link": "https://www.espn.com/nba/draft/rounds",
"description": "Check out every pick from 1-60, including Zion Williamson and Ja Morant as the top two selections.",
"publisheddate": "Fri, 21 Jun 2019 04:28:35 CEST",
"importeddate": "Fri, 21 Jun 2019 14:27:11 CEST",
"providerid": 1,
"deleted": "False",
"error": "True"
},
...
with Status Code: OK
]- - Get total number of web feeds for a specific provider
- - http://localhost:8080/feeds/num-of-feeds-of-provider?providerid=1173 --- GET request Response is Integer number:
88
with Http Status: OK
if not found, it will return Status: NOT_FOUND- - update "deleted" of web feed status of a feed
- - http://localhost:8080/feeds/delete-feed?id=2142 --- PUT request Response
Deleted
with Http Status: OK
or
"Error occured" Status Code: INTERNAL_SERVER_ERROR- - modify a web feed
- - http://localhost:8080/feeds/update-feed-by-user --- PUT request Request
{
"id": 3918,
"title": "New name",
"link": "htvdfvdfvdfvdftps://www.nytimes.com/2019/06/18/worlssdvsdfvsfvfd/africa/congo-ethnic-violence-ebola.html?emc=rss&partner=rss"
}
Updated
with Http Status: OK
or
"Error occured" Status Code: INTERNAL_SERVER_ERRORSetup: - Installing Rome in Eclipse