News Reader¶
This document shows how to implement a simple news reader using Ray. The reader consists of a simple Vue.js frontend and a backend consisting of a Flask server and a Ray actor. View the code for this example.
To run this example, you will need to install NPM and a few python dependencies.
pip install atoma
pip install flask
To use this example you need to
In the
ray/doc/examples/newsreaderdirectory, start the server withpython server.py.Clone the client code with
git clone https://github.com/ray-project/qreaderStart the client with
cd qreader; npm install; npm run devYou can now add a channel by clicking “Add channel” and for example pasting
http://news.ycombinator.com/rssinto the field.Star some of the articles and dump the database by running
sqlite3 newsreader.dbin a terminal in theray/doc/examples/newsreaderdirectory and enteringSELECT * FROM news;.