Categories
Java

Using actors for The Internet of (Lego) Trains

Using actors for The Internet of (Lego) Trains

237f560 Using actors for The Internet of (Lego) Trains

Johan is working as a Java architect and competence center Java lead at Info Support. He has been working for various demanding companies where rapidly delivering quality software was very important. Currently he is working in a DevOps team in a big financial institution in The Netherlands as Java architect. He likes sharing his knowledge about Java, continuous delivery, DevOps, software quality and numerous other subjects. Johan regularly writes articles and gives presentations about those subject for instance at JavaOne, JavaLand, JBCNConf, JavaCro, ConFESS and J-Fall.

Using actors for The Internet of (Lego) Trains

Jim is working as a Java consultant at Info Support. He is currently working at the Dutch railway company where they are building the future of railway control. Jim likes learning new things as much as applying and sharing his current knowledge

Last year we started a new Internet of Things project: The Internet of (Lego) Trains. In our normal jobs we use languages like Java and Scala to build applications for large organizations. We wanted to find out if we could use the same languages and tools on IoT hardware. We also wanted to investigate whether or not (remote) actors could replace REST endpoints in our applications. Next to that it was also a good excuse to play with Lego. The Lego trains are equipped with a Raspberry Pi, camera, wireless dongle, infrared transmitter, speaker, RFID reader and battery pack. Next to that we have automated switch tracks and camera’s again with the help of Raspberry Pi’s. We also build some lightning effects with LEDs controlled by Particle Photon’s. On top of that we also automated a Lego ferris wheel. To control the trains and other parts we built an remote actor based application with Scala, Akka, Akka HTTP and AngularJS. In this session we will talk about our experiences and challenges and of course we will give a live demo!

Categories
Java

An Architecture with CQRS and Event Sourcing

An Architecture with CQRS and Event Sourcing

photo An Architecture with CQRS and Event Sourcing

Eugen Paraschiv is an engineer with a passion for Java, Spring, REST, TDD, and more recently producing great video. He spends most of his time teaching, writing, curating the weekly review and wearing many other hats on baeldung.com. He spoke at many JUG meetings, the Spring IO in Barcelona, as well as several live webinars (he holds one every two weeks). Right now he is working on a course (REST With Spring).

In this talk, I will share my experience building and deploying an event-sourced, CQRS Spring application. You will learn about the challenges of separating the update model from the query model in a complex domain, how commands naturally lead to events and to an event based system, and how these events get projected into useful, eventually consistent views. You will also learn about using the right type of persistence for each projection – Spring Data JPA for some, Spring Data Elasticsearch for others, etc. Finally – we’ll see how Projections can be separated from one another and run independently in separate Spring Contexts, separate processes and even separate hardware. The fact that Projections are just another name for Microservices is just gravy.