Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Filas com PHP
Ivan Rosolen
Graduado em Sistemas de Informação
Pós-graduado em Gerência de Projetos
Desenvolvedor a 15+ anos
Autor de vár...
@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 2
routing_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
- Share the same connection
Virtual Host
- /virtual_host
- Queue/exchange groups
Producer
- Batch
- Send message to an exchange/queue
Consumer
- basic_ack
- worker
RabbitMQ
- PECL and Composer
- Easy to install, use and monitor
- Great docs
- Plugins
- Open source and commercially supported
Code
Refs
Github
https://github.com/ivanrosolen/queues-and-php
RabbitMQ
https://www.rabbitmq.com
https://www.rabbitmq.com/getstarted...
????
Obrigado!
https://joind.in/talk/d3ecc
Visite phpsp.org.br
Upcoming SlideShare
Loading in …5
×

Filas com php

279 views

Published on

O que são filas (queue)? Para que servem? Aonde e como utilizar com PHP?

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Filas com php

  1. 1. Filas com PHP
  2. 2. Ivan Rosolen Graduado em Sistemas de Informação Pós-graduado em Gerência de Projetos Desenvolvedor a 15+ anos Autor de vários PHPT (testes para o PHP) Entusiasta de novas tecnologias Head of Innovation @ Arizona CTO @ Mokation
  3. 3. @ivanrosolen
  4. 4. AMQP
  5. 5. - Advanced Message Queueing Protocol - Messaging Broker - Network Protocol - Platform Agnostic - Port 5672
  6. 6. Advantages
  7. 7. - Get data from a to b - Asynchronous - Load balance and scalability - System integrations - Retry
  8. 8. Model
  9. 9. Publisher ConsumerExchange QueueRoutes ConsumesPublish
  10. 10. Components
  11. 11. - Exchanges - Message Queues - Bindings - Channel - Virtual Host
  12. 12. Exchange
  13. 13. - Routing agent - Binding - Routing key
  14. 14. - Direct exchange - Fanout exchange - Topic exchange - Headers exchange
  15. 15. Exchange Queue 1 routing_key: key1 Queue 2 Queue 3 routing_key: key2 routing_key: key3 Direct
  16. 16. Exchange Queue 1 Queue 2 Queue 3 Fanout
  17. 17. Exchange Queue 1 routing_key: app1.upload Queue 2 routing_key: *.download routing_key: #.download Topic
  18. 18. - Headers - Slower - More than one criteria for forwarding
  19. 19. Queue
  20. 20. - Durable or Temporary (server shutdown) - Fifo? - Dead letter - Named by client or Server - reply_to
  21. 21. Bindings
  22. 22. - Relationship - Queue X Exchange X Virtual Host
  23. 23. Channel
  24. 24. - TCP - SSL - Share the same connection
  25. 25. Virtual Host
  26. 26. - /virtual_host - Queue/exchange groups
  27. 27. Producer
  28. 28. - Batch - Send message to an exchange/queue
  29. 29. Consumer
  30. 30. - basic_ack - worker
  31. 31. RabbitMQ
  32. 32. - PECL and Composer - Easy to install, use and monitor - Great docs - Plugins - Open source and commercially supported
  33. 33. Code
  34. 34. Refs
  35. 35. Github https://github.com/ivanrosolen/queues-and-php RabbitMQ https://www.rabbitmq.com https://www.rabbitmq.com/getstarted.html https://www.rabbitmq.com/devtools.html https://github.com/rabbitmq PHP AMQP https://github.com/php-amqplib/php-amqplib
  36. 36. ????
  37. 37. Obrigado! https://joind.in/talk/d3ecc Visite phpsp.org.br

×