Giter VIP home page Giter VIP logo

lightningstorage's Introduction

LightningStorage

LightningStorage - A Library to store data in a better way.

LightingStorage

Do you want to save your config files easily and independently from Bukkit or BungeeCord?
Want to do more than just use simple .yml files to store data?
Are you looking for a powerful "bukkitlike" (Very similar to Bukkit config) library to store data in files?

Then this library is just right for you.

I was looking for a library that I could use to store data with Bukkit like methods without being depended on Bukkit/BungeeCord. But there was nothing out there so I decided to write my own library. Of course there are a few libraries with bukkitlike methods but no one has the features that I need. ThunderBolt-2 for example only supports Json files but does not support nested objects. Now I'am publishing this library because I think libraries of high quality should be publicly available for everyone Now it is here: LightningStorage!

LightningStorage is extremely fast & good at storing data reliably!
It also supports nested objects!
Like bukkit it has a contains check. LightningStorage is licensed under the Apache2 license, which means that you can also use it in private projects that are not open source.

If you have any ideas to add or issues just open a issue page. I will do my best to help.
For more details, see the wiki


At the moment LightningStorage supports four file types:

Json:

A very fast and slim file format. It is much faster than yaml files and is therefore better suited for storing larger amounts of data, such as player data (rank, money, playtime, etc).

https://stackoverflow.com/questions/2451732/how-is-it-that-json-serialization-is-so-much-faster-than-yaml-serialization-in-p/2452043#2452043

Yaml:

Yaml files are not as fast as json files, but they are easier to read and are therefore more suitable than configuration files, as you often find them in bukkit plugins in the form of "config.yml".

Toml:

Toml is a compromise between the readybility of Yaml and the performance of Json, thus being a quite good way to go.

LightningFile

LightningFile is our own implementation of a config file format. It has quite good performance (about as fast as Json) but is way more readable.

How to setup

  1. Place this in your repository-section:
<!-- JitPack-Repo -->
<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>
  1. Place this in your dependency-section:
<dependency>
  <groupId>com.github.JavaFactoryDev</groupId>
  <artifactId>LightningStorage</artifactId>
  <version>3.0.0</version>
</dependency>
  1. Important! Use a shade plugin to make sure that the library is shaded into your final .jar file when your plugin is compiled. The relocation is optional but heavily recommended. (Just change 'yourpackage.yourname' to the needed values)
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-shade-plugin</artifactId>
  <version>3.1.0</version>
  <executions>
    <execution>
    <phase>package</phase>
    <goals>
      <goal>shade</goal>
    </goals>
    </execution>
  </executions>
  <configuration>
    <createDependencyReducedPom>false</createDependencyReducedPom>
    <relocations>
      <relocation>
        <pattern>de.leonhard.storage</pattern>
        <shadedPattern>yourpackage.yourname.storage</shadedPattern>
      </relocation>
    </relocations>
  </configuration>
</plugin>

Library's used:

LightningStorage uses a powerful combination of libraries to provide the best usability:

MIT-org.json Copyright (c) 2002 JSON.org
YAMLBEANS - Copyright (c) 2008 Nathan Sweet, Copyright (c) 2006 Ola Bini
TOML-Lib - Copyright (c) 2016 Guillaume Raffin.

lightningstorage's People

Contributors

esgibtkeinemitte avatar zeanon avatar kotlinfactory avatar fabianhick 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.