Articles

  • 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].
    
  • Spring Framework

    Overview

    Benefits of the Spring platform:

    • Make a Java method execute in a database transaction without having to deal with transaction APIs.
    • Make a local Java method a remote procedure without having to deal with remote APIs.
    • Make a local Java method a management operation without having to deal with JMX APIs.
    • Make a local Java method a message handler without having to deal with JMS APIs.

    Table of Contents

  • 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

  • mhttpd - Micro HTTP Server

    Introduction

  • Linux Asynchronous I/O

    Introduction

    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

    Introduction

    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),整个系统实现是经济的、易支付的。

  • Security

    Table of Contents

  • OpenFOAM

    Introduction

    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 |
    ----------------------- ------------------------------ ---------------------------
    

    Application

    Applications:

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

    Table of Contents

    流程

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

    任务调度

    任务编排,提高资源利用率,提高执行效率

    任务执行时间预估非常重要。对用户决策有很大意义。

    计算资源分配

    何时分配,何时回收,成本控制