0% found this document useful (0 votes)
35 views

Topic Cloudflare

Uploaded by

Y
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Topic Cloudflare

Uploaded by

Y
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Topic 1: "Building a URL Shortener System with Tracking and Analytics using

Cloudflare Workers and Durable Objects"

1. Title: "Building a URL Shortener System with Tracking and Analytics using
Cloudflare Workers and Durable Objects"

2. Cloudflare products to be used:


- Cloudflare Workers: To handle requests for creating short URLs and
redirections.
- Durable Objects: To store URL mappings and analytics data.

3. Logic description:
- Use Worker to handle requests:
- POST /shorten: Create a new short URL
- GET /:shortCode: Redirect to the original URL
- Use Durable Object to store mappings between short URLs and original URLs.
- When redirecting, record information about the visit:
- Access time
- User Agent
- IP address (anonymized)
- Referrer
- Implement endpoint to view statistics:
- GET /stats/:shortCode: Return statistics for a specific URL
- Use another Durable Object to store and aggregate analytics data.

4. Achievements:
Readers will create a system capable of:
- Creating short URLs from long URLs.
- Redirecting users from short URLs to original URLs.
- Tracking and analyzing visits for each short URL.
- Providing detailed statistics on traffic.

Topic 2: "Building a Content Version Management System with Cloudflare Workers and
Durable Objects"

1. Title: "Building a Content Version Management System with Cloudflare Workers and
Durable Objects"

2. Cloudflare products to be used:


- Cloudflare Workers: To handle API requests related to content.
- Durable Objects: To store and manage content versions.

3. Logic description:
- Use Durable Objects to store content and version history.
- Implement endpoints in Worker:
- POST /content: Create new content
- GET /content/:id: Get the current version of content
- PUT /content/:id: Update content (create a new version)
- GET /content/:id/versions: Get list of versions
- GET /content/:id/versions/:versionId: Get content of a specific version
- POST /content/:id/revert: Revert to a previous version
- Use diff and patch algorithms to efficiently store changes between versions.
- Implement a tagging system to mark important versions.
- Use Worker to calculate and display differences between versions.

4. Achievements:
Readers will create a system capable of:
- Managing multiple versions of content.
- Viewing, comparing, and restoring previous versions.
- Tracking content change history.
- Optimizing storage by only saving changes between versions.

Topic 3: "Building an Online Survey Management System with Cloudflare Workers and
Durable Objects"

1. Title: "Building an Online Survey Management System with Cloudflare Workers and
Durable Objects"

2. Cloudflare products to be used:


- Cloudflare Workers: To handle API requests related to surveys.
- Durable Objects: To store and manage survey data.

3. Logic description:
- Use Durable Objects to store survey structures and responses.
- Implement endpoints in Worker:
- POST /surveys: Create a new survey
- GET /surveys/:id: Get survey information
- PUT /surveys/:id: Update survey structure
- POST /surveys/:id/responses: Submit answers for a survey
- GET /surveys/:id/results: Get aggregated survey results
- Use Worker to handle logic for creating dynamic surveys based on templates.
- Implement a simple analysis system to aggregate survey results.
- Use Durable Objects to ensure consistency when multiple people respond
simultaneously.

4. Achievements:
Readers will create a system capable of:
- Creating and managing online surveys.
- Collecting responses from participants.
- Aggregating and displaying survey results.
- Handling multiple simultaneous survey participants.

You might also like