Are there any implementation level documentation or articles available for microstream? - microstream

I am considering Microstream for a project but before adopting it would like to better understand how the framework actually work and in particular what the overhead (indexing, any wrapper objects etc) is per persisted object and per root. I have looked around quite a lot on both the microstream web site and Internet in general but failed to find information on this detailed level....
Any suggestions, short of actually reverse engineer the source code that I see as a last resort would be much appreciated!

Microstream is open-source. You can check the Github repository. There are also many videos on youtube from Microstream Team. Microstream Team also is very active in Java User groups, has many live presentations about this framework, you can participate in these meetings. Microstream JavaDoc is part of the Maven Artifacts in the maven repository.

Related

Multiple microservices in one repository

I have question about microservices and repositories. We are a small team (5 people) and we creating new project in microservices. Expected microservice applications in our project is between 10-15.
We are thinking about one repository for all microservices in structure like that:
-/
--/app1
--/app2
--/app3
-./script.sh
-./script.bat
What do you think about this design? Can you recommend something better? We think if we will have repository per app it will be overkill for that small project in one team. As our applications you can imagine spring boot or spa applications in angular. Thank you in advice.
In general you can have all your micro-services in one repository but I think while the code grows for each of them it can be difficult to manage that.
Here are some things that you might want to consider before deciding to put all your micro-services in one repository:
Developer discipline:
Be careful with coupling of code. Since the code for all your micro-services is in one repository you don't have a real physical boundary between them, so developers can just use some code from other micro-services like adding a reference or similar. Having all micro-services in one repository will require some discipline and rules for developers not to cross boundaries and misuse them.
Come into temptation to create and misuse shared code.
This is not a bad thing if you do it in a proper and structured way. Again this leaves a lot of space for doing it the wrong way. If people just start using the same shared jar or similar that could lead to a lot of problems. In order to have something shared it should be isolated and packaged and ideally should have some versioning with support for backwards compatibility. This way each micro-service when this library is updated would still have a working code with the previous version. Still it is doable in the same repository but as with the 1. point above it requires planing and managing.
Git considerations:
Managing a lot of pull requests and branches in one repository can be challenging and can lead to the situation: "I am blocked by someone else". Also as possibly more people are going to work on the project and will commit to your source branch you will have to do rebase and/or merge source branch to your development or feature branch much more often(even if you do not need the changes from other services). Email notifications configured for the repository can be very annoying as you will receive Emails for things which are not in your micro-service code. In this case you need to create some Filters/Rules in your Email clients to avoid the Emails that you are not interested in.
Number of micro-services grow even further then your initial 10-15. The number can grow? If not, all fine. But if it does, at some point you could maybe consider to split each micro-service in a dedicated repository. Doing this at the point where you are in later stage of project can be challenging and could require some work and in worst case you will find out that there are some couplings that people made over time which you will have to resolve at this stage.
CI pipelines considerations:
If you use something like Jenkins to build, test and/or deploy your code
you could encounter some small configuration difficulties like the integration between Jenkins and GitHub. You would need to configure a pipeline which would only build/test a specific part of the code (or one micro-service) if someone creates a merge/pull request against that micro-service. I never tried to do such a thing but I guess you will have to figure out how to do it (script and automate this). It is doable I guess but will required some work to achieve it.
Conclusion
Still all or most of these points can be resolved with some extra management and configuration but it is still worth knowing what additional effort you could encounter. I guess there are some other points to be taken into considerations as well but my general advice would be to use separate repositories for each micro-service if you can (Private Repository pricing and similar reasons). This is a decision which is made project by project.

Tracking api/even changes between different microservice versions before deployment

I work devops for a fairly large company that is in process of transitioning to microservices. This is a new area for most people involved and some of the governing requests seem like bad practice to me but I don't have the expertise to convince otherwise.
The request is to generate a report before deploying that would list any new api/events (Kafka is our messaging service) in a microservice.
The path that's being recommended is for devs to follow a style guide and then scrape the source code during CI/CD pipeline to generate a report that can be compared to previous reports and identify any new apis.
This seems backwards and unsustainable but I've been unable to find another solution that would satisfy their requests. I've recommended deploying to dev first, then using a tracing tool to identify any api changes, or event subscriptions, but they insist on having the report before deploying.
I'm hoping for any advice on best practice to accomplish this.
Tracing and detecting version changes is definitely over engineering. Whats simpler like #zenwraight has mentioned, is to version your APIs. While tracing through services to explore the different versions and schema could be a potential solution, it requires a lot more investment upfront and if thats not the bread and butter of the company, I would rather use a vendor product that might support something like this.
If discovery is a mechanism that is needed, I would recommend something that publishes internal API docs using a tool like Swagger so that you can search if there's an API you can consume.
And finally to support moving to different versions, I would recommend having an API onboarding process for the services so that teams can notify other teams that are using specific versions their services are coming to the end of their lifecycle and they will need to migrate to newer ones.

Best pattern to develop a erp with maven multi module

I have a ERP project with modules stock, purchases and sales. These are web applications, using hibernate, maven, springMVC and spring security. What is the best way to organize the structure of this project?
1 - Each application being a web module(.WAR);
2- Just one web module.
On both approach there are other modules: core(with daos and services), and commons(with shared utils classes).
I was using the first way, because is easier to split each project with your respectves programmers. But i had problem with spring security configurations.
Any other options?!?
Sorry about my english
Your question is very open and answers may be highly subjective. You're stating a very limited number of requirements, hence you can go either direction.
There is a lot to be said for compartmentalizing an application. There isn't many larger organizations around that haven't acknowledged the need to do so. Often that way is paved for people already, i.e. existing guidelines exist that specify the component boundaries. It helps with understanding (sub-)domains, having parallel projects in flight, and very importantly reuse.
That all doesn't mean much if you have no business or technical requirements prompting you to do so. Instead, as a developer, you may rather focus on being prepared for change (once new requirements arise). So, have (unit) tests in place, et cetera. Change should be easy.

Suitable frameworks for ERP like application

I want to create a production management system to be used by a small manufacturing firm. The system will allow to document different stages in manufacturing of equipment. The requirements are as follows:
1.Non browser based interface.Need something like Swing or AWT based.While i understand the convenience of implementing a browser based solution,the business owner insists on a non browser interface
2.Accessed from multiple systems.These systems will allow CRUD operations on the central system (Thin Client?)
3.The application will not have more than 3 concurrent users.
I need some advice regarding what would be a good path for this kind of application.Currently, i'm thinking of using Griffon with RMI. However, i don't have much development experience.Read a bit about Apache River (Jini) too.Would it be a good idea to use Griffon with RMI?
Please provide some advice. Thanks.
EDIT:after some reading, i've decided to use more mainstream frameworks.So, Griffon is not an option. How about Jini(Apache River) or OSGI (Apache Felix)?
Hmm how is that a project which recently moved out of the incubation phase be considered mainstream vs a project that's been used in production for more than 3 years now? Anyway, Apache River gives you access to Jini technology and nothing more; meaning you can't achieve item #1 of your list with River alone. River may use RMI for accessing remote resources, however you can use RMI directly, or try out DRMI, Kryonet, Hessian/Burlap, Spring's HTTP Invoker, Protocol Buffers, Avro/Thrift, REST, SOAP, ZMQ and many more.
Even if you choose one of these options and/or River you still have to define the following things
application structure (file structure and runtime behavior)
build setup
dependency management
testing profiles
packaging
deployment strategies
These things and more are what Griffon brings to the table. As you may have noticed the framework allows you to build up applications by adding plugins, reducing thew amount of time you must allot for hunting down dependencies, setting up bootstrap mechanism and getting things done. On the subject of remoting technologies have a look at the different options Griffon has to offer http://artifacts.griffon-framework.org/tags/plugin/remoting
Even more, you can also combine OpenDolphin (http://open-dolphin.org/dolphin_website/Home.html) with Griffon. There's even an example application found at the opendolhpin repository showing a full client-server application (build with Griffon, Grails and OpenDolphin) https://github.com/canoo/open-dolphin/tree/master/dolphin-griffon-crud
With what seems to be your current understanding of the problem, I would not recommend OSGI, especially for a small manufacturing firm (Possible maintenance issues, depending on the "personel").
The main reason why I wouldn't advocate JINI or OSGI in your case is because of what you said
However, i don't have much development experience.
JINI (Apache River) is a viable option as long as you fully understand the concepts of LookupService and service registrations, etc. There's tons of RMI going on here with possible firewall implications...
OSGI is not difficult but you may have issues deciding how to structure your applications as well as interacting with services, etc.
Try to stick to the simplest approach that you can handle for the implementation (Flexible design in mind): Make it work and then improve it.
There are simple Web Services options such as Spring Remoting (over http/https for example), unless Spring introduces too many concepts and headaches for your app.

Spring MVC and dynamic module deploy

I completed a new MVC web application and my boss asked me to create a new version for a new custumer. Same web application but differente CSS and two new modules (for module I mean a new page used by user to interact with DB). It's not a big deal and quite easy to do, just duplicate the project in my Eclipse and modify it. Two days work and project completed. Well done, all happy but not me.
I was thinking to wordpress, it's really customizable, just create a new template and plugin and activate it. I'd like to do somenthing similar to reduce the new version deploy and the code mainteneance. My question is, how can I do something similar with Spring? or better, is it possible to create a new module and deploy it for a web application? is the Spring dynamic the right option for a MVC Spring application?
thanks,
Andrea
I don't think your approach is correct. You need to discuss with your manager whether this situation is likely to repeat. Because to me it looks like it might.
Let's imagine a scenario: you have a number of copies of your app with some minor enhancements or changes between them. A month later one customer reports about a bug that's really nasty and has to be fixed in every of your app instances. Imagine your pain.
Why don't you approach it with multi-tenancy in mind?
Implement white-labelling, so that depending on the customer your application can get different looks;
Extend the backend, so that customers don't ever see each other's data
Implement configurable features, so that one customer doesn't see extended features that your boss sold to another customer. When he does sell them - it's going to be a matter of toggling a few flags in the database/configs.
Don't want to support multi-tenancy or the product is physically deployed on different (customer) servers? Doesn't matter! If you find a bug, you fix it once and redeploy the jar-file to all the affected systems.
Granted, the above isn't two days of work, but down the road this approach may save a lot more.
As to your question, Spring allows you to customize its looks via changeable styles and layouts. I suggest you to create a sample web app with Spring Roo to see how it's done. However, if I were you I would still aim to have a shared codebase between the projects at the very least.

Resources