西维蜀黍

【Architectural Pattern】三层架构(Three-tier Architecture)

Three-tier Architecture

Three-tier architecture is a well-established software application architecture that organizes applications into three logical and physical computing tiers: the presentation tier, or user interface; the application tier, where data is processed; and the data tier, where the data associated with the application is stored and managed.

The chief benefit of three-tier architecture is that because each tier runs on its own infrastructure, each tier can be developed simultaneously by a separate development team, and can be updated or scaled as needed without impacting the other tiers.

  ...


【Domain】领域驱动设计(Domain Driven Design)

Domain-driven design (DDD)

Domain-driven design (DDD) is the concept that the structure and language of software code (class names, class methods, class variables) should match the business domain. So that the designed system is high conhesion and low coupling

For example, if a software processes loan applications, it might have classes such as LoanApplication and Customer, and methods such as AcceptOffer and Withdraw.

  ...


【TrueNAS】Rsync 同步

My Case

# via SMB
$ time rsync -aPXcv --delete test-rsync /Volumes/SSDPool2/rsync
# via ssh
$ time rsync -avPX --delete -e 'ssh -p 34270' ../myBlogV2 root@192.168.18.93:/mnt/SSDPool2/DS/rsync

# via rsync protocol
$ rsync -aPXz --delete myBlogV2 rsync://192.168.18.93/sw_rsync/
# sync from ubuntu to truenas
$ rsync -az -vvvv node_exporter-1.0.1.linux-amd64.tar.gz rsync://192.168.18.93/sw_rsync/

  ...


【macOS】Too Many Open Files

System Level

By default, the maximum number of files that Mac OS X can open is set to 12,288 and the maximum number of files a given process can open is 10,240.

You can check these with:

$ sysctl kern.maxfiles
$ sysctl kern.maxfilesperproc

You can increase the limits (at your own risk) with:

$ sysctl -w kern.maxfiles=20480
$ sysctl -w kern.maxfilesperproc=18000

To make the change permanent, use sudo to put your settings in /etc/sysctl.conf (which you may have to create), like this:

kern.maxfiles=20480
kern.maxfilesperproc=18000

Note: In OS X 10.10 or lower, you can add setting in /etc/launchd.conf like limit maxfiles and it will override whatever you put here.

  ...


【FreeBSD】Too Many Open Files

System Level

$ sysctl -a |grep files
kern.maxfiles: 780418
kern.maxfilesperproc: 702369
kern.openfiles: 627
p1003_1b.mapped_files: 200112
  ...