getting groovier-with-vertx

Download Getting groovier-with-vertx

If you can't read please download the document

Upload: intelligrape

Post on 10-May-2015

1.447 views

Category:

Technology


0 download

DESCRIPTION

Demo application available at https://github.com/hiteshBhatia/vertx-imagetransformation.git

TRANSCRIPT

  • 1.1GettingGroovier withH i te s h B h a ti aG R 8 C of Eu r op e 2 0 1 3 , M a y 2 2 n d -2 4 t h, Cop enha g en, D enm a r k

2. 2Hitesh BhatiaSenior Software EngineerIntelligrape SoftwareAboutMe 3. 3AGENDAWhat is Vert.xKey advantages of Vert.xKey ConceptsHow it worksInternalsWhy Vert.xDemosSummary 4. 4C10KWhy is it becoming prominent ? MobileTabletsLaptopsLong lived connectionsWhyVert.x ? 5. 5Asynchronous / Event basedprogramming modelWhat isVert.x ?PolyglotScalableAnd Simple applicationframework. 6. 6Polyglot NatureRuns on JVMEasy ScalabilityVert.xAdvantages ofHybrid Model 7. 7VerticleEvent BsKey ConceptsVert.xEvent BusEvent loopWorker threadModule 8. 8Unit of deploymentCould be a Java class with a main methodor a groovy scriptVerticle runs inside a Vertx instance, which runs inside itsown JVM instance.VerticleVerticle 1 Verticle 2Vert.xInstance 9. 9Publish/Subscribe pattern or P2P MessagingCommunication channel for the verticles.Involves registering, unregistering of handlers,and sending, publishing of messages.Event BusVerticle 1 Verticle 2EVENT BUSVert.xInstance 10. 10Executes handlers synchronously on a single threadEvent LoopVerticle 1 Verticle 2EVENT BUSVert.xInstanceEventLoopManaged by vert.x instanceMultiple events loops inside a vert.x instance 11. 11Uses background pool of threadsWorker VerticleVerticle 1 Verticle 2EVENT BUSVert.xInstanceEventLoopUsed for tasks that require blockingOr long running tasks lineWorkerThreadPool 12. 12ReuseableModulesVerticle 1 Verticle 2EVENT BUSVert.xInstanceEventLoopCan be implemented in any languageCommunicates viaEventbus onlyWorkerThreadPoolModule can also be of type workerModule 13. 13BigPictureVerticle 1 Verticle 2EVENT BUSVert.xInstanceEventLoopWorkerThreadPoolModule ModuleVerticleVert.xInstance 14. 14Vert.XDEMOVerticle 15. 15Vert.XINTERNALSVert.x uses the following open source projectsOPENSOURCEPROJECTSJRuby for itsRuby engineNetty for muchof its networkIOGroovy Mozilla Rhino for itsJavaScript engineJython for itsPython engineHazelcast for groupmanagement ofcluster members 16. 16Image TransformationsVert.XDEMOAPPLICATION 17. 17Vert.xDemoApplication ArchitectureWorker.groovy Worker.rb Worker.pyAppliesblur effectApplies SepiaeffectAppliespixelate effectPUSHESTASKSTO QUEUEviaEventBusProducer(Groovy)Queue(Groovy)Consumer(Groovy)LISTENSTOQUEUEvia EventBusUses Vert.xModUses Vert.xModAssignsWork CONSUMER(STARTS THREE WORKER VERTICLES) ASSIGNSWORK TO WORKER VERTICLESEVENT BUS 18. 18Vert.xDemoApplication ArchitectureProducer(Groovy)Uses Vert.xModEVENT BUSWritten in groovyPushes tasks to queueRuns as a part of a clusterPRODUCER 19. 19Vert.xDemoApplication ArchitectureQueue(Groovy)Uses Vert.xModEVENT BUSWritten in groovyUses vertx mod vertx-work-queueUses MongodbSends tasks registered verticles (Consumer)QUEUE 20. 20Vert.xDemoApplication ArchitectureConsumer(Groovy)AssignsWorkEVENT BUSWritten in groovyStarts three workers verticlesRegister with queueAssigns work to workers verticleCONSUMER 21. 21Vert.xDemoApplication ArchitectureWorker. groovy Worker. rb Worker. pyAppliesblur effectApplies SepiaeffectAppliespixelate effectEVENT BUSThree workers, all implemented in different languages Groovy, Ruby and PythonApply specific transformation on imagesDont interact within themselvesWORKERS 22. 22Vert.xDemoApplication ArchitectureEVENT BUSUsed for communicationEVENT BUS 23. 23Runs on JVMSummaryEvent bus acts as main communication channelHybrid threaded modelAllows polyglot programmingEasy scalabilityVery suitable for real-time web-applications 24. 24SOMETHINGSTOLOOK FORWARD TOVert.x 2.0Scala Support Uses Netty 4.0 Gradle integration for creating builds Language support available as modules Better IDE support Application that help in creation of modulesYoke Framework 25. 25http://www.intelligrape.com/blog/author/hitesh/d1_rickyGithub : https://github.com/vert-x/vert.xWebsite : http://vertx.io/Google Group : vert.xTHANKYOUPROJECTINFOSPEAKERINFO