msf4j
Github:https://github.com/wso2/msf4j
MSF4J is a Java lightweight and high-performance WSO2 Micro-service framework.
Sample code:
Application.java public class application { public static Void main (String[] args) { new Microservicesrunner () .deploy (New helloservice ())
.start ();    &NBSP}}//helloservice.java package org.example.service; import
Javax.ws.rs.GET;
import javax.ws.rs.path;
import javax.ws.rs.pathparam; @Path ("/hello") public class helloservice { @GET @ Path ("/{name}") public string hello (@PathParam ("name") string name) { return "hello " + name; }
}
Performance comparisons:
Memory Footprint Comparison:
Microserver
Github:https://github.com/aol/micro-server
Microserver is a 0-configured, standards-based, battle-hardened library that runs Java REST Micro services and is executed through the Java standard main class. It has been used in the AOL production environment since 2014.
Frame structure:
Main class:
public class Apprunnertest {public
static void Main (string[] args) throws Interruptedexception {
new Microserverapp (()-> "Test-app"). Run ();
}
}
Service class:
@Rest
@Path ("/status") public
class Statusresource {
@GET
@Produces ("Text/plain")
@Path ("/pin G ") Public
String Ping () {return
" OK ";
}
}