Greach 2013

Reactive Grails, simplificando las arquitecturas orientadas a eventos

Stéphane Maldini  · 

Transcripción

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

good morning and submit a bit early but we try to and we try to do something good now I won't present myself again that much I'm just a consultant from spring sauce and and that pretty much all in fact so why am I going to talk about reactive grace

well nowadays for the current use of the web frameworks I've seen we have one everyone can see we have a lot of frameworks talking about real-time web where we all time as a new definition in fact because it's not really real time but apply to the

web real time means a new set of views constant chatting video conferences collaborate collaborative applications and such so how how can we do that with grace without while we want most of the complexities underlying in fact because doing such application

can be very very boring if you if you start looking at the frameworks around that if you start looking at for instance well in grace we don't have a lot of choices to do that kind of thing but well if you start looking at how you do that from the very

scratch for instance if you start doing JavaScript application and doing web sockets in plain Tomcats even functions it can be very difficult and what I've tried to do with a couple of plugins i'm going to introduce i've tried to lower the complexity

of doing this kind of stuff and doing a synchronous walk in grace and i think it pays a walk it pays the road of ways free and we try to in great free will try to teach the web part from the call and include the event part in the call pretty much like vertex

and in fact as dream with line yesterday maybe great free will be able to work on vertex as an event bus engine so I see a couple of use case for events in the single GBM at least we we can use events for instance to loosely couple your application so if you

don't want to directly call method on your service and prefer to call call back using for instance event on major trip on mate registration you don't have to call the plug in directly to call the maid registration it's done for you because the

major situation is registering on the seventh topic so basically if someday you need to replace that plug-in with another one you can just drop in a new plug-in and nothing changed if the plug-in listens for the same address that's cool so your lovely

coupled it's pretty neat for testing because you don't really know you don't need to address the crowd directly so if you need to mock the you just need to register amok amok lisanna and and that's it you don't need to to do very complicate

well it's not complicated I'm bitching that you don't need to do meta object programming to replace the method gold etc not just about replacing the register in that case also events and such architecture can be used to to do declarative logic

if you look at entreprise integration some rocks such as camel or spring integration they allow you two to do the business logic in fact in in a declarative way as I in XML or in the Builder as I've showed yesterday but in other case you don't do the

conditional part so looping part the transforming part in the annual crowd you just plug components you declare component and you declare the way they talk each other and that's it you don't have to do that in your code so it's normally easier

to maintain its normally easier to talk with business users because you can just exchange the schema generated for an XML for instance and say okay this is my logic it's not that XML so is it good is it what you want it's better to talk with business

user with a schemer than a code and also events in memory can be useful scalability well if events are used as synchronously you can just throw a few events in parallel and for instance if you need to do massive in certain gone you can just launch three four

times a same event which does the insert and ratita would be executed in parallel so that can be interesting for in memory use case but also for cloud use cases because if you need to if you need to deploy multiple instances of I subjugation like in real life

prediction application you don't deploy a single grace application you need to deploy a cluster at least four high ever BTW if one fails and then another one to take the load well in that case you want to reuse resources you are deployed so events allow

you to to do that how so in fact if they even system is able to communicate to the other machine you don't you know need to know which machine is going to reply for this event or you can even send an event and every machines will will reply or do something

that can be interesting for instance when you need to synchronize your cash or you search index they are going to be the same on every machine for performance reasons but whenever someone needs to submit or save on machine the cash and the index the search

index need to be the same on every machine not only the machine which has been used to save a new object so in that case you can send an event or you can listen for save event and just synchronize in every machines and also I tend to do that a lot with springsource

customers in fact more and more with don t see architectures where everything is decoupled but each component of the architecture don't communicate through a protocol like rest or something like that said the customers don't choose rest animal to communicate

between components they use message brokers and miss engine and the event plugin try to build on top of that and that can be very useful in such architecture so an even worse is just a pipeline where you can just send events and probably register at some points

the listeners are component able to register to this pipeline you have to kind of publishing you have the point-to-point which is basically one sander and only one receiver and you have the publish-subscribe which is basically the 12 and parody including you

which means you will need to take that into account if you use the event because if you think that sending an event will only be applied to the other machines or other clients you're wrong because yourself will be part of the events publishing because

you are on the people subscribe button with the event pregnant fun moment so the ante visiting part is whenever your application is architecture it around that kind of patterns using an event birth to the coop everything at some point you can replace the event

bus and the reasoner's and use the same architecture to deploy your application in the cloud because finally if you even this if you even bus is a message broker well you cut the boundaries between application you sent it and even to an external server

[ ... ]

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