- 博客(15)
- 收藏
- 关注

原创 Java Transaction Management
Just a few weeks ago, I had a discussion with one of my colleagues about how to manage the transaction in our innovation project, and I found it a big bang knowledge when dig into details. So I want to go through these details and give an internal knowledg
2014-10-12 00:37:11
1366

原创 Sequential Task Process based on Spring Event Framework
This is a follow-up to my last post, where I explained basic concept and usage of Observer Pattern in enterprise application. Here let's dive into a more detailed practice.
2013-11-07 23:46:04
1628

原创 Mysql读写分离的两种实现对比:Spring+JPA应用层实现 vs Amoeba中间件实现
前段时间看了篇文章,讲Youku网数据库架构的演变,如何从最开始的读写分离,再到垂直分区,最后到水平分片,一步一步慢慢成熟的。看完之后很有冲动抽出一个模型来把这几种技术都实现一下。 说干就干,首先是读写分离了,我使用的数据库是Mysql,主从数据复制用的是半同步机制(mysql版本必须 5.5以上),具体配置,可以参照这篇文章: http://blog.youkuaiyun.com/changer
2013-01-05 21:08:12
7315

原创 基于Sqoop和Hadoop的数据质量分析报告
一个系统的数据质量不高通常是软件本身做的不够好,数据从源头就出现了问题。所以 有人说,搞软件开发做什么都不要做interface,因为即使是再久远的interface,都会时不时的给你来个SSC,而且他们还会把你5个字母的名字拼错4个。。。 为了能够持续归总interface数据质量报告,来完善系统流程,我们就需要定量定性的分析源头数据。 首先,我们为了能够更好
2012-11-15 23:14:41
1938

原创 用MapReduce来进行用户行为分析
在系统设计的时候,为了提高可用性,经常需要对用户行为进行分析,来持续完善系统。 一个典型的场景就是分析用户的查询条件,根据操作习惯和规律来精简用户输入,让查询变得更简单更高效。 那么对于这种场景,我们应该如何实现?最简单的做法就是在每次查询的时候都把所用到的条件直接save到关系数据库,这种做法确实很简单,但是每次都需要做write操作,尤其对于操作密集型应用,我们不认
2012-09-16 01:26:10
3006
原创 聊天驱动式持续集成:微软Teams + Atlassian Bamboo
一个无服务架构,聊天驱动的运维工具。可以在微软Teams里通过发送消息来触发Bamboo的CI/CD任务,并接受对应结果推送。
2022-03-24 18:39:20
515
原创 Notes on reading: Functional Programming in Scala - Part 1
Part 1introduces functional programming, explains what it is, why you should care, and walks through the basic low-level techniques of FP, including how to organise and structure small functional pr
2015-10-07 12:01:50
616
原创 Variance in Scala
Covariance & Contravariance & VarianceIf inside one parameterized type like List[T], with type A and B where A is a subclass of B, if List[A] is subclass of List[B], then we call it Covariance, el
2015-10-05 08:05:45
589
原创 Tail call optimization in Scala
Recursion provides us an clean way to solve some algorithm problems. But one drawback of it is the memory cost caused by recursion call stack, especially when memory is sensitive like in mobile applications
2015-10-02 15:29:15
698
原创 Observer pattern in Enterprise J2EE Architecture
Observer pattern is one of the most popular patterns used in J2EE software architecture, from its definition in Wiki, we can see the key words for Observer pattern is "Dependency Registration", "Stat
2013-07-25 00:25:08
1164
原创 L1 Cache in JPA
在对实体做查询的时候经常会涉及到L1 cache, 在JPA 里,L1 cache就是单个Persistence Context内的实体对象缓存,eclipselink实现下有下面几种策略:public static final int UseDescriptorSetting = -1;public static final int DoNotCheckCache = 0;pub
2013-01-14 16:52:38
1164
原创 Mysql读写分离的两种方法对比:Spring+JPA应用层实现 vs Amoeba中间件实现
[url]http://blog.youkuaiyun.com/gaarazhu/article/details/8470431[/url]
2013-01-06 19:14:01
339
原创 MapReduce Tuning
MapReduce is not a low latency computing model, minutes at least will go before the result comes out, this does not mean there's no way for us to do the tuning. Combine with the inside of Hadoop, we c
2012-12-23 01:33:45
963
原创 Java属性克隆的几种方法
在实际开发中经常遇到属性克隆的问题,比如在表现层提交的Request DTO,可能需要在控制层被映射成多个Java Bean,再传递到逻辑层来进行相应的业务处理,那么如何才能简单而又快速的完成属性克隆呢? 对于仅仅包含简单属性的Java Bean来说,Apache Commons里的BeanUtils 是个不错的选择,不过前提是对应属性必须具备相同的属性名。但是对于复杂属性来说,
2012-09-28 08:33:51
2340
原创 基于Aviator的注解驱动验证框架
程序开发过程中,在同一系统中层层之间数据传递或者是异构系统之间同步异步通信的时候,我们经常需要对Java Bean进行属性验证,来决定是否继续后续process,或者直接抛出error message。 传统的做法,给每个验证场景加一个验证类,专门负责所有属性的验证,以及验证结果的校验和处理,这种做法最直白,但是不够灵活。第二种就是Java 6自带的验证框架 Bean valid
2012-08-25 09:20:14
1946
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人