Exploring Java Microservices: Current Situation, Choices, and Future Directions with Service Mesh

This article examines the evolution of Java microservices at Huajiao, compares existing PHP and Java solutions, justifies the adoption of Spring Boot 2 with MyBatis and Undertow, outlines incremental improvements such as CI/CD migration and service mesh adoption, and presents a roadmap for future microservice components.

360 Tech Engineering
360 Tech Engineering
360 Tech Engineering
Exploring Java Microservices: Current Situation, Choices, and Future Directions with Service Mesh

Microservices are an architectural style in which a large, complex application is composed of one or more loosely coupled services that can be deployed independently; the concept was popularized by Martin Fowler in March 2014.

Huajiao currently runs many services (H5 website, app back‑ends, live streaming, economy system, cloud control, etc.) using PHP. While PHP offers rapid development and leverages existing team expertise and LNMP optimization, the ecosystem suffers from high coupling between governance and business code, duplicated error codes, costly upgrades, slow scaling, and performance limits imposed by the synchronous LNMP stack.

Several Java‑based microservice solutions are surveyed: Alibaba’s Dubbo (now Apache) and Spring Cloud Alibaba, Tencent’s Tars, Huawei’s ServiceComb, and the ubiquitous Spring ecosystem (Spring Boot, Spring Cloud). These frameworks provide service registration, discovery, configuration, and governance capabilities.

The team selects Spring Boot 2 as the foundational framework because of its maturity, large community, annotation‑driven configuration, ability to package applications as standalone JARs, seamless integration with Spring Cloud components, built‑in Actuator health monitoring, and easy inclusion of third‑party HTTP/gRPC clients.

For data access, MyBatis is chosen over Hibernate for its lightweight flexibility and the ability to generate models via MyBatis‑Generator. Undertow is preferred as the web container for its superior performance and lighter footprint compared with Tomcat.

Development standards are enforced using Alibaba’s Java Coding Guidelines plugin to ensure consistent code style and early detection of potential issues. springboot2 + mybatis + undertow packaged as a jar Incremental improvements include migrating CI/CD from Jenkins to GitLab (enabling code review, automatic build‑test‑deploy pipelines, and Kubernetes integration), adopting Eureka or Nacos for service registration (considering CAP trade‑offs: Zookeeper is CP, Eureka is AP, Nacos offers a balanced approach), and adding OpenFeign with Hystrix for lightweight REST clients, MDC‑based trace IDs for observability, and annotation‑driven Redis mechanisms for concurrency control and idempotency.

Future plans outline the deployment of core microservice components: an external gateway, a service registry, a configuration center, logging, governance, and containerization with Kubernetes (Wayne+k8s). Architectural diagrams are provided via the following images:

Architecture diagram
Architecture diagram

Service Mesh is introduced as the next‑generation infrastructure layer that abstracts inter‑service communication through sidecar proxies, allowing applications to remain unaware of networking concerns. Its key characteristics include being a communication middle‑layer, lightweight proxy, application‑agnostic, and decoupling retries, timeouts, monitoring, tracing, and discovery. First‑generation meshes (Linkerd, Envoy) and second‑generation meshes (Istio, Conduit) are mentioned, along with industry adoption by Ant Financial, Huawei, and Tencent.

Reference links for further reading are listed, covering Spring Cloud, Service Mesh concepts, Istio documentation, and curated Service Mesh resources.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendJavaarchitectureMicroservicesSpring BootService Mesh
360 Tech Engineering
Written by

360 Tech Engineering

Official tech channel of 360, building the most professional technology aggregation platform for the brand.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.