Skip to content

This is a worker service for the TimeLiner application. It collects, and filters the data from external API service and store it in the database as well as manages it and serves as first level source/data provider on which the TimeLiner GraphQL API depends.

License

Notifications You must be signed in to change notification settings

happy-mammal/timeliner-worker-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heroku

timeliner-worker-service

This is a worker service for the TimeLiner application. It collect, ,filter, store, and manages the data into the database and provide the service at core level.

Functions / Tasks

  • Executes a script function based on cron scheduling.
  • Fetchs the data for specified category from Gnews API.
  • Filters the data as per the custom requirements.
  • Restructures the json object with custom data added to it.
  • Manages the firestore document size and pushes the indexes of the data in the document.
  • Pushes the indexed data to the firebase realtime database.
  • Creation and updation of new firestore document when no enough space is avaiable.

Implementations

  • Firebase Admin SDK
  • HTTP Requests
  • Cron Job /Scheduling
  • Firestore-Size

Where to use ?

You can use this if you want to:

  • Fetch and store the data from an API to Firebase Realtime Database / Firestore (Using Admin SDK).
  • Modifiy the data and restructuring the json object as per your need.
  • Reduse the firestore read/writes/deletes.
  • Manage and use firestore efficiently for a long time.
  • Execute the scripts/functions at scheduled intervals.

Folder Structure

📦timeliner_worker_service
┣ 📂config
┃ ┗ 📜config.js
┣ 📂utils
┃ ┣ 📜keywordsGenerator.js
┃ ┗ 📜queryDateGenerator.js
┣ 📜.env
┣ 📜.gitignore
┣ 📜app.js
┣ 📜LICENSE
┣ 📜package-lock.json
┣ 📜package.json
┣ 📜Procfile
┣ 📜README.md
┗ 📜script.js

Techs Used

License

About

This is a worker service for the TimeLiner application. It collects, and filters the data from external API service and store it in the database as well as manages it and serves as first level source/data provider on which the TimeLiner GraphQL API depends.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published