Giter Site home page Giter Site logo

sjhuhuan / activej Goto Github PK

View Code? Open in Web Editor NEW

This project forked from activej/activej

1.0 0.0 0.0 6.09 MB

ActiveJ is an alternative Java platform built from the ground up. ActiveJ redefines web, high load, and cloud programming in Java, featuring ultimate performance and scalability!

Home Page: https://activej.io

License: Apache License 2.0

Dockerfile 0.01% Java 99.51% HTML 0.11% Shell 0.01% JavaScript 0.02% CSS 0.01% Svelte 0.34%

activej's Introduction

Maven Central GitHub

Introduction

ActiveJ is a full-featured modern Java platform, created from the ground up as an alternative to Spring/Micronauts/Netty/Jetty. It is designed to be self-sufficient (no third-party dependencies), simple, lean and to provide ultimate performance. ActiveJ consists of a range of libraries, from dependency injection and high-performance async I/O (inspired by Node.js), to application servers and big data solutions. You can use ActiveJ to build scalable web applications, distributed systems and use it for high-load data processing.

ActiveJ components

ActiveJ consists of several modules that can be logically grouped into following categories :

  • Async.io - High-performance asynchronous IO with efficient event loop, NIO, promises, streaming and CSP. Alternative to Netty, RxJava, Akka and others. (Promise, Eventloop, Net, CSP, Datastream)
  • HTTP - High-performance HTTP server and client with WebSocket support. Can be used as a simple web server or as an application server. An alternative to Jetty and other conventional HTTP clients and servers. (HTTP)
  • ActiveJ Inject - Lightweight powerful dependency injection library. Optimized for fast application start-up and ultimate runtime performance. Supports annotation-based component wiring as well as reflection-free wiring. (ActiveJ Inject)
  • Boot - Production-ready tools for launching and monitoring ActiveJ application. Concurrently starts and stops services based on their dependencies. Various service monitoring utilities with the support of JMX and Zabbix. (Launcher, Service Graph, JMX, Triggers)
  • Bytecode manipulation
    • ActiveJ Codegen - Dynamic class and method bytecode generator on top of ObjectWeb ASM library. Abstracts the complexity of direct bytecode manipulation and allows creating custom classes on the fly using Lisp-like AST expressions. (ActiveJ Codegen)
    • ActiveJ Serializer - Extremely fast and space-efficient serializers created with bytecode engineering. Introduces schema-less approach for the best performance. (ActiveJ Serializer)
    • ActiveJ Specializer - Innovative technology for enhancing class runtime performance by automatically transforming class instances into specialized static classes, and class instance fields into baked-in static fields. Enables a wide variety of JVM optimizations for static classes, not possible otherwise: dead code elimination, aggressively inlining methods, and static constants. (ActiveJ Specializer)
  • Cloud components
    • ActiveJ FS - Asynchronous abstraction over file system for building efficient, scalable local or remote file storages, supporting data redundancy, rebalancing, and resharding. (ActiveJ FS)
    • ActiveJ RPC - Ultra high-performance binary client-server protocol. Allows building distributed, sharded and fault-tolerant microservices applications. (ActiveJ RPC)
    • Various extra services: ActiveJ CRDT, Redis client, Memcache, OLAP Cube, Dataflow

Quick start

Insert this snippet to your terminal...

mvn archetype:generate -DarchetypeGroupId=io.activej -DarchetypeArtifactId=archetype-http -DarchetypeVersion=5.0

... and open the project in your favourite IDE. Then, build the application and run it. Open your browser on localhost:8080 to see the "Hello World" message.

Fully-featured embedded web application server with Dependency Injection:

public final class HttpHelloWorldExample extends HttpServerLauncher {
	@Provides
	AsyncServlet servlet() {
		return request -> HttpResponse.ok200().withPlainText("Hello, World!");
	}

	public static void main(String[] args) throws Exception {
		Launcher launcher = new HttpHelloWorldExample();
		launcher.launch(args);
	}
}

Some technical details regarding the above example:

  • Features a JAR file size of only 1.4 MB. In comparison, a minimal Spring web app size is approximately 17 MB.
  • The cold start time is 0.65 sec.
  • The ActiveJ Inject DI library which is used, is 5.5 times faster than Guice and hundreds of times faster than Spring.

To learn more about ActiveJ, please visit https://activej.io or follow our 5-minute getting-started guide.

Examples for usage of the ActiveJ platform and all the ActiveJ libraries can be found in examples module.

Release notes for ActiveJ can be found here

activej's People

Contributors

eduard-vasinskyi avatar dvolvach avatar valerialistratova avatar adamochayon avatar sirinath avatar alphaqu avatar dependabot[bot] avatar youmoo avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.