PHP UK Conference 2013

RabbitMQ en la práctica

Alvaro Videla  · 

Presentación

Vídeo

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

okay welcome everyone and this top will be rabbitmq handsome as you can see it will be only my hands on but that's a part of the plan my name is Alvaro I work for for vmware i'm actually a developer advocate for cloud foundry and RabbitMQ us as well

so this morning some guy asked me like so you work for three companies at the same time non-sexually being we're on classf andreea rabbitmq and i'm also if you know like from like the last century I created that I told me this is like six months ago

it's too too old I'm still like Jade riding the wave of Fame anyway and i'm the author of the google rabbitmq in action which i plan to give away today if you ever saw one of my talks you know how to get this book if you didn't then I will

I will find a way to give it away but in some conference in the airline conference mostly they know the secret anyway so my first question I need to ask is why do you need messaging and actually it should be why do we need messaging because yeah yeah I think

this is a bit pretentious to phrase that this way but anyway and to explain that I want to go through how we build like classic web apps and from there try to understand why we need messaging so let's say I always give this example i think is pretty straightforward

to follow and understand if we need to implement a photo gallery on image gallery and then we get some mock up with chase we need to upload a picture and then display the gallery pretty easy and and we say okay i can i can implement that it will take me one

week what not it's pretty simple until we start getting new requirement as usual I mean whoever sit down and implement something right away as it was defined I don't have that experience so we have a product owner let's say we are working in a

scrum kind of setup and this guy come to us and say can we also notify the user friends when she uploads a new image and I forgot to mention we need this for tomorrow so we start like okay this guy comes to us and say yeah can you cannot do it or what then

we have the social media group and it came to us and say we need bashes for users they return the upload a new picture and also we need to pause applause to Twitter there was a time when apps were really spamming Twitter about everything you you you you were

doing and yet then we have the sysadmin and what I was working we actually have Swiss admins but it's a slight distinction and this guy come to us and say damn you are delivering full size images the bandwidth has tripled I mean but I was just asked to

implement a photo gallery nobody said I had to resize images and of course this has to be fixed I mean if you are throwing money out of the window you have to fix it and I mean this sounds a bit funny but it actually happened in one of my previous companies

we had like a video delivery website so they were not happy with us so yeah then there is a developer and the other team sometimes we do continuous integration as the previous guy mentioned and he said that we need to call or pitch fits stuff from Python and

even maybe chala so why why do you want to do this kind of stuff and then there is a user which are all I mentioned him again very well explained yesterday we usually forget that there is a user behind the screen on the other side of the of the network and

as a user if I'm using your website I don't really give a dime if your application takes time researching an image if you need to tweet about it if you need to tell your your user if your admin needs to get an email that gear is a new image it needs

to be moderated or I'll I don't know what I just want to go to the forum click upload and see the image there that's all I care as a user and we as developers tend to forget that and we are always like new requirement we implemented we ship it

new government implementing a shipping and we really don't see that we are actually destroying the product we are working on so one of the goals of scrum is that you can come back with feedback to the product owners and tell me look do you really want

to do that you really want to run this query over a pattern of 20 gigabyte database or 200 gigabytes at a base we had this kind of requirements on a previous website I worked and yeah it was like the website was going to completely crawl if you do that but

if you just go and implement that then the user one like you and then there is us at the end of all this storm we just lay flip tables let's search for for something else to do so let's see the co-evolution i'm going to use cellular code here because

i think is a risk actually kind of a line code for those that know is not that bad black comments there are functions there are arguments and this is a function body that's pretty much it and there is no return it's just the last value that gets cold

is what the function returns so our first implementation was like okay we have a new image we get the request data whatever that is we have an image handler does the upload finito then the guys say okay but we have to resize the image so we went there resize

image finito we need to notify friends so we keep adding code there we need to add points to the user of course each of these changes require that we ready blow the code again we need that to treat the new image and so on so can this code scale to new requirements

because usually when we talk about scaling we say okay I like I will be in the cloud will learn shayana how many servers and then boom scale yeah but you need to think about also new requirements or if you need to scale down have less servers what happened

when you don't have that many users online do you really want to spend money on those many amazon web services or what what not so what if we need to speed up image conversion you have everything there in your controller how you do that or even yeah maybe

we are refactoring and we don't have really the actual image resizing code in the controller I mean if we do that we deserve to be working in some other industry but not really as developers anyway how do you speed up image conversion if you have your

big wave up and your controller there is calling a PHP function that does the resize you need to just have more PHP servers and if you have like a whole project where as it usually is with all the controls and whatnot you will be firing more PHP web servers

but you just need to have speed up in image combustion not really in some other controller that we don't really care what happens if the notification they need to send by be sent by email instead of Twitter or whatever what if we need to stop tweeting

about new images what if google decide that it needs a new social network and then you need to use that social network instead of Twitter what if you need to resize in different formats what happened if you need to swap the language or the technology without

downtime yeah for example though doing image resize okay in the in the case of that in PHP if not that bad because you're using imagemagick probably which is in C so would be fast enough but if you're doing like XML parsing or JSON or I don't know

[ ... ]

Nota: se han omitido las otras 3.598 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.