Home > Java > javaTutorial > body text

Detailed explanation of those Java open source libraries on GitHub (picture)

黄舟
Release: 2017-03-25 10:58:25
Original
1650 people have browsed it

As a programmer, you will use the famous Java third-party libraries on GitHub almost every day, such as Apache Commons, Spring, Hibernate, etc. In addition to these, you may also fork or Star some other open source libraries, but there are so many libraries on GitHub that it is difficult for an individual to have time to discover and understand those New libraries are constantly being added, and they can often help you in some emerging fields.

I have been using JAVA to write back-end applications, and I usually follow the blogs of some foreign technology experts (from technology blogs such as Tapki, DZone, Google Developer, etc.), and thus noticed some new and interesting onesJava Open Source Library, some of them can help your project, some are in the form of games to help you improve your Javaprogramming level, and others can help you identify JAVA programs FAQ in . Among the 330,000 JAVA open source libraries, I have collected the following Java open source libraries that may be worth a try.

Strman-java – StringProcessing

Strmen-java is a string processing tool, you can introduce it into the project through maven. In addition to Java's own string processing methods, we can also use the StringUtils in Apache Common Langs to simplify String operations. However, the above two methods are still somewhat insufficient for string processing, which is most likely to be encountered in our daily programming. Strmen-java provides us with a very complete and powerful solution, which can solve almost all string processing scenarios.

The following are some common usage examples of Strman-java:

Splicing strings

import static strman.Strman.append
append("f", "o", "o", "b", "a", "r")
// result => "foobar"
Copy after login

Get the characters at a certain position

import static strman.Strman.at
at("foobar", 0)
// result => Optional("f")
Copy after login

Get a certain character Content contained in two characters

import static strman.Strman.between
between("[abc][def]", "[", "]")
Copy after login

Base64 encoding

import static strman.Strman.base64Encode
base64Encode("strman")
// result => "c3RybWFu"
Copy after login

Tablesaw – “Big Data”

When it comes to big data, we always think of Hodoop plus cluster deployment, But is there a smaller way that allows us to easily implement the functions of big data on a single machine? Tablesaw provides us with a high-performance memory-based big data solution. You can use its API to easily import data from RDBMS or CSV, and then use the interface provided by Tablesaw to sort, filter, group, map/reduce and other operations on the data.

According to the instructions given in the document, you will be able to load a data file of 500,000,000 rows (4 fields per row) into 10G of memory in 22 seconds. The query speed is only 1-2ms.

Dex – Data Visualization

Dex is a data visualization solution that supports over 50 different view types, including world maps, timelines, 3D graphics, and more. Dex is written in Java/JavaFX, and you will be able to easily integrate it with your other programs (such as big data analysis programs written in R language) to create beautiful charts.

Bootique – Microservice Framework

In the past when developing web applications, we always needed to build an application first. Then package it (war) and deploy it to a web container such as Tomcat. But with the popularity of microservicesarchitecture, we need a more lightweight, non-container development framework. SpringBoot is what I've been using, and Bootique is definitely another excellent choice. It allows you to insert modules with different functions to support functions such as REST Service, Web app, scheduled scheduling, data migration, etc. Programs written using it will be packaged as a Jar file, and you can start it more flexibly through the command line.

From many angles, it is very similar to SpringBoot, which liberates you from the Java application from the Web container it depends on. Programmers can have greater autonomy to write the main programmain()Function. Even if you don't add any additional modules, you can directly use Bootqiue to implement a Java application.

Gumshoe – Java Program Detection

Gumshoe is a JAVA program detection tool that can help you track the load and performance of your program. It can help you analyze resource usage by measuring TCP, UDP, CPU usage and other information. At the same time, it also provides call stack analysis functions in Java programs, such as providing information such as the number and frequency of calls to a certain method.

LeakCanary – 内存泄漏监控

内存泄漏一直是令Java程序员苦恼的问题,因为在你开发阶段很难察觉内存泄漏问题,而一旦到了生产环境,则可能因为它而造成严重的后果。LeakCanary是一个内存泄漏检查工具,只需要像下面这样简单加入LeakCanary,它便能全程监控你的应用,并在出现内存泄漏时给你发出警告。LeakCanary同时支持Android和Java,下面是在Android应用中使用的例子。

public class ExampleApplication extends Application {

  @Override public void onCreate() {
    super.onCreate();
    LeakCanary.install(this);
  }
}
Copy after login

awesome-java – JAVA资源大集合

Awesome-java得到了7490个Star,作者将JAVA中那些最常用的第三方库按照分类整理成了一个列表。包含Ancients(古老,但常用的),Bean Mapping,Build,Bytecode Manipulation,Code Analysis,Command-line Argument Parsers,Configuration,Continuous Integration,CSV,Database等等,简直是一本jiava第三方库大全,如果你对项目中应该使用哪一个库不确定,或希望选择几个库来做比较,都可以到awesome-java上进行参考。

99-Problems – 学习JAVA8

99-Problems是一个很有意思的GitHub项目,它对三种不同的语言Java 8,Scala和Haskell分别提出了99个问题,让你通过使用特定语言编程来提供一个最优的解决方案。

这些问题分为不同的难度等级,用*表示,一个星号表示在15分钟内解决,2个星号可能需要30-69分钟,而最难的3个星号,则需要更长时间(90分钟左右),如果你能在限定的时间内使用JAVA8的特性解决所有的问题,那说明你对JAVA8的掌握程度已经非常牢固了。如果你没办法解决所有问题也没关系,你可以查看作者提供的代码示例,这也是你学习JAVA8很好的途径。

Chronicle Map – 高效键值对存储

Chronicle Map是一个基于内存的键值对存储方案。以其低延迟、高并发的特性著称,并在交易及金融系统中得到应用。另外,他还支持持久化到磁盘,以及多键值查询的功能。

下面是官方文档中一段对于从JAVA角度描述Chronicle Map的说明:

From Java perspective, ChronicleMap is a ConcurrentMap implementation which stores the entries off-heap, serializing/deserializing key and value objects to/from off-heap memory transparently. Chronicle Map supports

  • Key and value objects caching/reusing for making zero allocations (garbage) on queries.

  • Flyweight values for eliminating serialization/deserialization cost and allowing direct read/write access to off-heap memory.

ND4J – 科学计算

ND4J是一个开源的数值计算扩展 ,它将 Python中著名的numpy库的很多特性带到了Java中。ND4J可以用来存储和处理大型多维矩阵。它的计算和处理速度很快,但占用的内存却很少,程序员们可以很容易地使用它来与其他JAVA或Scala库作接口。

ND4J主要包括了:一个强大的N维数组对象Array,比较成熟的函数库;实用的线性代数、傅里叶变换和随机数生成函数等。它可以与Hadoop或者Spark这样的工具整合使用。

Automon – Java监控

Automon是一个非常灵活的JAVA监控工具,它结合了AOP(AspectJ)以及JDK和其他依赖库的功能特性,以声明方式去监控你的Java代码。它可以与JAMon,JavaSimon,Yammer Metrics,StatsD和像 perf4j,log4j,sl4j这样的logging库结合使用。

Automon最常被用于跟踪Java方法的调用时长,异常次数等信息,并在你选择的工具中显示监控结果。它并不自己进行任何监控动作,但却很好地扮演了“我应该监控什么”以及“我如何进行监控”这两者之间中间人的角色。而且它的安装也非常简单,只需要简单进行配置便可使用。

Swiss Java Knife – JAVA Toolset

SJK (Java Swiss Army Knife) is a tool set for JVM monitoring, troubleshooting and tuning. It is a command line tool, but it is very convenient to use. You can use it to query the CPU usage of threads in the JVM, GC real-time information, and basic tuning options. You can also combine MBean to export all the information you need in JSON format.

The above is the detailed content of Detailed explanation of those Java open source libraries on GitHub (picture). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!