Package: amebo
AMEBOAmebo is the simplest pubsub server to use, deploy, understand or maintain. It was
built to enable communication between applications i.e. microservices or
modules (if you are using monoliths), and hopes to be able to serve as a small
but capable and simpler alternative to Kafka, RabbitMQ, SQS/SNS.STILL IN DEVELOPMENT: NOT READY FOR Production UseHow It WorksAmebo has only 4 concepts (first class objects) to understand or master.1. Microservices/ModulesThese are applications or modules you register on amebo - they send and receive events ;-)2. EventsSomething that can happen in an application, they are registered on Amebo by Microservices/Modules3. ActionsA HTTP request sent to Amebo to signal an event (action on event) has occured. Usually has a payload that
is forwarded by Amebo to all applications subscribed to the offending event4. SubscribersHTTP endpoints registered to watch specific/particular events (by Microservices/Modules)GETTING STARTEDThis assumes you haveinstalledAmebo on your machine. Amebo requiresPython3.6+# the easy pathpipinstallamebo
amebo--workers2--address0.0.0.0:8701# the hardway (manual installation) BUT not the only way... Sorry, I couldn't resist the pun ;-)gitclonehttps://github.com/tersoo/amebo
mvamebo/to/a/directory/of/your/choosingexport$PATH=$PATH:/to/a/directory/of/your/choosing/amebo# add amebo location to your pathambeo-w2-a0.0.0.0:87011st : Tell Amebo about all your microservices or applicationsendpoint: /v1/microservicesSchemaExample Payload{"$schema":"","type":"object","properties":{"microservice":{"type":"string"},"passkey":{"type":"string","format":"ipv4 | ipv6 | hostname | idn-hostname"},"location":{"type":"web"}},"required":["microservice","passkey","location"]}{"microservice":"customers","passkey":"some-super-duper-secret-of-the-module-or-microservice","location":"http://0.0.0.0:3300"}2nd : Register events that can happen in the registered microservicesendpoint: /v1/eventsEndpoint JSON SchemaExample Payload{"type":"object","properties":{"event":{"type":"string"},"microservice":{"type":"string"},"schemata":{"type":"object","properties":{"type":{"type":"string"},"properties":{"type":"object"},"required":{"type":"array"}}}},"required":["event","microservice","schemata"]}{"event":"customers.v1.created","microservice":"customers","schemata":{"$id":"https://your-domain/customers/customer-created-schema-example.json","$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"customer_id":{"type":"number"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["customer_id","email"]}}3rd : Tell Amebo when an event occurs i.e. create an actionendpoint: /v1/actionsKeyDescriptioneventIdentifier name of the event. (As registered in the previous step.)deduperDeduplication string. used to prevent the same action from being registered twicepayloadJSON data (must confirm to the schema registerd with the event)Endpoint JSON SchemaExample Payload{"type":"object","properties":{"event":{"type":"string"},"microservice":{"type":"string"},"schemata":{"type":"string","format":"ipv4 | ipv6 | hostname | idn-hostname"},"location":{"type":"web"}},"required":["microservice","passkey","location"]}{"event":"customers.v1.created","microservice":"customers","schema":{"$id":"https://your-domain/customers/customer-created-schema-example.json","$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"event":{"type":"string"},"microservice":{"type":"string"},"schemata":{"type":"string","format":"ipv4 | ipv6 | hostname | idn-hostname"},"location":{"type":"web"}},"required":["microservice","passkey","location"]},"location":"http://0.0.0.0:3300"}Finally: Create an endpoint to receive action notifications from AmeboOther applications/modules within the same monolith can create handler endpoints that will be sent the payload with optional
encryption if an encryption key was provided by the subscriber when registering for the event.Why? Advantages over traditional Message Oriented Middleware(s)Amebo comes complete with a Schema Registry, ensuring actions conform to event schema, and makes it easy for developers to search for events by
microservice with commensurate schema (i.e. what is required, what is optional) as opposed to meetings with team mates continually.GUI for tracking events, actions, subscribers. Easy discovery of what events exist, what events failed and GUI retry for specific subscribersGossiping is HTTP native i.e. subscribers receive http requests automatically at pre-registered endpointsInfinite retries (stop after $MAX_RETRIES and $MAX_MINUTES coming soon)TriviaThe wordamebois a West African (Nigerian origin - but used in Ghana, Benin, Cameroon etc.) slang used to describe anyone that never keeps what you tell them to themselves. A talkative, never mind their business individual (a chronic gossip).