原创 Apache Mina 源碼再讀 1 Bind過程以及DefaultIoFuture源碼

1 、bind 事件   在服務器端調用public final void bind(SocketAddress... addresses) throws IOException 方法綁定本地端口時, 仔細看看,Apache Mina 在

原创 使用RocketMQ的客戶端使用

RocketMQ提供了強大的消息系統功能,RocketMQ提供了java客戶端,可以提供使用。下面代碼來自RocketMQ4.0.0中的example代碼。 Producer消息生產端: public class Producer

原创 Java AIO 認識

在基本熟悉了JDK7中異步IO的關鍵類,以後有助於我們深入學習。在java語言和平臺中,存在廣泛使用的網絡開源庫屈指可數。netty 和mina出自韓國人之手,netty和mina主要使用select網絡模型,主要使用jdk中的nio類庫

原创 Guava ListenableFuture 小試牛刀

Concurrency is a hard problem, but it is significantly simplified by working with powerful and simple abstractions.

原创 LuaJava:

LuaInterface: Scripting the .NET CLR with Lua LuaJava is a scripting tool for Java. It allows Lua scripts to use Jav

原创 Netty Future 小試牛刀

Listenable futures and event loops Performing a task asynchronously - scheduling a task and getting notified on com

原创 Apache Kafka Introduction

Topics and Logs 首先我們深入Kafka爲一串記錄提供的核心抽象概念:Topic Topic是一個record發行的類型或者流入名稱。Kafka中topic經常有多高訂閱者。同時,topic可以擁有零個、一個或者多個消費

原创 apache kafka log 存儲格式

Log Format A log for a topic named "my_topic" with two partitions consists of two directories (namely my_topic_0 and

原创 Kafka Protocal Guide

NetWork Kafka使用二進制的TCP協議。 協議定義了所有的API包括:請求相應消息對。所有的消息使用字節大小來分界。 客戶端(Consumer和Producer)和broker初始化socket鏈接,然後向broker中寫入

原创 java中使用javascript Rhino 引擎

Rhino is a JavaScript engine written fully in Java and managed by the Mozilla Foundation as open source software. It

原创 Apache Mina 源碼再讀6 Executor

Do I need to make my IoHandler thread-safe? It depends on your implementation. If you access the resource which is sha

原创 內存映射文件

The primary benefit of memory mapping a file is increasing I/O performance, especially when used on large files.  m

原创 MyBatis 初探

在使用MyBatis時,使用XML文件來構建SqlSessionFactory類。 SqlSessionFactory 是由SqlSessionFactoryBuilder類來創建。 SqlSessionFactoryBuilder.b

原创 《Pro Java 7 NIO.2 》 The Asychronous Channel API 部分翻譯

Groups the asynchronous API introduces a class named AsynchronousChannelGroup, which presents the concept of an asyn

原创 Mina分享

   Apache Mina是什麼? Apache MINA is a network application framework which helps users develop high performance and hig