欢迎来到 艾瑞可erik 的魔法世界 🧙‍♂️

给我一个需求,还你一个项目——别管它是什么。这就是全栈。

📚 291 篇文章 🏷️ 504 个标签 📂 90 个分类

🔥 最新文章

Erik Shop 跨境电商平台

Erik Shop — 跨境电商平台

基于 webman 全家桶构建的全栈跨境电商平台,覆盖 B2C/B2B 场景和第三方卖家入驻。

Erik Shop — 三版本对比

Copyright (c) 2026 erik erik@erik.xyz — https://erik.xyz


版本概览

简化版 (Lite) 标准版 (Standard) 完整版 (Full)
定位 个人开发者 / 小型电商 成长型跨境商家 企业级全栈平台
许可证 MIT 开源 商业授权 商业授权
获取方式 GitHub 公开下载 联系 erik@erik.xyz 联系 erik@erik.xyz
分支 lite standard full
当前 ✅ — —

Erik Shop Cross-Border E-Commerce Platform

Erik Shop — Cross-Border E-Commerce Platform

A full-stack cross-border e-commerce platform built on the webman suite, covering B2C/B2B scenarios and third-party seller onboarding.

Erik Shop — Three-Version Comparison

Copyright (c) 2026 erik erik@erik.xyz — https://erik.xyz


Version Overview

Lite Standard Full
Positioning Solo developers / small shops Growing cross-border merchants Enterprise full-stack platform
License MIT open source Commercial license Commercial license
How to get it Public download on GitHub Contact erik@erik.xyz Contact erik@erik.xyz
Branch lite standard full
Current ✅ — —

Ads Platform多平台广告管理系统

Ads Platform — 多平台广告管理系统

统一管理广告投放与跨平台数据报表,支持告警监控、自动出价、多端访问

版本对比

Copyright (c) 2026 erik erik@erik.xyz — https://erik.xyz

版本 授权 获取方式
简化版 (Lite) 开源 (MIT) GitHub 公开仓库
标准版 (Standard) 商业授权 联系 erik@erik.xyz
完整版 (Full) 商业授权 联系 erik@erik.xyz

Ads Platform — Multi-Platform Ad Management System

Ads Platform — Multi-Platform Ad Management System

Manage ad delivery and cross-platform reporting in one place, with alerting, automated bidding, and multi-client access

Version comparison

Copyright (c) 2026 erik erik@erik.xyz — https://erik.xyz

Version License How to get it
Lite Open source (MIT) Public GitHub repository
Standard Commercial license Contact erik@erik.xyz
Full Commercial license Contact erik@erik.xyz

CloudPlatform 云服务平台

CloudPlatform是一个全球云资源交易平台

面向全球用户的云资源交易平台,支持服务器(VM)、IP 地址、云磁盘、域名等产品的在线购买与自动交付。自营物理机通过 Proxmox VE 虚拟化交付,同时支持第三方供应商入驻售卖。

CloudPlatform 版本对比

版本概览

简化版 Lite 标准版 Standard 完整版 Full
授权 开源 (MIT) 商业授权 商业授权
联系 GitHub erik@erik.xyz erik@erik.xyz
适用场景 个人项目/学习/小型商城 中小型云服务商 大型云平台/多供应商

CloudPlatform Cloud Service Platform

CloudPlatform is a global cloud resource trading platform

A cloud resource trading platform for users worldwide, supporting online purchase and automatic delivery of servers (VMs), IP addresses, cloud disks, domains and other products. Self-operated bare-metal machines are delivered through Proxmox VE virtualization, and third-party suppliers can also join and sell on the platform.

CloudPlatform Edition Comparison

Edition Overview

Lite Standard Full
License Open source (MIT) Commercial license Commercial license
Contact GitHub erik@erik.xyz erik@erik.xyz
Best for Personal projects/learning/small storefronts Small and mid-size cloud providers Large cloud platforms/multi-supplier

『uni-app、小程序』蓝牙连接、读写数据全过程

  • 开发工具:HBuilder X 3.4.7.20220422
  • uni-app + Vue3
  • 以安卓App的方式运行(iOS和小程序同理)

思路

蓝牙收发数据的逻辑和我们常用的 AJAX 进行的网络请求是有一丢丢不同的。
其中较大的区别是:蓝牙接收数据不是那么的稳定,相比起网络请求,蓝牙更容易出现丢包的情况。
在开发中,AJAX 发起的请求不管成功还是失败,浏览器基本都会给你一个答复。但 uni-app 提供的 api 来看,蓝牙接收数据会显得更加 “异步” 。

『uni-app, Mini Program』The Whole Process of Bluetooth Connection, Reading and Writing Data

  • Dev tool: HBuilder X 3.4.7.20220422
  • uni-app + Vue3
  • Running as an Android app (same idea for iOS and mini programs)

The idea

The logic of sending and receiving data over Bluetooth is a tiny bit different from the AJAX network requests we’re used to.
The biggest difference is this: receiving data over Bluetooth isn’t all that stable. Compared with network requests, Bluetooth drops packets far more easily.
In day-to-day development, whether an AJAX request succeeds or fails, the browser will basically always give you an answer. But judging by the APIs uni-app provides, receiving data over Bluetooth feels much more “asynchronous”.

开发语言应用场景与学习方向解析

以下是针对主流开发语言(PHP、Go、Rust、C、C++、Java、C#、Qt)的应用场景、优劣势及学习方向的综合分析,结合技术特性和行业实践整理而成:


📊 一、语言对比概览表

语言 主要应用场景 关键优势 典型劣势
PHP 中小型Web开发、CMS系统 开发快、易入门、框架丰富 性能中等、安全风险需管控
Go 云原生、分布式服务、工具开发 高并发、编译高效、部署简单 生态较小、GUI支持弱
Rust 系统编程、安全敏感型基础设施 内存安全、零成本抽象、高性能 学习曲线陡、编译慢
C 操作系统、嵌入式、硬件驱动 极致性能、硬件级控制 手动内存管理、易出安全漏洞
C++ 游戏引擎、高频交易、大型系统 高性能、多范式支持、生态成熟 复杂难精、迭代缓慢
Java 企业应用、Android开发、大数据 跨平台、生态强大、稳定性高 内存占用高、启动慢
C# Unity游戏、企业桌面应用、IoT 强类型系统、IDE强大、语法优雅 跨平台能力弱于Java
Qt 跨平台GUI、工业控制界面 界面美观、信号槽机制、跨平台一致 库体积大、商业授权复杂

Development Language Use Cases and Learning Directions

Below is a comprehensive analysis of the use cases, strengths, weaknesses and learning directions for mainstream development languages (PHP, Go, Rust, C, C++, Java, C#, Qt), put together from technical characteristics and industry practice:


📊 1. Language comparison overview

Language Main use cases Key strengths Typical weaknesses
PHP Small and mid-size web development, CMS systems Fast development, easy to pick up, rich frameworks Moderate performance, security risks need managing
Go Cloud native, distributed services, tooling High concurrency, efficient compilation, simple deployment Smaller ecosystem, weak GUI support
Rust Systems programming, security-sensitive infrastructure Memory safety, zero-cost abstractions, high performance Steep learning curve, slow compilation
C Operating systems, embedded, hardware drivers Ultimate performance, hardware-level control Manual memory management, prone to security holes
C++ Game engines, high-frequency trading, large-scale systems High performance, multi-paradigm, mature ecosystem Complex and hard to master, slow iteration
Java Enterprise applications, Android development, big data Cross-platform, powerful ecosystem, high stability High memory footprint, slow startup
C# Unity games, enterprise desktop apps, IoT Strong type system, great IDE, elegant syntax Weaker cross-platform story than Java
Qt Cross-platform GUI, industrial control interfaces Good-looking UI, signals and slots, consistent across platforms Large library footprint, complicated commercial licensing

Spark、Hive、Hadoop选择与组合使用指南

在构建大数据平台时,Spark、Hive 和 Hadoop 的关系是互补协作而非互斥。选择哪种技术以及如何组合取决于你的具体需求(数据量、处理速度、查询复杂度、成本、团队技能)。以下是如何选择和结合使用的指南:

核心定位与区别

  1. Hadoop (主要指 HDFS + MapReduce/YARN):
    • 定位: 分布式存储(HDFS) + 基础资源管理和批处理框架(MapReduce/YARN)。
    • 优势:
      • 高可靠、高容错的分布式存储 (HDFS): 存储海量数据的基石。
      • 成熟的资源管理 (YARN): 协调集群资源(CPU, 内存)供上层应用(Spark, MapReduce, Hive on MR/Tez)使用。
      • 极高的可扩展性和成本效益: 能在廉价硬件上构建大规模集群。
    • 劣势: MapReduce 计算模型速度慢(尤其迭代计算、交互式查询),编程相对复杂。

A Guide to Choosing and Combining Spark, Hive and Hadoop

When you build a big data platform, Spark, Hive and Hadoop are complementary collaborators rather than mutually exclusive choices. Which technology you pick and how you combine them depends on your specific needs (data volume, processing speed, query complexity, cost, team skills). Here is a guide to choosing and combining them:

Core positioning and differences

  1. Hadoop (mainly HDFS + MapReduce/YARN):
    • Positioning: distributed storage (HDFS) + basic resource management and batch processing framework (MapReduce/YARN).
    • Strengths:
      • Highly reliable, highly fault-tolerant distributed storage (HDFS): the cornerstone for storing massive amounts of data.
      • Mature resource management (YARN): coordinates cluster resources (CPU, memory) for the layers above it (Spark, MapReduce, Hive on MR/Tez).
      • Extreme scalability and cost efficiency: lets you build large clusters on cheap hardware.
    • Weaknesses: the MapReduce computation model is slow (especially for iterative computation and interactive queries), and programming it is relatively complex.

virtualbox与hyper-v的冲突

因为最近在学鸿蒙开发,开发电脑一直用的deepin系统,DevEcoStudio不支持linux系统,用了win兼容引擎还是不行。没办法,只好装了virtualbox来运行win10。

在virtualbox中安装好win10也装了,DevEcoStudio运行后,虚拟机一直提示hyper-v未开启。但是,明明开启了,怎么办?难打VT-X和hyper-v有冲突?查查资料,找到了解决办法。

VirtualBox conflicts with Hyper-V

I’ve been learning HarmonyOS development lately, and my dev machine has always run deepin. DevEco Studio doesn’t support Linux, and the win compatibility engine didn’t help either. So I had no choice but to install VirtualBox to run Win10.

Win10 installed fine in VirtualBox, but after launching DevEco Studio the VM kept saying Hyper-V was not enabled. It clearly was enabled though — so what now? Could VT-X and Hyper-V actually be in conflict? I dug around and found the fix.

PLC基础概念与应用场景详解

自学PLC是完全可行的!关键在于系统化的学习路径+动手实践。以下是为你整理的 「零基础自学PLC全攻略」,结合多年工业自动化经验总结,帮你少走弯路:


一、自学必备基础准备

  1. 电工知识(必须掌握)
    • 看懂电路图、继电器控制原理(启保停/正反转)
    • 了解传感器(NPN/PNP接线)、接触器、开关电源等元件
  2. 计算机操作
    • 文件管理、软件安装、基础调试能力
  3. 逻辑思维能力
    • 能分析“IF…THEN…”条件逻辑

💡 重要提示:若电工基础薄弱,先学习 《电工上岗证》 内容(推荐b站“电工大吴”系列视频)

PLC Fundamentals and Application Scenarios Explained

Teaching yourself PLC is entirely doable! The key is a systematic learning path + hands-on practice. Below is the “Complete Guide to Teaching Yourself PLC from Zero” I put together for you, distilled from years of industrial automation experience, to help you skip the detours:


1. Prerequisites

  1. Electrical knowledge (must-have)
    • Read circuit diagrams and relay control principles (start-hold-stop / forward-reverse)
    • Understand sensors (NPN/PNP wiring), contactors, switching power supplies and other components
  2. Computer skills
    • File management, installing software, basic debugging
  3. Logical thinking
    • Able to reason through “IF…THEN…” conditional logic

💡 Important note: if your electrical fundamentals are weak, start with the “Electrician Work Permit” material (I recommend the “电工大吴” video series on Bilibili)

php 架构方面的设计与思考(二)

基于之前的架构设计,进一步提供完整的可落地方案:

一、服务注册中心增强实现(Consul + PHP)

  1. 健康检查与自动注销
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 服务注册时增加健康检查端点
$consul->get(AgentInterface::class)->registerService([
'ID' => 'payment-service-'.uniqid(),
'Name' => 'payment-service',
'Tags' => ['primary', 'v2'],
'Address' => get_current_ip(),
'Port' => 8000,
'Check' => [
'HTTP' => 'http://'.get_current_ip().':8000/health',
'Interval' => '5s',
'Timeout' => '2s',
'DeregisterCriticalServiceAfter' => '30s'
]
]);

// PHP健康检查端点实现
$app->get('/health', function() {
return json_encode([
'status' => 'UP',
'db_connected' => DB::connection()->getPdo() ? true : false,
'redis_connected' => Redis::ping() ? true : false,
'load' => sys_getloadavg()[0]
]);
});

PHP Architecture Design and Thinking (Part 2)

Building on the earlier architecture design, here’s a more complete, ready-to-ship plan:

1. Enhanced service registry implementation (Consul + PHP)

  1. Health checks and automatic deregistration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Add a health check endpoint when registering the service
$consul->get(AgentInterface::class)->registerService([
'ID' => 'payment-service-'.uniqid(),
'Name' => 'payment-service',
'Tags' => ['primary', 'v2'],
'Address' => get_current_ip(),
'Port' => 8000,
'Check' => [
'HTTP' => 'http://'.get_current_ip().':8000/health',
'Interval' => '5s',
'Timeout' => '2s',
'DeregisterCriticalServiceAfter' => '30s'
]
]);

// The PHP health check endpoint
$app->get('/health', function() {
return json_encode([
'status' => 'UP',
'db_connected' => DB::connection()->getPdo() ? true : false,
'redis_connected' => Redis::ping() ? true : false,
'load' => sys_getloadavg()[0]
]);
});