Kumuluzee C10K vert.x - vert.x

I need some light about vert.x and kumuluzee.
As far I've been able to figure out:
vert.x: is a tool-kit in order to solve C10k problem, implementing reactor pattern.
kumuluzee: framework for building microservices that has an Reactive Vert.x extension.
Can this extension be used in order to solve C10k problem on a kumuluzee service?
By other hand, kumuluzee is using jetty implementation in order to handle http requests. Jetty implements a servlet engine model that I don't quite figure out how it can be "merged" with vert.x core.

The extensions runs an instance of Vert.x inside the KumuluzEE framework, so all of the Vert.x features should be available out of the box.

Related

How to use Axon with Vert.X

I have a CQRS/Eventsourcing architecture with 3 microservices. I implemented 2 microservices with vert.x 4 and I implemented CQRS/Eventsourcing without framework to improve my knowledge of this type of architecture. For the third microservice I would like to use AxonIq Framework but I have a problem with Aggregate annotation because it's not avalaible with vert.x but only with Spring.
I implemented a Spring microservice using Axon and everything work fine but I would like to know if someone can help me for use vert.x with AxonIq ? If anyone know a workaround for this problem ?
Thank
Axon Farmework provide something called Configuration API. You can have a look at the Configuration class but for making use of it, you need a Configurer, which will provide you all means of configuring your components!
On the ref-guide, you also have several examples of how to do the configuration using the API or Srring Boot. Example for Commands can be found here.
To help a bit more, I can also share a small project I made using Dropwizard and Axon Framework, meaning no Spring was used and all the Configuration was done through the API.
You can find it here https://github.com/lfgcampos/axon-playground/tree/master/chat-getting-started-dropwizard

How it's using vert.x

A question is running into my mind for a several days ago.
I read several docs about vert.x and quarkus.
Which kind of message are sent throuh event-bus? Only received http request?
Has it sense to configure an clustered eventbus inside a quarkus application? Any example?
Those above question have not been able to find some lights.
Any ideas?
You can send any type of message through the Vert.x Event Bus, as long as a codec exists for this particular type. There are several built-in codecs, but you can register custom codecs too.
Quarkus does not support clustering officially so far. You can make it work with some tweaks, though.
From my perspective (I'm a Vert.x development team member), it can be useful to have a clustered eventbus inside Quarkus, just as it can be useful inside a Vert.x application. There are plenty of articles on the web about use cases.

Akka-HTTP vs JAX-RS

I recently started learning Akka-HTTP and struggling to get one answer.
We know that libraries like Jersey, RestEasy follows a common interface/APIs which is JAX-RS.
And Akka-HTTP is also a suite of libraries. So, does Akka-HTTP also follow JAX-RS?
If not, then how is Akka-HTTP different from JAX-RS?
Any answer to it will be highly appreciated. Thanks in advance.
JAX-RS is just a specification; Jersey, RestEasy etc. are just different implementations of this specification.
Akka-http does not implement JAX-RS; furthermore, equivalent mappings in JAX-RS and Akka-http would be written in completely different code styles:
API's written with JAX-RS are regular methods annotated with annotations
API's written with Akka-http are using router functions instead of annotations and communicate with actors (more about actor model here)

What actor based web frameworks are available for Scala?

I need to build very concurrent web service which will expose REST based API for JavaScript (front end) and Rails (back end). Web service will be suiting data access API to MongoDB.
I already wrote an initial implementation using NodeJS and would like to try Scala based solution. I'm also considering Erlang, for which every web framework is actor based.
So I'm looking for web framework explicitly build using Actors in order to support massive load of requests I'm very new to Scala and I don't quite understand how Actor might work if almost all frameworks for Scala are based on Java servlets which creates a thread on each request which will just exhaust all resources in my scenario.
If you're really going to have 10k+ long active connections at a time, then any standard Java application server/framework (maybe, except for Netty) will not work for you - all of them are consuming lots of memory (even if any kind of smart NIO is used). You'd better stick to a clustered event-loop based solution (like node.js that you've already tried), mongrel backed with zeroMQ, nginx with the mode for writing into MQ polled by Scala Actors, etc.
Among the Scala/Java frameworks, Lift has a good async support for REST (though it's not directly tied to actors). OTOH, LinkedIn uses Scalatra + stdlib actors for their REST services behind Signal ,and feels just fine.
Another option is Play framework. The latest 1.1 release supports Scala. It also supports akka as a module.
As far as Scalatra itself, they have been working on a new request
abstraction called SSGI (akin to the Servlet/Rack/WSGI/WAI layer),
that they said should ennable them to break from solely running as a
Servlet and also run on top of something built with Netty. See thread here.
http://github.com/scalatra/ssgi
There's some other interesting frameworks at the Scalatra level of simplicity since designed from the ground up to support asynchronous web services (won't tie up a thread per request):
https://github.com/jdegoes/blueeyes - Not a servlet; built on Netty.
("loosely inspired by ... Scalatra")
http://spray.cc/ - Built on Akka actors, Akka Mist. Servlet 3.0 or Jetty continuations
("spray was heavily inspired by BlueEyes and Scalatra.")
And at a lower level:
https://github.com/rschildmeijer/loft - "Continuation based non-blocking, asynchronous, single threaded web
server."
Not production-ready, but rather interesting-looking. Continuations require the compiler plugin.
http://liftweb.net/ Indeed, a request starts off as a servlet, but then lift uses comet support found in many servlet containers to break away from the thread, keeping the request context (which the container then doesn't destroy) which then can be used to output data in actors.
http://akkasource.org also has support for rest, but it will block the thread until the actor finishes with its work

Is there a way of publishing Akka actors with Mina?

I've been reading up about Akka and it really seems nice. Can you somehow set it up to work with Apache Mina or similar techs? I.e not only use it in conjunction with servlets.
Hmmm, seems you already have a technical solution (Mina).
May I ask what is the problem you're trying to solve?
RemoteActors are using Netty, it's basically only the JAX-RS (Jersey) and Comet (Atmosphere) integration that runs over servlets.