- 博客(10)
- 收藏
- 关注
转载 Unix_socket
IP socket ((AF_INET))IP socket要利用主机的传输层(tcp),可以用于同一台主机上不同进程间的通信,也可以用于网络上不同主机间的通信。Unix domain socket(UDS)((AF_UNIX或AF_LOCAL))用于同一台主机上的不同进程间交换数据,是Posix系统的标准组件。UDS传输不需要经过网络协议栈,不需要打包拆包等操作,只是数据...
2019-01-17 16:46:36
497
转载 Cache and CDN
Web Cache:To reduce latency — Because the request is satisfied from the cache (which is closer to the client) instead of the origin server, it takes less time for it to get the representation and di...
2019-01-15 15:48:23
410
转载 Database Partition
一般来说,数据库的繁忙体现在:不同用户需要访问数据集中的不同部分,这种情况下,我们把数据的各个部分存放在不同的服务器/节点中,每个服务器/节点负责自身数据的读取与写入操作,以此实现横向扩展,这种技术成为分片,即sharding。这里主要分为两大类,一类是哈希分片(hash based partitionning)一类是范围分片(range based partitioning)1.哈希...
2019-01-14 07:01:02
309
原创 Guice
Guice 的工作原理:Guice:整个框架的门面Injector:一个依赖的管理上下文Binder:一个接口和实现的绑定Module:一组 BinderProvider:bean 的提供者Key:Binder 中对应一个 ProviderScope:Provider 的作用域...
2019-01-09 16:05:23
383
原创 DAO,POJO,JavaBean
POJO: Plain Ordinary Java Objectpublic class BasicInfoVo {private String orderId;private Integer uid;public String getOrderId() { return orderId;}public void setOrderId(String orderId) { ...
2019-01-06 09:55:13
224
原创 CompletableFuture
ExecutorService cpuBound = Executors.newFixedThreadPool(4);orExecutorService ioBound = Executors.newCachedThreadPool(200);CompletableFuture.supplyAsync(() -> getOrder(), ioBound) .thenAppl...
2019-01-02 15:53:34
200
原创 **数据结构总结**
1. PriorityQueue: ``` import java.util.PriorityQueue; import java.util.Queue; class XX{ int a; String b; XX(int a,String b){ this.a = a; this.b = b; ...
2018-12-25 04:25:04
100
原创 Generic types & Wildcards
Use generic types泛型的好处编译时期的强类型检查。有利于提早发现问题,解决问题。不用再使用类型强转。能够利用泛型编写简单易读的通用代码。泛型通常命名规则:E - ElementK - KeyN - NumberT - TypeV - Valuepublic class Stack<E> { ... public Stack() { ...
2018-12-24 16:14:53
174
原创 Json vs Yaml
Json vs Yaml:Json:{//start with '{' is one record "title": "AAA", "list":[ "aa", "bb" ]{Yaml: 没有{}和“”,list用- 来分割title:AAAlist: -aa -bbJson is subset of Yaml。Means json可以用Y...
2018-12-19 15:30:02
530
1
原创 JVM
基础知识:JVM(Java Virtual Machine):JVM功能:LoadingLinkingInitializationJVM MemoryMethod area :In method area, all class level information like class name, immediate parent class name, methods and...
2018-12-19 15:02:03
127
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人