Lightbend Podcast Ep. 09: Andreas Evers test drives Lagom in comparison with Spring Cloud
Tonya Rae Moore: Hi, and welcome to Lightbend AMA podcast. My name is Tonya Rae Moore, and I am the Community and Field Programs Manager for Lightbend. Today, I'm going to be talking to Andreas Evers (@andreasevers) from Ordina.
He recently co-authored a blog post about Lagom and what they were finding when they played with it for the first time. So we're going to sit down and talk to him for a little bit. So Hi, Andreas.
Andreas Evers: Hello. How's it going?
Tonya Rae Moore: Good. We were already talking about our time difference before we started recording so it's 5:15p for you. Are you ready to get out of work?
Andreas Evers: It's almost finished here so I'm happy.
Tonya Rae Moore: Nice. It's 10a here so just getting started. All right, so we're going to start you off easy, and ask you my standard question which is if you could tell us a little bit about your background. And what led you to be interested in Lagom, and Lightbend, and write this post?
Andreas Evers: Well, first of all, thanks for inviting me to this awesome podcast series. I've actually been working for Ordina for the past eight years. We are a consultancy company, and we're working mostly in Belgium and the Netherlands, and we're always looking for another technology such as Lagom. So I'm currently employed as Java Backend Practice Lead so yep, that's right, I'm a Java guy.
Tonya Rae Moore: We like Java guys, too. Trust me, you're welcome.
Andreas Evers: Really? Okay.
Tonya Rae Moore: Not at all.
Andreas Evers: Now, you actually like that, right? Before, maybe not so much? Well, for the past three years I've been working and been in charge of microservices architectures and API designs. At some of our times we actually implement this microservices architecture. We did it based on, for instance, the Netflix stack, and you're probably aware that microservices is much more than just an architectural style. So you've got DevOps, Platform as a Service (PaaS), Continuous Delivery (CD), Cloud Native. All that kind of good stuff. It's all necessary in what most companies label their digital transformation. I'm excited about these innovative trends, and that kind of pushed me to evangelize these topics on conferences all over Europe. By the way, I think one of these was JavaLand organized by Lightbend's development advocate Markus Eisele (@myfear).
Tonya Rae Moore: Lightbend's Java developer advocate Markus Eisele, by the way.
Andreas Evers: Okay, okay. That was a really fun conference. It was at an amusement park so we went to the conference.
Tonya Rae Moore: Did you ride the Black Mamba?
Andreas Evers: Yeah, I did. I did. So that was a good combination. Not just work. Also, some pleasure.
Tonya Rae Moore: It's a good conference. I really enjoyed it. I think they do a great job. DOAG (German Oracle User Group) is thumbs up, for sure.
Andreas Evers: Yeah, for sure. It's different than all the other conferences so definitely worth it. So we also have a partnership with Lightbend, but that's mostly our Netherlands colleagues. We've got a unit called CodeStar and they reestablished a fruitful partnership which led to several successful pilots and projects. They see a growing need for reactive platform architectures at their clients and a huge interest from the developer community, particularly in Scala because they're more focused on Scala as well. So Lightbend, from their end, they support CodeStar by facilitating some great events for community and brainstorming together with Ordina, Netherlands and our clients to actually find the best solution. So we also hope that in Belgium we'd be able to make use of this partnership as soon as possible.
Tonya Rae Moore: I will book my flight to come visit you as soon as we can.
Andreas Evers: You bet. That's a deal.
Tonya Rae Moore: That's awesome. So you and a colleague wrote a really popular and interesting blog post on Lagom. You took it for a test drive and watched it walk and talk a little bit so can you tell me about your initial impressions?
Andreas Evers: So my colleague, Yannick De Turck (@YannickDeTurck) and me, we actually started looking at Lagom because it's like a new, exciting framework. And there really aren't that many microservices frameworks available in the Java space today aside from Spring Boot, and Spring Cloud, and some more Java EE-oriented frameworks. So we're definitely enthusiastic about that.
It's interesting because it takes a different stance on many topics which makes it stand out. It's definitely an interesting kind of microservices architectures. What we really like is the support for Event Sourcing (ES) and CQRS because it's quite rare to have these patterns supported out of the box in one of the other microservices frameworks. So we're having it as a first-class citizen, and I hope it's going to encourage other people to more quickly and easily integrate those patterns where they should be used. Because CQRS and ES, they fit the reactive mindset pretty well, but they shouldn't be used everywhere. They should be used with caution, and we should apply these patterns where it can be really a valid use case. So the complexity that this approach adds can be overwhelming and somewhat unnatural to use as Lagom as an opinionated framework. The before choice is to use these patterns, but luckily, you can also use Lagom in another way. In a more traditional manner where we just have JPA or anything like that. So CQRS and Event Sourcing is really interesting in Lagom.
And we also found that the development approach is interesting. Lagom is using Google Guice where services can register themselves and they can allow themselves to call and be called by other microservices. This allows to have single integrated development environments which is a great experience. So the entire microservices system is integrated. But this is also a tradeoff because there's less autonomy because the services are [then coupled] through core interfaces instead of merely through communication protocols. A lot of care has gone in to making sure that those services map down to idiomatic REST or WebSockets, but eventually, it remains binary coupling. So that would be a tradeoff to make, and we were talking to the lab and developers about this, but they were telling us that in the future there are plans to have simple removal of those binary coupling so automate the server's interfaces.
Tonya Rae Moore: I want to just interrupt for a second to say that I'm really glad that you guys are contributing and giving constructive feedback. That's really important, and it makes my heart happy to see hashtag #sameteam happening. You're not just complaining or pointing things out. You're like, "Hey, can we talk about this?" I really like that.
Andreas Evers: Well, for us, it would be awesome to have Lagom grow just as big as we've got Spring right now. As popular because then, you've got many more choices. For us, it's about having good choices.
Tonya Rae Moore: Right, it's about finding the right tool for the right job, so the more choices you have the better decisions you can make. Absolutely.
Andreas Evers: That's right. That's right. That's my point. So we don't want to complain about the things that might not be completely finished yet because obviously, this is still an early stage of the project. We want to encourage to mature the project and maybe get some constructive feedback along the way.
Tonya Rae Moore: That's great. We appreciate that.
Andreas Evers: Actually, the developers told us that they might look at something like Swagger. To have Swagger specs and clients generated to remove that binary coupling. So that's really good stuff on the horizon, and it will really be interesting to see how the community responds to both approaches. To have that single, integrated environment where you have some minor binary coupling and also, maybe in the future the possibility to have Swagger or something else to have real decoupling also on the protocol level. There was also one more thing. So Guice has been used for developments. Development and environments, but when we go to production we've got to deploy on ConductR currently. That's the only way for now, and it's a licensed product so it costs some money, and it's mostly aimed at enterprises.
Tonya Rae Moore: It makes it hard to just play around with?
Andreas Evers: That's the thing. It's hard to just get some proof of concept out there if you're linked to ConductR. [Editor Note: ConductR is free to download for development use.] Although ConductR is a nice product. So it would be nice just to have an open source alternative or integrations available. I see that in the community. Initiatives are starting to arise to integrate Lagom with other orchestration solutions. For example, with Kubernetes. There's actually a ticket for that in the Lagom issue tracker so you can actually just follow up that process and see where it gets or even configure it and that's nice so that's exciting for us because that's the biggest open requirement currently in Lagom. I hear a lot of guys from the Scala community saying that you should have a Scala API out there so that's probably also pretty high in the priority list.
Tonya Rae Moore: The Scala API is P1 after we figure out the Java API and get it solid.
Andreas Evers: It makes sense to go first to Java and then, Scala because it would be easier to port to Scala when you first have Java as opposed to the other way around. But I think making it possible to deploy on production without the proprietary tool would be a nice feature as well. That's, for us the most important thing for now, but we're happy to see that steps are being taken to fill this gap, of course. And in any case, companies can just look at the source code of ConductR and work their magic in to a free solution.
Tonya Rae Moore: So we talked about the steps forward. What improvements would you like to see since we've got the ear of the Lagom developers right now, I'm sure?
Andreas Evers: I'm a Java guy so I'm used to building my projects with Maven or with Gradle. With Lagom, I've got to use sbt so I'm sure sbt is a great build tool, but I think it would significantly ease adoption of Lagom if people wouldn't need to learn a new tool they'd otherwise never use. So for me, I just want to sometimes quickly get a proof of concept or a, "Hello World," when I've got it going and then, I guess start with the build tool. Sometimes it would be nice to have it integrate with Maven or Gradle so I can just be excited from the get-go.
Tonya Rae Moore: You Java guys really like that big bang.
Andreas Evers: Yeah, I think they're kind of stubborn, but that would maybe help with the adoption. And there's also, I talked about ConductR, right? But ConductR has these great operational dashboards that we see with other frameworks. We also have some of these dashboards out of the box for free so it would be nice to have something different from ConductR also for operation purposes. So out of the box dashboards, for example. Service registries, circuit breaker monitoring, and distributed tracing, perhaps, those things would be nice. And then, maybe also, orchestration support further than just Kubernetes because that's ongoing, but there might also a market for integration business. Eureka, Consul, maybe ZooKeeper. There are many more so those things would be pretty nice. Personally, I'm actually a fan of hypermedia. So that's the glory of REST, they call that. REST level 3. I don't think this will be a top priority for Lagom as Lagom has this event-driven communication as a default, but you never know. It would be nice to have that in the end integrated.
Tonya Rae Moore: While we're making wish lists you might as well put it in, right?
Andreas Evers: That's right. You noticed?
Tonya Rae Moore: Andreas, I'm going to go a little off book here. I mentioned earlier that we've been doing a JUG tour. We had James Roper in from Australia stateside, and he went to, I believe it was seven different JUGs across the U.S. to introduce Lagom. I attended the JUG session here in Chicago and also got a lot of feedback from some of the others. I talked to Frank Greco in New York, and Pratik Patel in Atlanta, and Bob Paulin, and Michael Minella here in Chicago. Some really big guys. Some great Java developers, and people who really understand it. One of the things that I was hearing as feedback was the Java developers find the use of Akka and Akka Streams in Lagom is kind of daunting. Was that something you found?
Andreas Evers: Well, I think it's up to you to use it. As far as my experience with it goes I found that Akka itself is quite difficult to learn and pick up. So if you are familiar with Akka and you're jumping in to Lagom that might be a bit difficult, but it's also very powerful so it goes hand in hand. I think the frontend stuff, the Play stuff, that's probably quite straightforward. So if you want to dig in to the lower levels of Akka I think that's pretty difficult, but that shouldn't hold you back to explore it.
Tonya Rae Moore: I really only came to understand or learn about Akka since I came to Lightbend which at the time was Typesafe. When I was running around the Java world totally it just never crossed my mind, but I've been learning of what a powerful tool and how multi-useful it can be.
Andreas Evers: It's very powerful, and it's built on this reactive core. A non-blocking asynchronous core. That's really great stuff.
Tonya Rae Moore: All right, thank you for that little side note. I'm always interested in the feedback on Lagom, and what all I can learn, and help to get it out there to you Java guys. You need to know more about this. Okay, so microservices. It's the buzzword of the year, and last year, and probably next year, so more and more adoption. It's just taking over the world, so where do you see the SOA industry heading?
Andreas Evers: Even in Belgium microservices are becoming big. It's everywhere, and for what's the future is concerned I think a year and a half ago Amazon had actually launched their Lambda service. That's quite interesting because you just have to think about your business metric. Your little piece of code. Your function, and what will trigger that code? So Lambda will just take care of all the rest. You don't have to worry about anything else because with distributed systems you've got this extra complexity.
That's the major downside of choosing microservices because you could actually fall in those -- they're pitfalls. With this complexity, that operational complexity, eventual consistency, that kind of stuff it's not easy. So Amazon kind of abstracts all that away. It just makes it easier for you to focus on your business logic, what's important, and the communication between those functions. It's just managed by Lambda. This kind of implies vendor locking. That might be a downside, but I also see that our companies are coming up with some new services.
For example, Google, they have their Google Cloud functions. IBM recently announced OpenWhisk on top of Bluemix. Microsoft, they've got Azure Functions, I think it's called, and they launched that a couple of weeks ago. So the idea is getting traction. And basically, the vendor lock-in idea, if you write your functions and all the other vendors, they apply the same idea with functions and events then, I suppose migrating from one vendor to another wouldn't be that big a deal. So the idea really, it's getting traction, and Adrian Cockcroft, he actually predicted server-less, the so-called nano services. He predicted that to be the next natural step for microservices architectures, and in that sense it will be very interesting to see how companies like Lightbend and like Pivotal, for example, how they will evolve in this fast-changing industry.
Actually, come to think of it, Lagom matches Lambda a little bit already. It's going in that direction. It's using events to communicate between services by default. But Lambda, you have these little pieces of code and they get triggered by incoming events, and they expose outgoing events which can trigger subsequent pieces of code. If you think of it that looks a lot like Lagom already, right?
Tonya Rae Moore: Yeah, that sounds familiar.
Andreas Evers: So why not have a version of Lagom? And then, it matches very close to Lambda already so it fits in the puzzle, I would say.
Tonya Rae Moore: Yeah, I just hope we don't have to change our name again.
Andreas Evers: Who knows? Who knows?
Tonya Rae Moore: Maybe we'll get together with Pivotal and we'll become Livotal, or Pivbend, or something like that.
Andreas Evers: That would be exciting. Maybe Markus can talk to Josh Long.
Tonya Rae Moore: Josh Long is actually going to be here hanging out with me and Markus in a couple of weeks so I guess this is my shout out to my bro, Josh Long. I'm looking forward to seeing that crazy dude.
Andreas Evers: Awesome. Awesome.
Tonya Rae Moore: So you mentioned, Andreas, earlier about having experience with running the Netflix stack. How would you compare that with Lagom?
Andreas Evers: Well, the Netflix stack has been around for quite some time, and they actually announced or they open-sourced a lot of tools around microservices. That's mostly based on REST and HTTP. So Lagom, on the other hand, they choose to, by default go for a reactive approach. It's more like an asynchronous protocol. Messaging, event-driven. That kind of stuff.
So it's a bit difference in approach, but both also have a lot of patterns and concepts in common. For instance, the circuit breakers and bulk heads, those are patterns that are used also by Lagom. The idea is that, as opposed to monoliths, in microservices you have a lot more floating components, and they could all go down at any given moment so resilience is really a necessity when you're working on distributed computing. Lagom has these kinds of patterns built in by default. So the circuit breaker, it's automatically protecting any inter-microservice call. And will help you to protect your own service from cascading failures. And also, helps you protect other services from overloading. This is already available by default in Lagom so you don't have to worry about it, and Netflix also has something for this. It's called Hystrix. You do have to enable it specifically per integration-point, but you also there have this slick dashboard for free out of the box so that's pretty neat.
They do have common patterns and common concepts although having a slightly different approach. So basically, two weeks ago me and Yannick De Turck, who is also a crazy, Lightbend enthusiast, we both worked on a lengthy blog post on Lagom which you also mentioned at the start of the podcast. In that blog post we basically looked at how Lagom and Spring Cloud compare.
Tonya Rae Moore: Oh, wow.
Andreas Evers: In that extension to what we we've been talking about the Netflix stack because Spring Cloud actually wraps the Netflix stack or at least works with it so there's some more information in there. Definitely check it out. It also contains an interview with Markus Eisele and Lutz Huhnken. And especially, it's definitely interesting because James Roper and Jonas Bonér also pitched in so definitely check that out. And aside from that, we're also going to give a live introductory session basically, on Lagom. It's called Lagom in Practice. It's going to be on YouTube, and it's going to be live-streamed the 8th of June. We're going to basically build a couple of Lagom microservices and deploy them. And then, highlight all the key microservices features so that should definitely be interesting.
Tonya Rae Moore: Oh, that will be super fun, and is that going to be you and Yannick as well?
Andreas Evers: Yeah, exactly.
Tonya Rae Moore: Oh, that is going to be great. I'm going to tune in and check that out. We're going to put all the links in the transcript of this podcast so everybody will be able to find everything.
Andreas Evers: Awesome.
Tonya Rae Moore: Andreas, this is great. I read the blog post, but you gave me a little more insight into some of the things that you and Yannick were talking about, and I'm super happy to send you guys some t-shirts and stickers for your trouble. I really get it. I can't wait to watch the YouTube microservices fun stuff that you guys are going to do so we're going to talk to each other some more, okay?
Andreas Evers: Definitely. Definitely, and maybe we'll see each other at one of the conferences this year.
Tonya Rae Moore: That would be awesome. I look forward to that. All right, folks, check out www.lightbend.com for more information about @Lagom, and you can always tweet us @andreasevers for Andreas, @tonyaraemoore for me, @lightbend for Lightbend. I'll also be checking on the Lightbend hashtag for feedback and suggestions on improvements. So thanks to everyone who listened, and thanks to Andreas Evers.