Conejo Architecture

1.438 visualizações

Publicada em

Abstract notes about my in progress framework

Publicada em: Tecnologia, Educação
0 comentários
0 gostaram
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Sem downloads
Visualizações totais
No SlideShare
A partir de incorporações
Número de incorporações
Incorporações 0
Nenhuma incorporação

Nenhuma nota no slide
  • Conejos is a Actor that user a Serializer. The message is sent with Properties. It is responsible for setting up any temporary queue to receive a reply and then send it back to the application. Dispatcher is an actor derived from a rabbit consumer that receives messages. It uses a serializer based on properties to construct case classes and pass it to the Worker Actor. Config is a simple extension of a AbstractConfig to allow the registration of the Worker Actor. It can be eliminated forcing a trait to the Worker. This could be solved scaning the class path for certaing types and registering it to dispacher.
  • 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 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 </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 Bind 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!