Dante OSS is an open source framework that simplifies the operation of Minio. Through the deep encapsulation of the original Minio Java SDK, the complexity of using the Minio API is simplified, the convenience of using Minio is improved, and the threshold for Minio application development is lowered.

MinIO is a high-performance, distributed object storage system. Minio, an open source distributed object storage service, has become quite popular abroad, and many small and medium Internet companies in China use it as an object storage service. Although the information and examples related to Minio are already abundant on the Internet, why is there a project like Dante OSS?

  • The first time you get in touch with Minio, especially if you want to integrate Minio with Java to develop object storage applications, you still need to invest a certain amount of time and effort to understand its principles and read related documents.
  • The function methods in the Minio SDK involve many parameters and a relatively high level of abstraction. Every time you use them, you need to check the source code repeatedly to find out the specific usage methods.
  • If you want to integrate with existing applications, you need to spend more or less time and effort, and carry out a certain degree of packaging and transformation.
  • There is a lot of relevant information on the Internet, either relatively scattered and unsystematic, or relatively simple and only for conventional upload and download applications, and many features of Minio itself are not involved.

Advantages |

  • Zero additional learning costs: Developers can seamlessly integrate and use Dante OSS as long as they have basic knowledge of Spring and REST
  • Lower barriers for developers: Shield the complexity of using the Minio standard Java SDK, and use the Spring environment standard method to simplify the packaging of the original API. Service API and REST API out of the box
  • Rich in features: Almost all the functions of the Minio Java SDK have been transformed, and functions such as large file fragment upload, second transfer, direct transfer, breakpoint resume transfer, etc. are implemented and integrated with the best solution in the industry
  • Standard and elegant code: All function parameters do not destroy the original Minio code constructor structure, but are abstracted and simplified on the basis of the original method, and the programming experience and code readability are greatly improved
  • Complete annotation documentation: Provide detailed comments, descriptions and OpenAPI annotations for request parameters, methods, REST API, and Validation. The usage and usage are clear at a glance, and there is no need to read Minio documents and source codes, helping you save more time
  • Complete front-end example: The front end adopts a complete project instead of a demo form, which fully demonstrates the front-end and back-end interaction, interface calls, parameter usage, TS type definition, etc., and can be directly used in actual projects or simply modified to build your own products

Compare | Compare

1. More than just a simple Spring Boot Starter build

  1. Constructing a unified error can return more humane and easier-to-understand error information, while taking into account the return of more detailed error information, which is convenient for developers to understand and locate problems.
  2. Redefinition of Minio Java SDK parameters in a format that is easier to understand and use. Avoid the problems of Minio’s default XML method, which has many parameters, is difficult to understand and use, and is inconvenient to interact with the front end.
  3. Hide the details that are difficult to understand and use of Minio Java SDK, and provide detailed annotations. Developers no longer need to read the Minio online documentation and source code to understand the details of each API when using it.
  4. Provide a unified standard REST API, as well as OpenAPI Swagger3 document description and accurate Spring Validation verification, which can be directly integrated into the system for use.
  5. Minio Client object pool, custom minimalist Minio Server access reverse proxy, improve

2. Standardized business logic and solution set

  1. It is not just the encapsulation of common methods such as upload and download, but also covers all methods and operations supported by Minio Java SDK.
  2. Select the best solution in the industry to realize and integrate major business requirements functions such as large file upload in pieces, instant transfer, direct transfer, and resumable transfer.
  3. Combined with its own application experience and needs, the Minio API is further combined into business logic and functional processing that conform to actual applications.
  4. A complete front-end project based on Vue3, Typescript5, Vite4, and Pinia 2 is used as an integration example, including detailed Typescript type definitions and mainstream component integration and usage methods such as vue-simple-uploader.
  5. Provide single version and microservice version cases based on Spring Authorization Server, you can choose from SDK, Spring Boot Starter to complete projects.

Structure | Structure

dante-oss
├── oss-bom -- 工程Maven顶级依赖,统一控制版本和依赖
├── oss-minio -- Minio 模块
├    ├── minio-core -- Minio 通用代码包
├    ├── minio-sdk-api -- Minio 基础API封装模块
├    ├── minio-sdk-logic -- 基于Minio扩展应用模块
├    ├── minio-sdk-rest -- 基于Minio扩展的REST接口模块
└──  └── minio-spring-boot-starter -- Minio Starter

function | function

Functionillustrate
Bucket listBucket list query, including Service, REST API and front-end display
Whether the bucket name existsWhether the Bucket name exists, including Service, REST API, and front-end asynchronous verification processing
Bucket creationCreate Bucket, including Service, REST API and front-end Validation processing
Bucket deleteDelete Bucket, including Service, REST API and front-end display processing
Bucket encryption setting acquisitionGet Bucket Encryption settings, including Service, REST API
Bucket modify encryption settingsModify Bucket Encryption settings, including Service, REST API
Bucket delete encryption settingsDelete Bucket Encryption settings, including Service, REST API
Bucket access policy setting acquisitionGet Bucket Policy settings, including Service, REST API
Bucket modify access policy settingsModify Bucket Policy settings, including Service, REST API
Bucket delete access policy settingDelete Bucket Policy settings, including Service, REST API
Bucket label acquisitionGet Bucket Tags, including Service, REST API
Bucket modification labelModify Bucket Tags, including Service, REST API
Bucket delete tagDelete Bucket Tags, including Service, REST API
Bucket object lock setting acquisitionGet Bucket ObjectLockConfiguration settings, including Service, REST API
Bucket modify object lock settingsModify Bucket ObjectLockConfiguration settings, including Service, REST API
Bucket delete object lock settingDelete Bucket ObjectLockConfiguration settings, including Service, REST API
Object listObject list query, including Service, REST API and front-end display
Object deleteDelete Object, including Service, REST API and front-end display processing
Object batch deletionDelete Objects in batches, including Service, REST API and front-end display processing
Object metadata acquisitionObtain Object Stat, including Service,
Object download (server)Object download (server download, non-streaming mode), including Service,
other functionsIt is gradually improving, mainly involving front-end and back-end interaction, as well as usability verification and development of front-end related functions, so stay tuned, welcome PR
Functionillustrate
Create a multipart upload requestCreate a multipart upload request and return Minio UploadId
Create a file pre-upload addressAccording to the UploadId and the specified number of shards, the returned number matches the Minio and upload address
Get all shard filesGet all the fragmented files under the specified uploadId
Create multipart uploads for large filesUnified creation of large file fragment upload business logic encapsulation, reducing repeated interactions between front and back ends, including Service and REST API
Merge the uploaded shardsMerge the uploaded fragments according to the UploadId, and complete the upload of large file fragments including Service and REST API
Uniform Constant InterfaceReturn the involved Enums and constants to the front-end in a unified interface, which is convenient for display and use, including Service, REST API and front-end display
Minio Client object poolRealize the Minio Client object pool, reduce the repeated creation and destruction of Minio Client, and improve the performance of accessing Minio Server
Bucket settingsUnified Bucket settings: Bucket label settings, access policies, encryption methods, object locking, etc., including Service, REST API and front-end display
Object download (streaming mode)Minio object download, using stream mode to support vue front-end post download, including Service, REST API and front-end display
Ultra Lightweight Reverse ProxyImplement a lightweight reverse proxy to solve the problem of directly exposing the Minio Server address to the front end in the way of PresignedObjectUrl
Functionillustrate
OpenAPI supportIn the environment that supports Open API, display Swagger documents, it is recommended to use Springdoc
Integration with Spring Authorization Server architectureProvide complete integration with Spring Authorization Server to realize complete cases of authentication, authorization, authentication, dynamic permissions, etc., including single version and microservice version
Uploading Large Files in PartsPartial upload of large files using the PresignedObjectUrl scheme. Extend Minio Client and encapsulate the corresponding Service and REST API
vue-simple-uploaderThe front end is based on the vue-simple-uploader component, and cooperates with the custom REST API to upload large files in pieces

Use | How to use

  1. Introduced in maven
<dependency>
    <groupId>cn.herodotus.oss</groupId>
    <artifactId>minio-spring-boot-starter</artifactId>
    <version>最新版本</version>
</dependency>
  1. Configure yml parameters
herodotus:
  oss:
    minio:
      endpoint: http://127.0.0.1:9000
      access-key: xxxxxx
      secret-key: xxxxxx
  1. Unified Error Handling
// 参考代码
public static Result<String> resolveException(Exception ex, String path) {
    return GlobalExceptionHandler.resolveException(ex, path);
}

// 或者

@ExceptionHandler({HerodotusException.class, PlatformException.class})
public static Result<String> exception(Exception ex, HttpServletRequest request, HttpServletResponse response) {
    ······
}

Contribute | Committer

  1. Fork the project in Gitee to your own repo
  2. Clone the past project of fork, which is your project, to your local
  3. Modify the code (remember to modify the develop branch)
  4. commit code, push to your own library (develop branch)
  5. Log in to Gitee and you will see a pull request button on your home page, click it, fill in some explanatory information, and submit.
  6. Waiting for the maintainer to merge

Feedback | Feedback

  • Welcome to submitISSUS please write clearly the specific cause of the problem, reproduction steps and environment

#Dante #OSS #Homepage #Documentation #Downloads #Simplify #Minio #Operations #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *