Netflix Hystrix seems to be going to a maintenance mode. Would like to
understand what is SAP's take on this? Will there be any change going
forward?
As per the S4SDK blog Click here! , SAP S4 cloud archetype is using Hystrix library for resilience. From the Netflix Hystrix library,https://github.com/Netflix/Hystrix, it states that there won't be any new developments and it continues to be in maintenance mode. They have recommended using resilience4j going forward.
Need to understand, what is SAP's recommendation going forward in terms of S4SDK for using Hystrix?
Update: Starting with version 3.0.0 of the SAP Cloud SDK we replaced Hystrix with Resilience4J as our go-to resilience framework.
For more details checkout our updated tutorial here.
We are currently heavily investigating into replacing Hystrix with Resilience4J.
As a workaround you could handle the resilience of your commands yourself using Resilience4J (wrapping your logic into the decorators needed) instead of extending the SDKs ErpCommand.
I will update this answer when we can share details/results.
Related
I’m looking for some distributed tracing technologies for our spring boot services, in the internet, I see we have 2 popular choices I.e opentelemetry agent and spring cloud sleuth.
I see both of the them have good integration support, I’m confused to which one to go for, please give me some suggestions
As of today, you can find the following announcement on the Sleuth's Spring page:
Spring Cloud Sleuth’s last minor version is 3.1. You can check the 3.1.x branch for the latest commits. The core of this project got moved to Micrometer Tracing project and the instrumentations will be moved to Micrometer and all respective projects (no longer all instrumentations will be done in a single repository).
Additionally, sleuth is not playing nicely when trying to integrate tracing with other java-but-not-spring-exclusive libraries. To afford any such implementation you would need to configure Sleuth to use the open-telemetry tracer.
Thus, my advice would be to go for open-telemetry, unless you have an exclusive reason not to do that.
As for my current approach, I was introducing otel into an established project that is due for a Spring Boot 3 migration next year. I thus opted to use non-sleuth Spring otel libraries to avoid coupling with Sleuth in this short period.
I am not sure if that's a good approach, but with a lack of proper Spring 2 -> 3 migration, this way will not be a blocker until you can migrate other deps over
Resilience4j version: 1.2.0
Java version: 1.8
Problem description:
I am trying to explore different patterns provided by resilience4j. I am trying to stick to annotations vs functional programming. But when it comes to resilience4j cahce, I am bit confused, as I couldn't find an working example of the same. I was able successfully try out other patterns.
My confusion is around spring boot cache and resilience4j cache. Are they same or functionally different? Can I use them interchangingly? Is there any github repository giving an usecase and explanation for the resilience4j cache? Any input is highly appreciated.
I got an response from the author Robert Winkler on github, who wrote Resiliance4j-cache component. Below is his resonse.
RobWin:
Hi,
You can stick with Spring Caching Abstraction and Annotations.
Resilience4j-cache is currently not part of the Spring Boot starter and there are no plans to add it.
Resilience4j-cache was created by me when I had to use JCache API and Hazelcast and I wanted to protect my application from runtime exception which were thrown by Hazelcast.
Question regarding correct set up of microservice infrastructure with Spring Cloud projects. Let's assume there are service discovery, Gateway, config service and some custom service. All of them have dependecy to Spring Cloud projects of version Camden.
And it is necessary to upgrade one of them (let say Gateway) to version Edware.
Should the rest of microservice also be upgraded to version Edware or can safety stay with Camden?
By looking at release notes of Edgware.SR3, seems like there are couple of fixes in config but thing to notice is Eureka is moved to 1.7.2
Not sure which Camden release you are on but supposedly, if you are on Camden.SR7 and planning to migrate to Edgware.M1, there are many releases in between which you have to keep track of and changes that occured in between.
You can find the release dates & sequence here
Other than that, there are no more changes so far(atleast not in the release document) that could affect your discussed architecture.
Best bet would be to try and test.
I want to use ODL framework for SDN development, in that internally OSGI framework is used to (karaf). Apart from that i want to use spring boot and spring cloud to achieve cloud services also. It is possible to use these all framework as a single unit. and how we can achieve this please tell.
This questions is somewhat overly broad and generic, but I'll try to answer it anyway making two assumptions:
If you want to use Spring Boot / Cloud "in-process", that is within ODL/ Karaf, then the answer to that would be that such an architecture would make little sense. Karaf (not ODL) has some Spring support as far as I know, but you'll probably have a hard time to marry that "nicely" with ODL...
The architecture of ODL is that you define YANG models and the RPCs you define in them "automagically" get exposed as HTTP REST APIs (via something called RESTCONF), and you can then consume those from other applications.
But if by your question you just mean if you can write a separate new Spring Boot / Cloud application and from that invoke OpenDaylight services via remote RESTCONF, then the answer is that this is certainly possible - and the recommended way to write integrations.
BTW: In this context, you may also be interested in https://lighty.io.
PS: You could have a look at https://github.com/vorburger/opendaylight-simple/ for some inspiration as well; but that is a POC which is not ready for consumption by you.
It's possible to use Spring Boot in OSGI container.
Please, see my answer on similar question: Can Spring Boot be used with OSGi ? If not, any plans to have an OSGi Spring Boot?
Here's a link to Spring Boot + Apache Karaf demo app: https://github.com/StasKolodyuk/osgi-spring-boot-demo
I'm analyzing on using Spring framework with Play 2.1 to support DI. Apart from DI, can i also use spring's AOP interceptors, transaction, DAO and REST support with Play 2.1? I'm not sure whether it is the right approach. If not, what is the best way to handle these things with Play? Are there any inbuilt support in Play on these areas or do i need to go with separate libraries like AspectJ, Guice, Jersey etc?
Yes you can integrate Spring with the Play Framework. I did it in a project just some weeks ago. As shown in the tutorial linked by Pere Villega this can easily be achived by extending GlobalSettings. This way also works for other DI solutions like Guice (as shown here). As far as I know, there currently is no native solution for DI in Play 2.x.
Of course you can also use other features provdided by Spring, like their DAO support or transaction management (however this may require further configuration). We even used Spring Data's MongoDB support.
Just some personal note: I really like the Play Framework for building typical Java MVC webapps, but I found it quite temperamental for building an API only. So if you are also writing your web client using Play, the provided routing and templating are great and give you a head start. For a pure REST service however I ended up using JAX-RS (on Jersey), some basic Spring components and Jetty. We then wrote the web client completely in JavaScript using Backbone, Node and Airbnb's Rendr.
Play has it's own way of managing REST, transactions (depending on the JPA library used) and interceptors.
You can integrate it with Spring, see this demo in github, but I'd first think about if you really need it.