PHP SOA COMMUNICATION

With WSO2 AND SWARM ESB

by Tomasz Banasiak

SOA PROBLEM: COMMUNICATION

SOLVE DEPENCENCIES WITH ESB

Image: Josh Liba @ Flickr.com

 

SOA DEPENDENCY PROBLEMS

User

E-mail

Storage

SOA DEPENDENCY PROBLEMS

  • More and more dependencies, required or optional

  • Each service needs to know about each other

  • Non-standarized communication protocol

ENTERPRISE SERVICE BUS

INformation highway

Image: Bob Segal @ Flickr

WHAT IS ESB?

TODO: prepare better image for explaination

WHAT IS ESB?

  • Provides common communicating language

  • Endpoint communication available through diffrent  adapters (JSON, XML, RPC, REST)

  • Allows large range of message delivery confirmations

SIMPLE ESB EXAMPLE

TODO: add image with subscriber/sender example - subscribe for message and send message

ADDITIONAL FEATURES

  • testing new service version is much easier!

  • COMMUNICATE between services created in different technologies (PHP, NODE, JAVA etc)

  • KEEP Messages during Failures, deploys etc.

ESB WSO2

HARD TO LAUNCH, "EASY" TO USE

Image: Shane Casey @ Flickr

ESB WSO2

  • WRITTEN IN JAVA, DESIGNED FOR JAVA

  • HARD TO SETUP, EASY TO IMPLEMENT

  • LOTS OF POSSIBILITIES

  • REQUIRES AT LEAST VPS FOR ONE INSTANCE

ESB WSO2 AND PHP

  • CLIENT-server communication

  • MESSAGES MAY BE JSON, XML, PLAINTEXT, YAML

  • CAN BE SENT VIA SOAP, HTTP, REST, SOCKETS and more

  • HANDLES CALLBACKS TO PHP SCRIPTS

HOW DO WE USE ESB WSO2?

  • Distribute RabbitMQ packets via worker scripts

  • Provide additional backup for segmented services (keep messages)

  • Inform about system-wide events (registration etc)

  •  

  • TODO - ADD MORE.

SWARM ESB

INTELIGENT, STATEFUL MESSAGES

Image: Martin LaBar @ Flickr

WHAT ARE SWARMS?

TODO: image with comparison to bees and flowers (bees are inteligent messagers, delivers content when it's ready)

WHAT ARE SWARMS?

  • MESSAGES WITH STATE AND LOGIC

  • STOP PROPAGATION IF TASK IS DONE

  • SERVICES ARE AWARE OF MESSAGE STATE 

BASIC SWARMS LOGIC

  • SWARM

  • HOME

  • BROADCAST

SWARM ESB + PHP

  • TODO: PHP CLIENT EXAMPLE, maybe real working example?

SWARM ESB PROS AND CONS

  • Open Source

  • Lightweight

  • Swarms instead of messages

  • Blazing fast!

  • Easy to scale 

  • No native callback support

  • No official PHP client

  • SWARMS INSTEAD OF MESSAgES

  • DEBUGGING

ESB AND MICROSERVICES

USE IT OR NOT?

ESB - SHOULD I USE THIS?

  • Microservices are future

  • ESB ALLOw to replace service seamlessly

  • ESB ensures that message is delivered

  • you always need a central point - replace it with ESB

QUESTIONS?

THANK YOU!

If you have any further questions:

E-mail:   tomasz@banasiak.pro

WEB:        http://banasiak.pro

 

PHP SOA Communication with ESB WSO2 and Swarm ESB

By Tomasz Banasiak

PHP SOA Communication with ESB WSO2 and Swarm ESB

  • 1,623