Top Banner
Filas com PHP
37

Filas com php

Apr 14, 2017

Download

Technology

Ivan Rosolen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Filas com php

Filas com PHP

Page 2: Filas com php

Ivan RosolenGraduado em Sistemas de InformaçãoPós-graduado em Gerência de Projetos

Desenvolvedor a 15+ anosAutor de vários PHPT (testes para o PHP)

Entusiasta de novas tecnologias

Head of Innovation @ Arizona

CTO @ Mokation

Page 3: Filas com php

@ivanrosolen

Page 4: Filas com php

AMQP

Page 5: Filas com php

- Advanced Message Queueing Protocol

- Messaging Broker

- Network Protocol

- Platform Agnostic

- Port 5672

Page 6: Filas com php

Advantages

Page 7: Filas com php

- Get data from a to b

- Asynchronous

- Load balance and scalability

- System integrations

- Retry

Page 8: Filas com php

Model

Page 9: Filas com php

Publisher ConsumerExchange QueueRoutes ConsumesPublish

Page 10: Filas com php

Components

Page 11: Filas com php

- Exchanges

- Message Queues

- Bindings

- Channel

- Virtual Host

Page 12: Filas com php

Exchange

Page 13: Filas com php

- Routing agent

- Binding

- Routing key

Page 14: Filas com php

- Direct exchange

- Fanout exchange

- Topic exchange

- Headers exchange

Page 15: Filas com php

Exchange

Queue 1

routing_key: key1

Queue 2

Queue 3

routing_key: key2

routing_key: key3

Direct

Page 16: Filas com php

Exchange

Queue 1

Queue 2

Queue 3

Fanout

Page 17: Filas com php

Exchange

Queue 1

routing_key: app1.upload

Queue 2routing_key: *.download

routing_key: #.download

Topic

Page 18: Filas com php

- Headers

- Slower

- More than one criteria for forwarding

Page 19: Filas com php

Queue

Page 20: Filas com php

- Durable or Temporary (server shutdown)

- Fifo?

- Dead letter

- Named by client or Server

- reply_to

Page 21: Filas com php

Bindings

Page 22: Filas com php

- Relationship

- Queue X Exchange X Virtual Host

Page 23: Filas com php

Channel

Page 24: Filas com php

- TCP

- SSL

- Share the same connection

Page 25: Filas com php

Virtual Host

Page 26: Filas com php

- /virtual_host

- Queue/exchange groups

Page 27: Filas com php

Producer

Page 28: Filas com php

- Batch

- Send message to an exchange/queue

Page 29: Filas com php

Consumer

Page 30: Filas com php

- basic_ack

- worker

Page 31: Filas com php

RabbitMQ

Page 32: Filas com php

- PECL and Composer

- Easy to install, use and monitor

- Great docs

- Plugins

- Open source and commercially supported

Page 33: Filas com php

Code

Page 34: Filas com php

Refs

Page 36: Filas com php

????

Page 37: Filas com php

Obrigado!

https://joind.in/talk/d3ecc

Visite phpsp.org.br