• Hibernate



    hql = "from task where id = ?";
    this.session.createQuery(hql).setParamter(0,1); //单个或则多个参数设置传递
  • CoreOS


    CoreOS is a powerful Linux distribution built to make large, scalable deployments on varied infrastructure simple to manage. Based on a build of Chrome OS, CoreOS maintains a lightweight host system and uses Docker containers for all applications. This system provides process isolation and also allows applications to be moved throughout a cluster easily.

    To manage these clusters, CoreOS uses a globally distributed key-value store called etcd to pass configuration data between nodes. This component is also the platform for service discovery, allowing applications to be dynamically configured based on the information available through the shared resource.

    In order to schedule and manage applications across the entirety of the cluster, a tool called fleet is used. Fleet serves as a cluster-wide init system that can be used to manage processes across the entire cluster. This makes it easy to configure highly available applications and manage the cluster from a single point. It does this by tying into each individual node’s systemd init system.

    • 更快的启动速度
    • 平滑版本升级
    • 应用容器化
  • Advanced Vim Tutor

    This article introduce advanced tips using Vim
    editor, common to many Unix and Unix-like operating systems.
    "Advanced Vim Tutor" [New file].
  • SCM

    Table of Contents

  • Restful API Design

    Representational state transfer (REST) or RESTful web services are one way of providing interoperability between computer systems on the internet. REST-compliant web services allow requesting systems to access and manipulate textual representations of web resources using a uniform and predefined set of stateless operations.

    Table of Contents

  • Linux Asynchronous I/O


    Asynchronous I/O (AIO) is a method for performing I/O operations so that the process that issued an I/O request is not blocked till the operation is complished. Instead, after an I/O request is submitted, the process continues to execute its code and can later check the status of the submitted request.

    There are several means to accomplish asynchronous I/O in Linux:

    • kernel syscalls
    • user space library implementation and use system calls internally (libaio)
    • emulated AIO entirely in the user space without any kernel support (librt for now, part of libc)
  • LVS (Linux Virtual Server)

    Table of Contents


    The Linux Virtual Server is a highly scalable and highly available server built on a cluster of real servers, with the load balancer running on the Linux operating system. The architecture of the server cluster is fully transparent to end users, and the users interact as if it were a single high-performance virtual server.

    The real servers and the load balancers may be interconnected by either high-speed LAN or by geographically dispersed WAN. The load balancers can dispatch requests to the different servers and make parallel services of the cluster to appear as a virtual service on a single IP address, and request dispatching can use IP load balancing technolgies or application-level load balancing technologies. Scalability of the system is achieved by transparently adding or removing nodes in the cluster. High availability is provided by detecting node or daemon failures and reconfiguring the system appropriately.

    现在Web服务中越来越多地使用CGI、动态主页等CPU密集型应用,这对服务器的性能有较高要求。未来的网络服务会提供更丰富的内容、更好的交互性、更高的安全性等,需要服务器具有更强的CPU和I/O处理能力。例如,通过HTTPS(Secure HTTP)取一个静态页面需要的处理性能比通过HTTP的高一个数量级,HTTPS正在被电子商务站点广为使用。所以,网络流量并不能说明全部问题,要考虑到应用本身的发展也需要越来越强的处理性能。


    可伸缩性(Scalability),当服务的负载增长时,系统能被扩展来满足需求,且不降低服务质量。 高可用性(Availability),尽管部分硬件和软件会发生故障,整个系统的服务必须是每天24小时每星期7天可用的。 可管理性(Manageability),整个系统可能在物理上很大,但应该容易管理。 价格有效性(Cost-effectiveness),整个系统实现是经济的、易支付的。

  • OpenFOAM


    OpenFOAM 是一个用于创建可执行程序 (applications) 的 C++ 库。

      | Open Source Field Operation and Manipulation (OpenFOAM) C++ Library |
              |                          |                          |
      --------v---------            -----v-----             --------v----------
      | pre-processing |            | solving |             | post-processing |
      ----^---------^---            ---^----^--             ----^----------^---
          |         |                 /      \                  |          |
    ----------------------- ------------------------------ ---------------------------
    | Utilities | Meshing | |    User     |  Standard    | | ParaView |    Others    |
    |           |  Tools  | |Applications | Applications | |          | e.g. EnSight |
    ----------------------- ------------------------------ ---------------------------



    • 求解器 (solver): 依据 CFD 模型创建的求解器,每个用于求解一个特定的问题
      • 数值计算 (流体流动、化学反应、换热、结构动力学、电磁场、金融评估等)
    • 工具 (utility): 执行简单的前后处理任务,主要负责数据操作和代数几何运算
      • 前处理 (建模、网格、边界条件)
      • 后处理 (计算结果显示和处理)
  • OpenFOAM Service Design

    Table of Contents


    1. 参数
    2. 网格化
    3. 仿真求解
    4. 出结果视频






  • Parallel Programming

    Table of Contents


    • 线程级别
    • 共享存储
    • 隐式(数据分配方式)
    • 可扩展性差