WSO2 Updates Microservices Framework for Java
- By John K. Waters
Integration middleware maker WSO2 has released a new version of its Microservices Framework for Java (MSF4J), which it launched in March. MSF4J is a lightweight, open source framework for building microservices in Java that supports container-based deployments via a fast runtime and an annotation-based programming model.
MSF4J was originally developed as an in-house tool for the company's Carbon platform, explained Afkham Azeez, WSO2's senior director of Platform Architecture. "Basically, we created this framework to componentize our stuff internally," Azeez told ADTmag. "Then we saw that this might be something others could use."
Carbon is an open source, componentized middleware platform based on OSGi standards. It includes features for orchestrating business processes, composing applications, and developing services using the WSO2 Developer Studio toolset.
The MSF4J framework is designed to provide a fast and easy programming model and an end-to-end microservices architecture, Azeez said. It supports apps developed for an architecture in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs -- an architecture in which high performance and a low footprint are critical features.
Microservices developed using MSF4J can boot within between 200 and 300 milliseconds in a Docker container and can be added to a Docker image definition easily, Azeez said. "Our main design goals were a very low memory footprint and fast launch times," he said.
The MSF4J framework leverages annotations, such as Java API for RESTful Web Services (JAX-RS) annotations, both to write and monitor microservices. It includes built-in metrics based on the WSO2 Data Analytics Server, security token validation based on the WSO2 Identity Server, and WSO2 Developer Studio-based tooling for generating microservices projects starting from a Swagger API definition, among other capabilities. The release package also includes microservices samples to help developers get started quickly, plus documentation available on GitHub.
One of the most significant additions in MSF4J 2.0 is new support for the Spring development framework, Azeez said. "We added this based on popular demand from the users," he said. "Developers like Spring because it provides a very simple dependency injection mechanism, which makes their lives much easier."
MSF4J 2.0 supports a Spring-native programming model, which allows developers to write MSF4J microservices, Interceptors, ExceptionMappers, and configuration as Spring beans and to wire them up at runtime.
This release also supports Swagger, a standard, language-agnostic interface to REST APIs that allow both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.
Version 2.0 also allows Java developers to throw business logic exceptions from their MSF4J services, Azeez explained. If there are ExceptionMappers registered to handle those exceptions, the toResponse method is invoked in those mappers.
WSO2 Microservices Framework for Java 2.0 is available now under an Apache 2.0 license. Azeez has included a complete description of the new features in a company blog post.
John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS. He can be reached at [email protected].