Upgrade SpringXD custom module - spring-xd

I have a question about SpringXD and custom modules, that even being quite obvious I haven't been able to find out an answer in the official docs.
How am I supposed to upgrade a Custom Spring XD module. I have usually removed a module, and then re-uploaded it again through xd-shell. But it is not a convenient way, since you need to destroy all your streams using that module.
Is there a nice way to do it, ideally something like module upgrade --file in the shell. (There is not such a thing).
Thank you.

Well, since it looks like there is no way to upgrade custom modules I have just opened a ticket in Jira.
https://jira.spring.io/browse/XD-3392

Related

Convert Resuable ErrorHandling flow in to connector/component in Mule4

I'm Using Mule 4.2.2 Runtime. We use the errorHandling generated by APIKIT and we customized it according to customer requirement's, which is quite standard across all the upcoming api's.
Thinking to convert this as a connector so that it will appear as component/connector in palette to reuse across all the api's instead copy paste everytime.
Like RestConnect for API specification which will automatically convert in to connector as soon as published in Exchange ( https://help.mulesoft.com/s/article/How-to-generate-a-connector-for-a-REST-API-for-Mule-3-x-and-4-x).
Do we have any option like above publishing mule common flow which will convert to component/connector?
If not, which one is the best way suits in my scenario
1) using SDK
https://dzone.com/articles/mulesoft-custom-connector-using-mule-sdk-for-mule (or)
2) creating jar as mentioned in this page
[https://www.linkedin.com/pulse/flow-reusability-mule-4-nagaraju-kshathriya][2]
Please suggest which one is best and easy way in this case? Thanks in advance.
Using the Mule SDK (1) is useful to create a connector or module in Java. Your questions wasn't fully clear about what do want to encapsulate in a connector. I understand that you want is to share parts of a flow as a connector in the palette, which is different. The XML SDK seems to be more inline with that. You will need to make some changes to encapsulate the flow elements, as described in the documentation. That's actually very similar to how REST connect works.
The method described in (2) is for importing XML flows from a JAR file, but the method described by that link is actually incorrect for Mule 4. The right way to implement sharing flows through a library is the one described at https://help.mulesoft.com/s/article/How-to-add-a-call-to-an-external-flow-in-Mule-4. Note that this method doesn't create a connector that can be used from Anypoint Studio palette.
From personal experience - use common flow, put it to repository and include it as dependency to pom file. Even better solution - include is as flow to the Domain app and use it alone with your shared https connector.
I wrote a lot of Java based custom components. I liked them a lot and was proud of them. But transition from Mule3 to Mule4 killed most of them. Even in Mule4 Mulesoft makes changes periodically which make components incompatible with runtime.

Which Spring module can be used to develop workflow/automation system?

I have a developed a web-based application using springBoot and AngularJs.In this project, action is taken by the user(checker) based on inputs provided by the maker.
Now I want to develop a workflow/automation system, which will automate the checker's action, therefore the human intervention of checker will not be required. Workflow/automation system will take the actions by itself. There can be around 3000 workflow scenarios.
Can anyone guide me which Spring Boot framework/module can be used to achieve this?
Checkout Activiti which has a spring module that might solve your problem.
http://www.baeldung.com/spring-activiti
Not really enough details to know for sure if it will work for you.
For something external to your app and more capable (and heavier) that you could call with APIs check jBPM.
https://www.jbpm.org/

Using existing microservices

In the microservice architecture, the main idea is that, every service is a small program, that does one thing and does it well (like unix philosophy)
Some things are common to a variety of projects, eg. user management, contacts, companies, clients, products, payments, etc.
I want to know if there is some kind of repository for microservices that solve there common tasks, so that I don't must reinvent the wheel again.
On github it is hard to find something like this and on docker hub are most repos not documented.
So you use some 3th party microservices? Or you create everything yourself?
We use some of the stuff StdLib provides and they also have a registry for others to submit their own stuff. You should check it out.
Usually I create all but the concept of micro is opinionated, there are a lot of authentication framework ready in different languages for example this is in PHP
https://github.com/thephpleague/oauth2-server
but there is also something in golang, you can use this libraries to make your work simple.
I tried to search something ready to help you but I have the same feeling there aren't around.

Managing and storing an artifact/library (e.g. a jar) used by an Heroku/Cloudfoundry application

I have read the 12-factor-app manifesto and I have the following interrogation: where and how can I store a in-house library such a jar that is going to be consumed by several of my Heroku or Cloudfoundry apps?
All of this bearing in mind that the codebase for that library/jar is versioned in Github.
I would use a file store such as OpenStack Swift (it has an S3 compatible API as well. You could also use CouchDB and store attachments in a DB record as well.
There really isn't anything like that that I have seen yet in java. You can't have dynamic dependency injection in java, its something you can't do.

JBoss 7.2: Active Sessions Count

How can I get the number of active session counts at the Jboss AS 7.2 (all sessions, not at single war)? I looked deeply for a MXBean that could give me that information but I didn't find one. There are a lot of information about that, but just for older versions. This seens to be an easy thing to do, but it's been very difficult to find an answer.
JMX is not a must if I can get this programatically by another way. I just cant modify the older projects to add listeners to check for that.
Well, after some digging I found an way using JBoss CLI (just google a little about it and the special syntax called Detyped Management Model). With that in mind just call this command at the CLI:
/deployment=<YOUR-EAR-NAME>.ear/subdeployment=<YOUR-WAR-NAME>.war/subsystem=\"web\"/:read-attribute(name=active-sessions)
With that you can know the connected users for that specific war. This can be tunned with different ways to look for all wars, so just play with it. There's an API to do that programatically too.

Resources