You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,8 @@ Table of Contents:
82
82
|**[Kong API Gateway](projects/kong-api-gateway/README.md)** <br/> Deploying a Kong Gateway on containers to provide routing to functions. | CaaS & FaaS | Python |[Serverless Framework]|
83
83
|**[Serverless Gateway](https://github.com/scaleway/serverless-gateway)** <br/> Our serverless gateway for functions and containers. | API Gateway | Python |[Python API Framework]|
84
84
|**[Monitoring Glaciers](projects/blogpost-glacier/README.md)** <br/> A project to monitor glaciers and the impact of global warming. | S3 & RDB | Golang |[Serverless Framework]|
85
-
|**[Manage large message](projects/large-messages/README.md)** <br/> An example of infrastructure to manage large messages. | PaaS & S3 | Python |[Terraform]|
85
+
|**[Manage large message](projects/large-messages/README.md)** <br/> An example of infrastructure to manage large messages. | PaaS & S3 | Python |[Terraform]|
86
+
|**[Serverless scraping](projects/serverless-scraping/README.md)** <br/> An example of infrastructure to scrape the hackernews website. | PaaS & RDB | Python |[Terraform]|
This is the source code for the tutorial: [Create a serverless scraping architecture, with Scaleway Messaging and Queuing SQS, Serverless Functions and Managed Database](https://www.scaleway.com/en/docs/tutorials/create-serverless-scraping).
4
+
5
+
In this tutorial we show how to set up a simple application which reads [Hacker News](https://news.ycombinator.com/news) and processes the articles it finds there asynchronously, using Scaleway serverless products.
6
+
7
+
## Requirements
8
+
9
+
This example assumes you are familiar with how serverless functions work. If needed, you can
10
+
check [Scaleway official documentation](https://www.scaleway.com/en/docs/serverless/functions/quickstart/)
11
+
12
+
This example is written using Python and Terraform, and assumes you have [set up authentication for the Terraform provider](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs#authentication).
13
+
14
+
15
+
## Context
16
+
17
+
**The architecture deployed in this tutorial consists of two functions, two triggers, a SQS queue, and a RDB instance.**
18
+
*The producer function, activated by a recurrent cron trigger, scrapes HackerNews for articles published in the last 15 minutes and pushes the title and URL of the articles to an SQS queue created with Scaleway Messaging and Queuing.*
19
+
*The consumer function, triggered by each new message on the SQS queue, consumes messages published to the queue, scrapes some data from the linked article, and then writes the data into a Scaleway Managed Database.*
20
+
21
+
22
+
## Setup
23
+
Once you have cloned this repository, you just need to deploy using Terraform.
24
+
```bash
25
+
terraform init
26
+
terraform apply
27
+
```
28
+
29
+
30
+
## Running
31
+
32
+
Everything is already up and running!
33
+
You can check correct execution by using the Scaleway cockpit, and by connecting to your RDB instance to see results.
0 commit comments