Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this support REST based webservices #290

Closed
nginxsantos opened this issue Oct 14, 2016 · 6 comments
Closed

Does this support REST based webservices #290

nginxsantos opened this issue Oct 14, 2016 · 6 comments
Labels

Comments

@nginxsantos
Copy link

  • Does it support only SOAP or REST Support is also there?
  • Could you please clarify to what level REST support is there?

Thank you.

Santos

@thusithathilina
Copy link
Contributor

MSF4J is a lightweight JAX-RS engine. It doesn't support SOAP.

You can find the MSF4J supported annotations in[1].
[1] https://github.com/wso2/msf4j/blob/master/README.md#supported-annotations

@nginxsantos
Copy link
Author

Thank you @thusithathilina .

Would you please let me know what advantage MS4J brings over a simple REST Server using {Jetty, Jersey, Spring Framework}. Please note I am asking this for MS4J alone, I know the WS02 brings much more advantages than this.

Thanks....Santos

@thusithathilina
Copy link
Contributor

@nginxsantos WSO2 MSF4J is one of the highest performing lightweight Java microservices frameworks. You can check the performance comparison with the other popular frameworks. https://github.com/wso2/msf4j/tree/master/perf-benchmark

@nginxsantos
Copy link
Author

Thank you @thusithathilina , really helpful. Many thanks....

I am interested to know what are the benefits it provides over using REST Server using {Jetty, Jersey, Spring Framework}. Could you please provide me some more information on this.

Also, could you please provide me some info on any performance optimization done to achieve that performance.

WSO2 looks great, but I need some info on the benefits before I try to use them. Any help on this would help me to take a quick decision...

Thank you....

Regards, Santos.

@afkham
Copy link
Contributor

afkham commented Oct 20, 2016

The primary design goals of MSF4J include;

  1. Very low memory foot print
  2. Very fast bootup time
  3. Small distribution size
  4. Low latency & high throughput
  5. Ease of use

We believe that microservices go hand in hand with container based deployment, so the 1,2,3 & 4 above have to be core concerns. So with respect to those areas MSF4J performs much better than Jetty, Jersey & Spring Boot. We also support the Spring programming model and that brings in the best of both the Spring & MSF4J worlds. We also support a subset of the JAXRS spec which we feel covers 80% of the use cases. So you can use the JAXRS annotations & constructs you are familiar with. Our instances bootup in less than 300ms, base pack size is less than 5MB, and we have some of the best throughput & latency figures compared to other frameworks.

We have done load tests which assign max memory of just 7MB for the MSF4J process and hit it with a concurrency of 50 for a simple benchmark test that echoes the request back. We were seeing acceptable throughput & latency in MSF4J while the other frameworks crashed after going out of memory. Take a look at https://github.com/wso2/msf4j/tree/master/perf-benchmark

We also provide comprehensive samples, which include the pet store sample which show a full Microservices Architecture (MSA) in action https://github.com/wso2/msf4j/tree/master/samples/petstore. This shows how to run a microservices solution in a container cluster with Kubernetes, Docker & Docker Swarm.

Thanks for contacting us and let us know if you need any further details.

Azeez

@afkham afkham closed this as completed Nov 18, 2016
@trajano
Copy link

trajano commented Sep 15, 2017

One thing to watch out for the JAX-RS implementation in the delegate is not complete. Some simple things you may hit are:

  • lack of UriBuilder support. workaround is to use java.net.URI and build it from there
  • lack of cacheControl support. workaround is to add your own header.
  • lack of 'tag` support workaround is to add your own header.
  • no support for @Cors annotation from Spring workaround is to add your own interceptor.
  • no @Inject but @Autowire works.
  • @SwaggerDefintion does not work without being part of an existing JAX-RS annotated class.
  • no support for @ConfigurationProperties(prefix="") thus preventing you from creating complex configurations that involve Lists. You can still do simple mappings with @Bean though.

However, out of the box, it already provides

  • JAXB annotations
  • swagger
  • netty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants