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
Related
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.
Hi there I would like to build an integration test framework that supports testing soap services mq Kafka and rest services - can someone say if citrus framework would be a better choice ? And some p tutorial to refer at ?
Thanks
Citrus already covers all of those features mentioned so I would suggest to have a look and try before heading to something else or implement it yourself.
The framework is Open Source so you can also contribute to it and enhance where you feel it is necessary.
I often give reference to the samples section where you find running samples of all features you have mentioned.
https://citrusframework.org/samples/
I am implementing a new spring-boot application with mongoDB, earlier worked with djangoAdmin. Looking for a similar solution which can easily generate management UI for all classes decorated with #document.
Have you seen JHipster?
It uses an Angular frontend with a Spring Boot backend but comes with a ton of admin functionality right out of the box. This includes the turn-key CRUD operations like you mentioned.
There is http://lightadmin.org project. But it currently supports only Spring Data JPA.
We are making a web based application in Java that should be accessible to any device and so we zeroed in for Restlet for our REST based web service need.
For UI we are thinking of Freemarker together with Twitter bootstrap and database will be mongoDB. And guice for dependency injection.
Since I am new to most these technology stack, do you think this is fair choice for a long run. Also, for database mapper framework we decided to use Jongo it seems lightweight. Kundera is an option but it has lots of dependency. What you expert say ?
"Kundera is an option but it has lots of dependency." Not sure what do you mean by this statement? could you please explain it more?
Please take a look at https://github.com/impetus-opensource/Kundera/wiki/Kundera-Mongo-performance for performance using Kundera!
It really depends on your needs
REST Framework :
IHMO you should test at least theses 3 JAX-RS Frameworks : RestEasy / Jersey / Restlet and choose the one according to your needs.
JAX-RS Frameworks
https://stackoverflow.com/questions/1710199/which-is-the-best-java-rest-api-restlet-or-jersey
UI :
I've worked with Jersey + Freemarker through a framework called Webengine from Nuxeo, it was ok.
Nevertheless, you should consider a rich client approach based on Javascript/CSS/HTML (see Backbone.js, Ember.js)
Pros :
With such approach you could expose JSON REST services using a JAX-RS Framework (instead of freemarker/html services) .
Theses services can be consumed by a web application and/or native mobile apps (ios, android).
Cons:
Your team must have advanced javascript skills (this blog can help )
Database :
What kind of data do you need to store ?
MongoDB is document-oriented and flexible enough to cover lots of needs
As you said, Jongo is a lightweight API (500 lines of code + 1 dependency) over mongo-java-driver.
It allows you to query MongoDB as if you were in MongoShell (ie. with plain json/bson queries) and map your object using jackson.
This question is a good example: Mongo DB query in java
Relying on Restlet Framework for your RESTful web API/service backend sounds like a good choice for a multi-devices application. FreeMarker is very powerful and flexible so you should be in good company there as well.
I don't know too much about the other pieces of your stack.
I'm trying to build a REST web service (server side) that will allow a partner system to connect/POST order information in JSON format. Should I use JAX RS (for example from JBOSS RESTEasy) or Spring MVC to build such a service? They both seem capable enough to accomplish the same thing as far as building a REST service is concerned.
Thank you!
Depends if you want to learn something new or go with what you already know.
If you already have experience with Spring MVC and want to get the work done quickly, then I'd suggest staying with Spring MVC. There are some neat enhancements to the REST features in Spring 3.1, including the ability to generate "end point documentation".
If, on the other hand, you are looking to expand your CV and/or enjoy learning new technologies, then give JAX RS a go. I haven't used it but it is a dedicated WS framework that would likely have any feature you'd require.
Of course, if you have experience with JAX RS but not Spring MVC, then the opposite applies :-)
If you are developing an EE 5 project then I would recommend using JAX-RS with Spring. The RI for JAX-RS, Jersey, has a Spring JAX-RS dispatcher servlet. This makes it much easier to manage dependency injection with JAX-RS and gives you all of the Spring MVC features like form binding and validation, but you are also able to use the Java standard approach for REST - and in my opinion, a better and easier to manage approach than Spring REST.
If it is an EE 6 app, then you may want to think about ditching Spring as JAX-RS is part of the EE 6 specs and you can use EE CDI within your JAX-RS classes.
Notice that Jersey has a bug that affects its integration with Spring:
https://java.net/jira/browse/JERSEY-2301
In summary if you need Spring AOP in your JAX-RS resources it will not work. Dependency injection works well.
REST is more of an architecture style of developing web services which are very easy to understand without even documentation for a developer. Normal tech savy people can easily understand the URL patterns also the response types of JSON and XML support makes it easy for integrating with new javascript modularization standards such as backbone or angular.js.
On the other hand SpringMVC is more concentrating on model-view-controller architecture style of developing applications.