The Way of Compatibility: Breeding New Life from Classics
Through the original "progressive containerization" technology, Alibaba Cloud has realized the intercommunication technology between traditional EJB containers and microservice systems based on Nacos. The architecture diagram is as follows:
Here is a sample code as a programmer writes it:
@CloudEJBAdapter (name = "springcloud-provider-demo" )
public interface RemoteHello extends Serializable {
@GetMapping ( "/hello" )
String hello ( String name);
}
Technical highlights:
Dual-stack runtime environment: supports both EJB3.0 and microservices (supports both Spring Cloud and Dubbo service frameworks)
Intelligent protocol conversion bridge: automatic conversion of RMI/REST/GRPC protocols
Hot-swappable module loading: loading microservices and intelligent components without restarting
Intelligent Hub: Plug-and-Play Architecture for Large Models
Based on Alibaba Cloud's DashScope SDK, Alibaba Cloud has realized the intercommunication between traditional J2EE applications and large models in the application server. The architecture diagram is shown in the following figure:
(Architecture description: DashScope is used to achieve standardized docking with mainstream large models)
Three innovative designs:
1. Model sandbox environment : Isolate large model inference thread pool resources to reduce the impact of AI business on traditional business
2. Request current limiting : Introduce Model Filter to limit request current based on Token
3. Prompt management : Prompt injection and dynamic management through the console
Panoramic observability: illuminating every corner of the system
In the process of digital transformation, many enterprises are facing typical technical architecture evolution dilemmas: the traditional EJB monolithic system is in a state of limited maintenance for a long time due to the accumulation of historical technical debt; emerging businesses use the Spring Cloud technology stack to build cloud-native microservice clusters; and the AI intelligent wave has spawned tensor computing services based on large models. The coexistence of these three business generations has led to multi-dimensional challenges in the observation of the entire business link: the black box of the traditional JNDI remote call link, the distributed tracking fault of the microservice gateway, the lack of visualization of the computational graph of large model reasoning, and other observation gaps in heterogeneous technology stacks.
By introducing ARMS (Real-time Application Monitoring Service) to build a unified observability platform, full-stack tracing capabilities across J2EE legacy systems, microservice architectures, and AI computing engines can be achieved. This solution effectively penetrates the technical barriers of multiple businesses such as EJB service calls, microservice calls, and large model reasoning and computing, and provides an end-to-end perspective from traditional transaction processing to intelligent decision-making for core businesses such as order transactions, solving the system observability blind spot problem caused by the "technology generational fault" and building a global observation platform for the hybrid technology ecosystem.
Chapter 3 Actual Combat:
Three steps to enable J2EE intelligence emergence based on EDAS
Step 1: Inject intelligence-related capabilities into the code
First configure the relevant parameters:
<!-- Intelligent service declarative configuration --><Resource name="modelClient" auth="Container" type="com.alibaba.ai.ModelClient" factory="com.alibaba.ai.ModelClientFactory"/>
Then introduce the relevant business code:
public class HybridDeveloper {
@EJB
private OrderSystem legacySystem;
@Resource(name= "modelClient" )
private ModelClient client;
@Prompt(name= "orderProcessor" )
private PromptMessage prompt;
public Future<CompletionResponse> process(Order order) {
return CompletableFuture.supplyAsync(() -> {
legacySystem.validate(order);
return modelClient.chat().completions(prompt, order);
});
}
}
Step 2: Select AliEE in Alibaba Cloud EDAS to deploy the corresponding application
AliEE was born out of AliTomcat, an e-commerce platform. It has been officially commercialized in Alibaba Cloud EDAS. In addition to one-click startup in Alibaba Cloud EDAS, it also supports independent stand-alone deployment. The one-click startup method in EDAS is as follows:
At the same time, the current popular deployment form is to embed the application server into the FatJar of the project. In this form, it is necessary to replace the Tomcat (or Jetty) dependency package in the POM dependency of the project, as shown below:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
-->
< dependency >
<groupId> io.cloudapp </groupId>
<artifactId> cloudapp - starter - aliee </artifactId>
</ dependency >
Step 3: Add model configuration in the management console
In the console, enter the model name, model address, Prompt and other parameters, as shown in the following figure:
After configuring the corresponding model parameters on the AliEE management console, these configurations will be sent to the AliEE process and will take effect in real time after dynamic loading and refreshing without restarting.
When each wave of technology arrives, one of the pain points for governments and enterprises is the worry that the information assets of the previous generation will become debts. Alibaba Cloud, through the innovation of basic technologies, allows the wisdom of each era to be immortalized in the digital world. When classic J2EE applications bloom into intelligent flowers on Alibaba Cloud application servers, this quiet technological revolution is redefining the true value of enterprise digital assets.