particulum mobile: zend expressive microservices in … · zend expressive microservices in docker...
TRANSCRIPT
PARTICULUMMOBILE:ZENDEXPRESSIVEMICROSERVICESIN
DOCKERSWARMJanBurkl
SolutionConsultingManager
,Dortmund,November9th2017
RogueWaveSoftware
php.ruhr2017
EXPRESSIVE2.0ThePHPframeworkforMiddlewareapplications
PSR-7HTTPMessagesupport(using)
Supportoflambdamiddleware(PSR-15)anddoublepass($request,$response,$next)Pipingworkflow(using )Features:routing,dependencyinjection,templating,errorhandlingLastrelease2.0.3,28thMarch2017
zend-diactoros
zend-stratigility
MIDDLEWAREAfunctionthatgetsarequestandgeneratesa
response
usePsr\Http\Message\ServerRequestInterfaceasRequest;useInterop\Http\ServerMiddleware\DelegateInterface;
function(Request$request,DelegateInterface$next){//doingsomethingwith$request...//forinstancecallingthedelegatemiddleware$next$response=$next->process($request);//manipulatethe$responsereturn$response;}
INSTALLATIONYoucaninstallExpressive2.0using :
Choosethedefaultoptionsduringtheinstallation
composer
composercreate-projectzendframework/zend-expressive-skeletonapi
PERPETUUMMOBILE/FREEENERGY
Yourbrowserdoesnotcurrentlyrecognizeanyofthevideoformatsavailable.
ClickheretovisitourfrequentlyaskedquestionsaboutHTML5video.
PerpetualMotion-FreeEnergy
0:21/1:38
bitbucket.org/5square-rw/particulum-mobile-backend
bitbucket.org/5square-rw/particulum-mobile-master
MICROSERVICES
NoStandardDefinitionNoSpecificationNotspecifictoanyTechnology
“[...]acollectionoflooselycoupledservices.”
en.wikipedia.org/wiki/Microservices
DOCKERMICROSERVICEARCHITECTURAL
STYLE“[...]asuiteofsmallservices,eachrunninginitsownprocessandcommunicatingwithlightweight
mechanisms,oftenanHTTPresourceAPI”
martinfowler.com/articles/microservices.html
DOCKERSWARM(MODE)“CurrentversionsofDockerincludeswarmmodefornativelymanagingaclusterofDockerEnginescalleda
swarm.UsetheDockerCLItocreateaswarm,deployapplicationservicesto
aswarm,andmanageswarmbehavior.”
Swarminitialized:currentnode(bvz81updecsj6wjz393c09vti)isnow
Toaddaworkertothisswarm,runthefollowingcommand:
dockerswarmjoin\--tokenSWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx\172.17.0.2:2377
Toaddamanagertothisswarm,run'dockerswarmjoin-tokenmanager'
ROUTINGMESH“Theroutingmeshenableseachnodeintheswarmtoacceptconnectionsonpublishedportsforanyservicerunningintheswarm,evenifthere’s
notaskrunningonthenode.”
DANKESCHÖNContactme:jan.burkl[at]roguewave.com
Followme:
Slides:
@janatzend
5square.de/talks