Giter VIP home page Giter VIP logo

test_cchannel's Introduction

1. Queue Problem

Problem

  • Imagine we are integrating an Email Service Provider into our app.
  • We need to send mass emails to announce a new campaign with 50k influencers at same time.
  • The ESP limits our sending process to 119/hour

Your Task

  • Clone this repository https://github.com/lemon-platform/lemon-test-queue-problem
  • Create database on /database/database.sqlite
  • Run php artisan migrate:fresh --seed to seed with 50k influencers
  • Create a command to send notifications to all influencers php artisan lemon:blast-new-campaign
  • The handle() function will create a job to notify all influencers about the new campaign
  • Use MailMessage to notify influencers via email
<?php

(new MailMessage)
  ->greeting('Hello!')
  ->line('We have a new campaign for you')
  ->line('Try new beauty product from Revlon')
  ->action('View Campaign', 'https://www.google.com');
  • Prepare your explanations in meeting with your repository prepared

Scoring

  • Demonstrate how you build
    • Dev environment with Laravel + MailHog
    • Laravel command php artisan lemon:blast-new-campaign
    • jobs to send notifications to influencers
    • create notifications with MailMessage
  • Demonstrate how you throttle email sending
    • Without timeout
    • Sending limit below process
    • Monitor job task with Laravel Horizon

Reference

  1. https://www.helloinbox.email/#reputation on warmup section
  2. Job Middleware https://laravel.com/docs/9.x/queues#job-middleware
  3. Notification https://laravel.com/docs/9.x/notifications

test_cchannel's People

Contributors

zulkifliraihan avatar imsus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.