utilizando filas com php
Post on 14-Apr-2017
267 Views
Preview:
TRANSCRIPT
Utilizando Filas com PHP
Ivan RosolenFaculdade, Pós Graduação, Cursos e bla bla bla
Desenvolvedor a 15+ anosAutor de vários PHPT (testes para o PHP)
Entusiasta de novas tecnologiasMembro ativo do PHPSP
Head of Innovation @ Arizona
CTO @ Mokation
@ivanrosolen
AMQP
- Advanced Message Queueing Protocol
- Messaging Broker
- Network Protocol
- Platform Agnostic
- Port 5672
Advantages
- Get data from a to b
- Asynchronous
- Load balance and scalability
- System integrations
- Retry
Model
Publisher ConsumerExchange QueueRoutes ConsumesPublish
Components
- Exchanges
- Message Queues
- Bindings
- Channel
- Virtual Host
Exchange
- Routing agent
- Binding
- Routing key
- Direct exchange
- Fanout exchange
- Topic exchange
- Headers exchange
Exchange
Queue 1
routing_key: key1
Queue 2
Queue 3
routing_key: key2
routing_key: key3
Direct
Exchange
Queue 1
Queue 2
Queue 3
Fanout
Exchange
Queue 1
routing_key: app1.upload
Queue 2routing_key: *.download
routing_key: #.download
Topic
- Headers
- Slower
- More than one criteria for forwarding
Queue
- Durable or Temporary (server shutdown)
- Fifo?
- Dead letter
- Named by client or Server
- reply_to
Bindings
- Relationship
- Queue X Exchange X Virtual Host
Channel
- TCP
- SSL
- Lightweight connections that share a single TCP connection
Virtual Host
- /virtual_host
- Queue/exchange groups
Producer
- Batch
- Send message to an exchange
Consumer
- basic_ack
- Worker(s)
RabbitMQ
- PECL and Composer
- Easy to install, use and monitor
- Great docs
- Plugins
- Open source and commercially supported
Code
Refs
Githubhttps://github.com/ivanrosolen/queues-and-php
RabbitMQhttps://www.rabbitmq.comhttps://www.rabbitmq.com/getstarted.htmlhttps://www.rabbitmq.com/devtools.htmlhttps://github.com/rabbitmq
PHP AMQPhttps://github.com/php-amqplib/php-amqplib
????
Obrigado!
https://joind.in/talk/2bef6
Visite phpsp.org.br
top related