{"id":3242,"date":"2011-04-19T08:09:46","date_gmt":"2011-04-19T06:09:46","guid":{"rendered":"http:\/\/blog.jteam.nl\/2011\/04\/19\/axon-framework-1-0-released\/"},"modified":"2011-04-19T08:09:46","modified_gmt":"2011-04-19T06:09:46","slug":"axon-framework-1-0-released","status":"publish","type":"post","link":"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/","title":{"rendered":"Axon Framework 1.0 released!"},"content":{"rendered":"<p>It has been an exciting year. Little over a year ago, I started developing a framework to make it easier for developers to implement a highly scalable en extensible architecture. The first public Axon release (0.3) came out in April 2010, and was far from feature complete. Now, almost a year later, Axon has proven to be production ready and has been successfully employed in several projects around the world. <\/p>\n<p><!--more--><\/p>\n<h2>Background<\/h2>\n<p>Axon Framework aims at making it easier to build scalable and extensible applications. While many other products and frameworks around are doing the same, Axon Framework distinguishes itself by tackling the problem at the root: in the architecture. Axon Framework provides the building blocks and components for developers to easily build an application using the Command-Query Responsibility (CQRS) and Event Driven Architecture (EDA) patterns.<\/p>\n<p>CQRS is in essence a very simple architectural pattern. All it dictates is that an application should be split into roughly two components: one that processes commands and that performs state changes, and another that provides state information of the application by processing queries. This simple separation of concerns is the basic requirement to build an application that can easily scale, without adding a lot of complexity.<\/p>\n<p>The command handling component and the query component need to share their data, somehow. CQRS doesn\u2019t specify how this is done. One way to do this, is by writing to a (replicated) persistent model (e.g. database), on which the query component executes its queries. Another way is by generating events from the command component, which are picked up by the query component(s). <\/p>\n<p>An Event Driven Architecture is a very clean and simple way to promote scalability and extensibility in an application. Since the publishers aren\u2019t aware of the components that are listening to an event, it is very easy to plug-in extra event handling components. To scale, several identical event handling components can be employed to handle a larger amount of events simultaneously. Whether these components live on the same machine, or inside a cloud environment doesn\u2019t matter, as longs as there is a transport mechanism between them.<\/p>\n<p>Having all state changes represented using events provides another powerful business opportunity. By storing these events, you have a very reliable and complete audit trail of all the state-changing activity in your application. Even better, you can use this audit trail as the persistence model in your command handling component. This is called Event Sourcing.<\/p>\n<h2>Core features<\/h2>\n<p>The Axon Framework provides all the building blocks that are required to implement a CQRS and EDA based architecture. The \u201chard parts\u201d, like consistency guarantees, transactional command handling and event publishing as well as complex business transaction management, are all made a lot easier.<\/p>\n<h3>Command Handling<\/h3>\n<p>Command Handling starts with a client, a user interface or another system expressing the intent to change state by sending a command. Axon Framework provides Command Bus implementations that will dispatch the command to an appropriate command handler. When required, the command bus will make sure the client is notified when the command has been processed.<\/p>\n<h3>Event publishing and handling<\/h3>\n<p>Axon provides a mechanism to publish Events to the interested event listeners. Publishing events is done using the Event Bus. In contrast to the Command Bus, the Event Bus will publish each event to all the listeners. This allows for flexible extension of your application and making it easy to host components on several physically separated environments.<\/p>\n<h3>Command model, persistence and event sourcing<\/h3>\n<p>Commands need to be processed. Typically, this is done using a domain model that implements the business process and rules defining what should be done based on an incoming command. Axon Framework provides the base classes needed to help you implement such a model.<\/p>\n<p>Once a model\u2019s state changes, this state needs to be persisted. Whether you prefer Object-Relational Mapping to store the state in a relational database, or want to leverage the power of an Event Store, in Axon Framework it\u2019s just a matter of configuring the right type of repository and\/or event store. Axon provides support for storing models and events using JPA, which means that virtually all relational databases are supported, with minimal learning curve.<\/p>\n<h3>Annotation support<\/h3>\n<p>Defining a method as a command handler or event handler is as easy as adding an annotation to it. Axon Framework will process these annotations during application startup and register the appropriate handlers with the command- or event bus. If you don\u2019t like annotations, you can also work without them. <\/p>\n<h3>Asynchronous transactional event processing<\/h3>\n<p>In some cases, it is desirable to process events in the tread that publishes them. In other cases, it is better to hand off the event to the handler, and continue without waiting. In Axon Framework, that\u2019s as easy as adding an annotation on the Event Listener. The listener will automatically be wrapped in order to handle events asynchronously, while keeping the opportunity to handle the events within a transaction. Axon can automatically detect and discard \u201cpoison messages\u201d to prevent a single failing event from blocking the entire system.<\/p>\n<p>Axon also allows developers to define a sequencing-policy, which defines that specific events need to be processed sequentially, in order to prevent concurrency issues in a backing data-store. <\/p>\n<p>Axon never creates a thread on its own. Instead, it relies on Executors to provide execution capacity. This makes it very suitable to run in application servers that provide advanced monitoring and thread management services.<\/p>\n<h3>Advanced transaction management<\/h3>\n<p>ACID transactions defy the scalability of an application, especially if the transaction runs over several resources (which typically requires two-phase commit). Furthermore, ACID transactions often provide little more than false security with the great price of availability and performance.<\/p>\n<p>The principles of CQRS and EDA provide developers the ability to use the published events to manage BASE-transactions. These transactions will make sure that \u201ceventually\u201d, all components are synchronized. Typically, eventually is within milliseconds. However, when certain systems are busy or have failed, BASE transaction provide a much more flexible way to resolve these problems. Typically, waiting for a system to come back up is not a problem, while ACID transaction will inevitably fail.<\/p>\n<p>Axon Framework provides components that allow developers to build these transaction managers, which are called Sagas in CQRS. In combination with annotation support, creating a Saga just requires adding an annotation on the methods that need to be invoked when specific events occur. Axon will ensure that the correct Saga instances are invoked with the correct Events. Therefore, a single Saga instance will only need to manage a single business transaction.<\/p>\n<h2>Seamless integration with Spring Framework<\/h2>\n<p>Although using Axon Framework in combination with the Spring Framework is not a requirement, there are features in Axon Framework that are much easier when combined. For example there is namespace support for easy configuration of all Axon components and Axon can be easily connected with Spring\u2019s PlatformTransactionManager to provide transaction support, just the way you\u2019re used to.<\/p>\n<p>Especially Spring\u2019s Component Scan feature works very well in combination with Axon\u2019s annotation support. To create an Event Handler, for example, only two annotations are required. Spring\u2019s @Component will tell Spring to wire an instance as a Spring Bean, while the @EventHandler annotation on a method will tell Axon to register that handler on the Event Bus.<\/p>\n<p>When deploying applications on sev<br \/>\neral servers, Axon leverages Spring Integration as a transport mechanism for Events. This is done by subscribing an adapter on the event bus that forwards Events to a Spring Integration Channel. From there on, you can use Spring Integration\u2019s simple and powerful pipes and filters architecture to dispatch and process events, even remotely.<\/p>\n<h2>Roadmap<\/h2>\n<p>Although this 1.0 release is a major milestone and definitely reason for a party, it is far from the end of Axon\u2019s development cycle. The 1.0 release has opened up the road to provide building blocks to enhance scalability even more. <\/p>\n<p>One thing to expect in upcoming versions is Command Bus implementations that support routing and remoting. This allows you to deploy command handling components on several machines and have the load balanced between them.<\/p>\n<p>We will also be working on support for connecting Event Busses in several application using AMQP message brokers. Work has already been started to set up a connection with SpringSource\u2019s RabbitMQ, a fast, scalable and reliable message broker based on AMQP standards.<\/p>\n<h2>Obtaining Axon Framework<\/h2>\n<p>Axon Framework is available under the Apache 2 license. Its libraries and sources are available for download in the Maven Central Repository. Documentation is available on-line at <a href=\"http:\/\/www.axonframework.org\/docs\">http:\/\/www.axonframework.org\/docs<\/a>.<\/p>\n<p>If you prefer a single download containing all libraries, source code, printable PDF documentation and dependencies, you can download the full package from <a href=\"http:\/\/www.jteam.nl\/products\/axonframework\">http:\/\/www.jteam.nl\/products\/axonframework<\/a>.<\/p>\n<h2>Training and support<\/h2>\n<p>Axon Framework is open source and free to use and distribute. Generally, questions are answered as soon as possible and bugs are solved within a reasonable timeframe. However, you might benefit from JTeam\u2019s professional services in the form of support contracts and consultancy services. For more information about JTeam, visit <a href=\"http:\/\/www.jteam.nl\">www.jteam.nl<\/a>.<\/p>\n<p>If you want to get a head-start in learning how to use Axon\u2019s features at their best, workshops and trainings are organized. The workshops consist of a single day, where the background concepts of CQRS and EDA are explained to give you an overview of how scalable architectures are built up. The 2-day training is an intensive full-immersion training that aims at giving trainees the opportunity to do labs and exercises themselves. The workshops can be tailored to your specific requirements. Workshops can also be combined with consultancy and project kick-start. For more information about the workshop and trainings, visit <a href=\"http:\/\/www.jteam.nl\">www.jteam.nl<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has been an exciting year. Little over a year ago, I started developing a framework to make it easier for developers to implement a highly scalable en extensible architecture. The first public Axon release (0.3) came out in April 2010, and was far from feature complete. Now, almost a year later, Axon has proven [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[81,31,98,10],"tags":[80,9],"class_list":["post-3242","post","type-post","status-publish","format-standard","hentry","category-axon-framework","category-java","category-microservices","category-development","tag-axon-framework","tag-open-source"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Axon Framework 1.0 released! - Trifork Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Axon Framework 1.0 released! - Trifork Blog\" \/>\n<meta property=\"og:description\" content=\"It has been an exciting year. Little over a year ago, I started developing a framework to make it easier for developers to implement a highly scalable en extensible architecture. The first public Axon release (0.3) came out in April 2010, and was far from feature complete. Now, almost a year later, Axon has proven [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/\" \/>\n<meta property=\"og:site_name\" content=\"Trifork Blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-04-19T06:09:46+00:00\" \/>\n<meta name=\"author\" content=\"Allard Buijze\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Allard Buijze\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/\",\"url\":\"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/\",\"name\":\"Axon Framework 1.0 released! - Trifork Blog\",\"isPartOf\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#website\"},\"datePublished\":\"2011-04-19T06:09:46+00:00\",\"author\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/a4e232a11dc57a2c4c581956ce6fde63\"},\"breadcrumb\":{\"@id\":\"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trifork.nl\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Axon Framework 1.0 released!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trifork.nl\/blog\/#website\",\"url\":\"https:\/\/trifork.nl\/blog\/\",\"name\":\"Trifork Blog\",\"description\":\"Keep updated on the technical solutions Trifork is working on!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trifork.nl\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/a4e232a11dc57a2c4c581956ce6fde63\",\"name\":\"Allard Buijze\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3e7130b2465615e105b1addd400a3f06?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3e7130b2465615e105b1addd400a3f06?s=96&d=mm&r=g\",\"caption\":\"Allard Buijze\"},\"description\":\"Allard (@allardbz) is CTO of Trifork Amsterdam and founder of Axon Framework. He is a trainer and speaker at conferences on topics related to scalable architecture and domain driven design. He strongly believes that good craftsmanship can only be achieved through continuous and intensive exchange of experience with others. The last years, he has been investigating and applying CQRS to a number of projects. As a result, he created the Axon Framework, an open source Java framework that helps developers create scalable and extensible applications. Axon has a growing community and has already been successfully introduced in several high-profile projects around the world.\",\"url\":\"https:\/\/trifork.nl\/blog\/author\/allard\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Axon Framework 1.0 released! - Trifork Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/","og_locale":"en_US","og_type":"article","og_title":"Axon Framework 1.0 released! - Trifork Blog","og_description":"It has been an exciting year. Little over a year ago, I started developing a framework to make it easier for developers to implement a highly scalable en extensible architecture. The first public Axon release (0.3) came out in April 2010, and was far from feature complete. Now, almost a year later, Axon has proven [&hellip;]","og_url":"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/","og_site_name":"Trifork Blog","article_published_time":"2011-04-19T06:09:46+00:00","author":"Allard Buijze","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Allard Buijze","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/","url":"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/","name":"Axon Framework 1.0 released! - Trifork Blog","isPartOf":{"@id":"https:\/\/trifork.nl\/blog\/#website"},"datePublished":"2011-04-19T06:09:46+00:00","author":{"@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/a4e232a11dc57a2c4c581956ce6fde63"},"breadcrumb":{"@id":"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/trifork.nl\/blog\/axon-framework-1-0-released\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trifork.nl\/blog\/"},{"@type":"ListItem","position":2,"name":"Axon Framework 1.0 released!"}]},{"@type":"WebSite","@id":"https:\/\/trifork.nl\/blog\/#website","url":"https:\/\/trifork.nl\/blog\/","name":"Trifork Blog","description":"Keep updated on the technical solutions Trifork is working on!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trifork.nl\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/a4e232a11dc57a2c4c581956ce6fde63","name":"Allard Buijze","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3e7130b2465615e105b1addd400a3f06?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e7130b2465615e105b1addd400a3f06?s=96&d=mm&r=g","caption":"Allard Buijze"},"description":"Allard (@allardbz) is CTO of Trifork Amsterdam and founder of Axon Framework. He is a trainer and speaker at conferences on topics related to scalable architecture and domain driven design. He strongly believes that good craftsmanship can only be achieved through continuous and intensive exchange of experience with others. The last years, he has been investigating and applying CQRS to a number of projects. As a result, he created the Axon Framework, an open source Java framework that helps developers create scalable and extensible applications. Axon has a growing community and has already been successfully introduced in several high-profile projects around the world.","url":"https:\/\/trifork.nl\/blog\/author\/allard\/"}]}},"_links":{"self":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/3242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/comments?post=3242"}],"version-history":[{"count":0,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/3242\/revisions"}],"wp:attachment":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/media?parent=3242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/categories?post=3242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/tags?post=3242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}