Bjorn Harvold is the CTO of Traveliko.com, an online hotel booking website. For over the past decade, he has worked with the Spring Framework on a full-time basis, and in recent years has utilized Cloud Foundry due to its tight integration with Java and Spring technologies. In this post, he discusses Bearchoke Tempest, a collection of frontend tools and demos for Spring and Cloud Foundry developers which include REST with security & versioning, a stock ticker over WebSocket, Facebook & MailChimp integration, and more. Pivotal spoke with Harvold about his history in the open source community, why he released Bearchoke Tempest, and why Spring and Cloud Foundry are making his life easier these days.
How did you get started working with the Spring Framework, and why did you decide to add Cloud Foundry to your workflow?
There are a number of reasons that Spring works so great for me. There’s the great documentation and community support, availability of open source code on Github, its integration with other major frameworks, fast feature and issue turn-around, but ultimately it makes my life easier. Then Cloud Foundry came along and made my life even easier.
Cloud Foundry has come a long way. Even back when the public beta was released, you could tell that this was something the development community had been waiting for and wanted. As we all know, writing software is one thing. Deploying software is something completely different. I think we’ve all spent days creating our custom Amazon EC2 AMIs and backup/recovery strategies. Setting up our best guess at a scalable RDBMS or message queue. Adding SSL certificates and monitoring to our servers. All the time hoping that we do it once and never have to look at it again. And before EC2, it was even more brutal out there for devops. So the concept Cloud Foundry introduced, that of Platform as a Service, was a welcome one.
Can you explain what Bearchoke Tempest is?
Since 2005, every time I was asked to construct any sort of software project written in Java, I always included at least one of SpringSource’s projects. After 10 years of using the Spring Framework full time, I found myself writing the same thing over and over again for different clients. So for my new and upcoming startup company, I chose to make that code open source and available to everyone who want to save some time and leverage existing best practices Java/Spring to help them get set up.
Bearchoke Tempest is a collection of all of the sexiest current technologies for the back-end and the front-end; put together in a showcase that can easily be deployed locally or to Cloud Foundry. All the code can easily be used as the base code to set up your own enterprise Java software application or the reader can gain insight into how to work with many of Spring’s most popular frameworks. Github explains in detail how to get up and running.
Under the hood, Bearchoke Tempest is a very Spring-heavy stack along with common frontend tools and MongoDB, PostgreSQL, Redis and RabbitMQ for persistence. It relies HEAVILY on Spring to make it all work in harmony on the back-end. AngularJS was my choice of Single Page Application framework; mostly because of the great documentation and community support. I created an account with Cloudflare and Cloud Foundry so my static assets would be loaded quickly on Cloudflare’s CDN and added SSL as a Service as well. Cloud Foundry had all my persistence stores available as services that my application could bind to.
How does Bearchoke Tempest and the Spring and Cloud Foundry stacks, operate from a devops perspective?
I consider devops to be the most important part of running a successful software company that has a large code base and intends on staying relevant for a while. While I was creating my PoCs, I made sure I could prove all my assumptions by writing either unit tests or integration tests. I am a fan of unit tests because if you have only integration tests, by the time you have a large code base, you’ll find yourself running Continuous Integration for hours at the time. Both Spring and AngularJS offer an easy way to test all your code. If this was my commercial project, I would hook my code base into a Continuous Integration/Continuous Deployment (CI/CD) service such as Cloudbees or Atlassian Bamboo. I would make sure all developers were notified in case the build broke and tests failed. CI would allow me to do nightly automatic releases to my Maven repository and it would allow me to deploy to any environment I wanted to by the touch of a button.
How does this process differ in a production environment?
There is a slight and configurable difference between deploying to your local environment and a PaaS such as Cloud Foundry. In a local environment, you would be connecting directly to a persistence store, such as MongoDb. On Cloud Foundry, however, you are binding to a service that you allocated your application. That requires you to write different configuration beans in Spring that supports different active profiles. It also means you can compile the code once and then tell your code what environment your code is running in by setting the “-Dspring-profiles-active” environment variable. All other specific configuration parameters should be put in properties files that are only read when they are in their correct environment. Bearchoke Tempest comes with all the configurations necessary to connect to either the local instance of a data store or a queue or Cloud Foundry’s respective service instance.
Where can developers access Bearchoke Tempest, and what is the project’s future?
You can see the Bearchoke Tempest code base running at bearchoke.com and you can check out the source code on Github. We are using all the technologies you see in this showcase at Traveliko, and it has all been easily extended as we have seen the need for new features. Bearchoke Tempest will continue to be supported with new functionality, tests and nifty front-end technologies as we continue to add to our commercial code.
- Learn more about Cloud Foundry
- Learn more about the Spring Framework
- Try Bearchoke Tempest for yourself
|About Bjorn Harvold: Bjorn Harvold is currently the CTO of Traveliko.com; an online hotel booking website. He has 16 years of, hands on, enterprise Java development experience and has worked in areas such as banking, finance, advertising, healthcare, publishing, government, online gambling, conference calling and e-commerce. He has worked with small and large teams but prefers to put together development teams consisting of less than 10 [really awesome] developers to get the job done.|
About the AuthorMore Content by Paul M. Davis