Skip to content

About

A hybrid between monolithic and microservices to take advantages of both

Topics

Resources

Stars

15 stars

Watchers

18 watching

Forks

Repository files navigation

A hybrid between monolith and microservices to take advantages of both.

Stack Overflow | Google Group | Gitter Chat | Subreddit | Youtube Channel | Documentation | Contribution Guide |

Build Status

Why Hybrid

Switching to Microservices from Java EE is hard

I've been working with my clients on microservies for several years and I feel the pain for Java EE developers to switch to microservice architecture. Almost everything they've learned in Java EE is anti-pattern in Microservices and it is a big paradigm shift. It would be easy for them to move step by step to fully adopt microservices.

Most companies don't need Internet scale

For most companies, pure microservices might not be suitable as the infrastructure and management overhead is too high initially. For most of organizations, they don't need Internet scale and they are not in a size to adopt microservices before their application grows to the right size. For startup companies, it is wise to build something still monolithic but can be split up when the application grows bigger. Most companies won't even need Internet scale for the entire life cycle of their application so they can enjoy the smaller foot print as well as low supporting cost with all the benefits of microserivces architecture.

Restful API is not efficient

REST was introduced before Single Page Application on the browser and it is heavily rely on the URI schema for client/server communication. In URI, all query parameters and path parameters will be converted to string and then converted back to the right type based on swagger specification. This is very time consuming and make the swagger spec. so complicated.

By using Hybrid framework, you just need to define the JSON schema or other binary protocol IDL for your request and then validate the request again it. All the communication is based on JSON object or binary without data conversion on the server side.

Jackson 3 development migration

This development line requires Jackson 3.2.3, json-schema-validator 3.0.8 and the migrated yaml-rule 4.0.0-SNAPSHOT plus light-4j/http-client snapshots. Jackson types in public APIs use tools.jackson; annotation packages remain unchanged. Existing project versions are unchanged during implementation, and a coordinated next-major release is required before publication.

JSON handling derives from light-4j's measured compatibility profile. Service schema YAML now uses Jackson's SnakeYAML Engine parser, retaining the measured legacy stream-read limits. SchemaHandler.parseYaml still declares IOException: unchecked Jackson parse/stream failures are wrapped so existing checked-error handlers continue to work. The startup loader also catches unchecked Jackson serialization failures.

For typed service metadata such as skipAuth, use canonical true/false. The YAML resolver changes yes/no/on/off, True/FALSE, Null/NULL, 012, 0x1F, 0b11, 1_000 and ~ scalar interpretation; non-canonical values can become strings and fail typed use. Quote intended strings and use canonical numeric/null values. Existing fixture scalars and both parsed service-spec maps match the Jackson 2 baseline; this does not audit deployed service jars. Classic SnakeYAML pins are retained until the final dependency cleanup phase.

The source-build workflow resolves yaml-rule #36 and light-4j #2815 to their latest heads while open, then follows their base branches after merge. Other prerequisites use master. Each run logs the exact source commits tested and uses a fresh Maven repository. Rerun this check after prerequisite changes and before merging: an earlier green run qualifies only its recorded commits. Manual workflow dispatch is available. Source-build success does not qualify published artifact resolution.

Prerequisites are resolved to full commit SHAs before checkout. To replay a failed dependency combination, manually dispatch the source-build workflow with its uploaded source-refs.json contents as the source_refs input. Omitted repositories resolve their current source head; supplied values must be full commit SHAs. Each green result qualifies only the recorded combination.

GitHub manual dispatch requires this workflow to exist on the default branch. Before merge, use the recorded commits to reproduce with local source checkouts.

About

A hybrid between monolithic and microservices to take advantages of both

Topics

Resources

Stars

15 stars

Watchers

18 watching

Forks

Releases

Packages

Used by

Contributors

Languages