O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Conejo Architecture

1.450 visualizações

Publicada em

Abstract notes about my in progress framework

Publicada em: Tecnologia, Educação
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Conejo Architecture

  1. 1. Conejo Architecture and Major Components Abstract notes on Conejo @paulosuzart [email_address]
  2. 2. What is it? <ul><li>An AMQP based framework for distributed Scala Actor execution. </li></ul><ul><li>It is delivered with </li></ul><ul><ul><li>A RabbitMQ Java API Abstraction for Scala </li></ul></ul><ul><ul><li>An Actor Server that runs the registered Actors </li></ul></ul>
  3. 3. What it is intended to be <ul><li>Simple to implement </li></ul><ul><li>Fast to run </li></ul><ul><li>Easy to manage </li></ul><ul><li>AMQP issues transparent </li></ul><ul><li>Standalone (with Conejo Server) </li></ul><ul><li>Embedded (as a Scala lib into your app) </li></ul>
  4. 4. Requirements <ul><li>Reliable delivery of messages </li></ul><ul><ul><li>AMQP with RabbitMQ </li></ul></ul><ul><li>Work purely – or almost – with Scala actors </li></ul><ul><ul><li>A simple Trait to extend </li></ul></ul><ul><li>Minimal and optional configuration/setup for AMQP </li></ul><ul><ul><li>Most RabbitMQ configurations done by default </li></ul></ul><ul><li>JSON format for message transfer </li></ul><ul><li>Auto recovery of failed Actor Servers </li></ul>
  5. 5. Architecture Application <<actor>> Conejo RabbitMQ Conejo Server Conejo Server Conejo Server ! !? JSON Content JSON Content Worker Actor Worker Actor Worker Actor ! ! JSON Content !?
  6. 6. Major Components Application <<actor>> Conejo <<actor>> Dispatcher <<actor> Worker Any application using Conejo throgh the Conejo Actor Actor runing on client and responsable to request serialization Serializer and send/receive messages to/from predefined Conejo Queues or Reply Queues Runs for eatch Actor Server. This actor is the primary receiver of AMQP Messages. Is responsible for invoking the Serializer and send messages to reply queues The Actor that performs the actual wished logic
  7. 7. Major Components <<actor>> Serializer Config Small piece of optional configurations inside the Singleton subclass of the Actor Server Actor responsible to serialize or deserialize byte[] to messages whose types are indicated In AMQP message propertyes.
  8. 8. Use cases <ul><li>Async invocations without return value </li></ul><ul><li>Async invokations with reply in a temporary queue </li></ul>
  9. 9. Use case – Async invocations without return value <<actor> Worker rabbitMQ Actor in Queue Conejo Actors Topic Actor Server Application Bind xc.in.K 1 2 <<actor>> Conejo <<actor>> Serializer <<actor>> Dispatcher <<actor>> Serializer Config <ul><li>Conejo sends messages through the topic xcintopic </li></ul><ul><li>Every Actor Server consumes its own Queue </li></ul><ul><li>The Queue is bound to xcintopic with the routin key xc.in.K </li></ul><ul><li>K is the name of the server or an overriden value </li></ul>
  10. 10. Use case – Async invocations with reply in a temporary queue <<actor>> Conejo <<actor> Worker rabbitMQ Actor in Queue Temp Reply Queue Conejo Actors Topic Distributed Actor Config Conejo Reply Direct Application <<actor>> Serializer Bind xc.in.K Bind xc.in.R 1 2 3 4 <<actor>> Dispatcher <<actor>> Serializer Config <ul><li>Conejo declares a temporary queue </li></ul><ul><li>The queue is bound to Direct xcredirect with the queu name as routing key </li></ul><ul><li>Dispatcher sends replies to Conejo declared temporary queue through xcredirect Direct Exchange </li></ul>
  11. 11. Status <ul><li>First steps in </li></ul><ul><ul><li>Configuration implementation </li></ul></ul><ul><ul><li>Dispatches implementation </li></ul></ul><ul><li>Small tests already running using this primitive constructs </li></ul><ul><li>Not publicly available yet </li></ul>
  12. 12. Thanks!