Serialize at the speed of light.

Overview

Hyphen

This serializer is highly inspired by ActiveJ and Kryo. It aims to bring insane serialization speed while being easy to use and maintainable. It uses bytecode generation to create the serializer code at runtime (fully cachable) and then you can use those serializer classes to serialize your object.

Comments
  • Bunch of small changes

    Bunch of small changes

    Project fine-tuning and updating

    The Gradle build script has been refactored and optimized to make it easier to use for newcomers Fixed unnecesary publish behavior in build tasks

    opened by PerikiyoXD 1
  • @Data annotation

    @Data annotation

    A @Data annotation would be put in the class and automatically put @Serialize on every field. This saves a lot of boilerplate and makes records be way more manageable

    🟩 priority: low 🕹 aspect: euux ⭐ goal: addition 🏁 status: ready for dev 
    opened by alphaqu 0
  • Allow serialializable getters

    Allow serialializable getters

    Add support to mark certain getters as needing to be serialized. Combined with #14 this could allow interfaces to be serializable (without the need to register a custom serializer) eg:

    sealed interface Value{
      @Serializable
      int getValue();
    
      @SerFactory
      static Value of(int i){
        if (i == 0) return Zero.INSTANCE;
        if (i % 2 == 0) return new Even(i);
        return new Odd(i);
      }
    
      class Zero implements Value{
        private Zero(){}
        public int getValue() { return 0; }
        public Zero INSTANCE = new Zero();
      }
    
      class Odd implements Value{
        private final int value;
        private Odd(int value){ this.value = value; }
        public int getValue() { return this.value; }
      }
    
      class Even implements Value{
        private final Value base;
        private Even(int value){ this.base = Value.of(value >> 1); }
        public int getValue() { return this.value.getValue() << 1; }
      }
    }
    
    🟩 priority: low 💻 aspect: code ⭐ goal: addition 🚧 status: blocked 💬 talk: discussion 
    opened by Kroppeb 0
  • Constructor resolution fails when sub type makes type argument explicit or has a stricter bound

    Constructor resolution fails when sub type makes type argument explicit or has a stricter bound

    eg

    class Foo<T>{
      @Serialize public T t;
      public Foo(T t){
        this.t = t;
      }
    }
    
    class Bar extends Foo<String>{
      public Foo(String s){
        super(s)
      }
    }
    
    🟨 priority: medium 💻 aspect: code ✨ goal: improvement 🏁 status: ready for dev 
    opened by Kroppeb 0
  • Bytecode Generation

    Bytecode Generation

    A very big part of hyphen is missing, and it is the codegen. We need to create a good and scalable bytecode side of hyphen where is it easy to create byte code while still having access to the low-end stuff in case we need to do anything extreme.

    🟧 priority: high 💻 aspect: code ⭐ goal: addition 🏁 status: ready for dev 
    opened by alphaqu 0
  • NYI: parameterized type unification through supertypes

    NYI: parameterized type unification through supertypes

    Example:

    SuperType: java.util.List<T>
    Type java.util.ArrayList<java.lang.Integer>
    

    Because ArrayList<E> implements List<E> (indirectly), T should resolve to java.lang.Integer

    🟨 priority: medium 💻 aspect: code ⭐ goal: addition 🏁 status: ready for dev 
    opened by Kroppeb 0
  • Automatically create subclass serializers for sealed classes/interfaces

    Automatically create subclass serializers for sealed classes/interfaces

    Would this be default or would it require an annotation on the class? Could be default on if the base class is abstract / is an interface, but this could conflict with #14, #15 or custom serializers

    🟩 priority: low 💻 aspect: code ✨ goal: improvement 🚧 status: blocked 💬 talk: discussion 
    opened by Kroppeb 2
  • Allow SubClass types to still allow subclass of the types

    Allow SubClass types to still allow subclass of the types

    Without a @SerSubclasses a variable can be any subtype, (it will just get deserialized to the subclass unless we implement #14) but once the annotation is added, equality checks are done on the field.getClass() meaning subclasses will fail to get serialized properly.

    This could be solved by using instanceof checks instead (or even use the java 17 preview feature to pattern match, if available). However this means we do need to sort the the classes (*) so that super classes are always checked before sub classes.

    (*) This could however form a problem with #14 and #15, but even with custom serializers registered for interfaces, one could provide two interfaces as possible subclasses, and an object might implement both interfaces, which would complicate the sorting process.

    🟩 priority: low 💻 aspect: code ✨ goal: improvement 🚧 status: blocked 💬 talk: discussion 
    opened by Kroppeb 0
  • Support factory methods instead of constructors

    Support factory methods instead of constructors

    Allow something like this

    class Foo<T>{
      private final int hash;
      @Serialize
      private final T t; 
    
      private Foo(int hash, T t){ ... }
    
      @SerFactory
      public static Foo<T> of(T t){ ... }
    }
    
    🟩 priority: low 💻 aspect: code ✨ goal: improvement 🚧 status: blocked 💬 talk: discussion 
    opened by Kroppeb 0
  • Open subclass serialisation

    Open subclass serialisation

    It could be useful to allow any subclass for a given field.

    This would work by first encoding the class name, and then using the serializer for that class. When decoding, the string is read, and a dynamic lookup for the deserializer is done. It might also be beneficial to also store the hashcode into the field too to speedup the lookup.

    This could then also be extended to functional interfaces, allowing any static method reference to be selected as a lambda.

    🟩 priority: low 💻 aspect: code ⭐ goal: addition 🚧 status: blocked 💬 talk: discussion 
    opened by Kroppeb 0
  • `SerializerFactory` Can't seem to be able to handle arrays of polymorphic types

    `SerializerFactory` Can't seem to be able to handle arrays of polymorphic types

    None of these seem to work:

    public @SerSubclasses({Foo.class, Bar.class, Foo2.class}) Foo<@SerSubclasses({Integer.class, Float.class}) Number>[] numbers;
    public Foo<@SerSubclasses({Integer.class, Float.class}) Number> @SerSubclasses({Foo.class, Bar.class, Foo2.class})[] numbers;
    public Foo<@SerSubclasses({Integer.class, Float.class}) Number> @SerSubclasses({Foo.class, Bar.class, Foo2.class}) numbers[];
    
    🟨 priority: medium 💻 aspect: code ⭐ goal: addition 🏁 status: ready for dev 
    opened by Kroppeb 0
Owner
QuantumFusion
Overengineering Minecraft mods, together.
QuantumFusion
A fast, light and cloud native OAuth 2.0 authorization microservices based on light-4j

A fast, light weight and cloud native OAuth 2.0 Server based on microservices architecture built on top of light-4j and light-rest-4j frameworks. Stac

null 291 Dec 17, 2022
Jetserver is a high speed nio socket based multiplayer java game server written using Netty and Mike Rettig's Jetlang.It is specifically tuned for network based multiplayer games and supports TCP and UDP network protocols.

Note New version of Jetserver is called Nadron and is in a new netty 4 branch of this same repo. JetServer is a java nio based server specifically des

Abraham Menacherry 1.2k Dec 14, 2022
Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding

Everyone can develop projects independently, quickly and efficiently! What is spring-boot-plus? A easy-to-use, high-speed, high-efficient, feature-ric

geekidea 2.3k Dec 31, 2022
A 3D (raymarching) rendering engine. In java because i am speed

JRender This is a 3D PBR (phsical based rendering) engine completely done in java, based on raymarching. Clarification This project is an expermiment,

Nils Brugger 59 Dec 10, 2022
for people who doesn't know how to left click and right click at mach 10 speed.

AutoSignKick | pretty much useless for someone who know what mouse is a chinese module that helps you left click and right click at mach 10 speed How

noat 7 Dec 2, 2022
Template to speed up your development in React Native projects.

React Native SpaceShip I created this template with the purpose of leaving the development environment already configured for use. ?? How to use it in

Lucas Augusto 3 Mar 23, 2022
A mc server plugin for papermc.A different version of speed run.

弃坑状态 日后重置 HungerGamesSpeedRun 此乃一papermc之服务器插件。修改版速通 A mc server plugin for papermc.A different version of speed run. 编译/Compile 1.如编译其他插件般编译此插件 1.Jus

Lucien2714 4 Feb 3, 2022
A Light-weight Job Scheduling Framework

Sundial A Lightweight Job Scheduling Framework for Java. In a Nutshell Sundial makes adding scheduled jobs to your Java application a walk in the park

Knowm 262 Dec 9, 2022
XChart is a light-weight Java library for plotting data.

XChart XChart is a light weight Java library for plotting data. Description XChart is a light-weight and convenient library for plotting data designed

Knowm 1.3k Dec 26, 2022
A Light-weight Job Scheduling Framework

Sundial A Lightweight Job Scheduling Framework for Java. In a Nutshell Sundial makes adding scheduled jobs to your Java application a walk in the park

Knowm 262 Dec 9, 2022
Table-Computing (Simplified as TC) is a distributed light weighted, high performance and low latency stream processing and data analysis framework. Milliseconds latency and 10+ times faster than Flink for complicated use cases.

Table-Computing Welcome to the Table-Computing GitHub. Table-Computing (Simplified as TC) is a distributed light weighted, high performance and low la

Alibaba 34 Oct 14, 2022
greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.

Check out ObjectBox Check out our new mobile database ObjectBox (GitHub repo). ObjectBox is a superfast object-oriented database with strong relation

Markus Junginger 12.6k Jan 5, 2023
A light-weight and dynamic dependency injection framework

⚠️ This project is now part of the EE4J initiative. This repository has been archived as all activities are now happening in the corresponding Eclipse

Java EE 105 Dec 23, 2022
Spigot Plugin for creating light shows/concerts in Minecraft

Spigot Plugin for creating light shows/concerts in Minecraft. It works by simulating ingame effects like guardian and beacon beams.

null 38 Dec 16, 2022
Light Chinese Bible is a Mobile app created by Android and SQLite.

About Light Chinese Bible Light Chinese Bible is a Mobile app created by Android and SQLite. It allows you to read the bible on your phone or devices

Pankun (Dennis) Lin 1 Feb 10, 2022
ForgetMeChunk - a simple client side mod that removes a type of light update when unloading chunks

ForgetMeChunk is a simple client side mod that removes a type of light update when unloading chunks. This fixes the large lag spikes you sometimes get when crossing a chunk border.

null 48 Nov 24, 2022
The universally-compatible ultra-light mod loader.

NilLoader NilLoader (ØL or 0L) is a minimal, easy-to-install, application-independent system for applying runtime patches to programs written in Java,

Una 21 Nov 29, 2022
Customize your device even more by having two separate sets of wallpapers for light and dark mode.

DualWallpaper You can help me out with translations here. Customize your device even more by having two separate sets of wallpapers for light and dark

Yann 18 Dec 25, 2022