PHPackages                             steady-as-hill/single-service-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. steady-as-hill/single-service-server

ActiveLibrary[Framework](/categories/framework)

steady-as-hill/single-service-server
====================================

single service framework, base on swoole

1.0(7y ago)014MITPHP

Since Jun 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/waynewn/SingleService)[ Packagist](https://packagist.org/packages/steady-as-hill/single-service-server)[ RSS](/packages/steady-as-hill-single-service-server/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

单服务框架
=====

[](#单服务框架)

说明（特色、局限性）
----------

[](#说明特色局限性)

- 这个框架是用来实现内部接口服务的，不是做网站的（不考虑SEO，视图、丰富路由协议等）
- http协议，如果使用rawdata提交参数，只支持json格式
- 返回值固定json格式，需自行修改代码支持其他情况（没预留）
- 配置获取支持两种方式：本地路径或远程ini服务。
- 每个服务器都内置了个ServiceName用于运维管理，比如启动停止服务，比如重新获取刷新配置等。该ServiceName名为SteadyAsHill（虽然占用，但限制了只能127.0.0.1访问）。

微服务重在微字，要拆解。它不是万能的方案，特大特长的，就需要考虑其他的框架了，甚至换语言

名词解释
----

[](#名词解释)

- uri中 /servicename/controllername/actionname, 每个servicename对应启动一个Server
- 关于模块名和服务名：物理磁盘路径中的名字是模块名，url中的名字是服务名，服务名可以在配置文件中更改，且可以多个（比如由于版本升级，需要servicename有所区别，但又需要兼顾旧版一段时间）

参看
--

[](#参看)

[编写hello world](docs/Codes.md)

[框架代码说明](docs/Frameworkd.md)

[运维管理说明](docs/Maintain.md)

其他
--

[](#其他)

**关于库文件加载，基本分三种情况：**

1. 模块专属类库（library目录），在run.php的入口文件通过设置-&gt;initAutloadLocalLibrary(true)，可以在启动时全部预先加载，此时就不需要相应的autoload函数了
2. 对于遵循psr-4规范的类库目录，可以在run.php的入口开头加入相关autoload，或通过server-&gt;initIncludePath()指定尝试搜索目录（仅支持一个目录）
3. 其他像composer这种外部类库，在run.php的入口开头加入相关autoload

**ServiceSample 下是几个小的Service骨架**

能用，但不一定合适你的情况能直接用，都是些很简单示例性的小服务

使用前修改：

1. 合并所有\_config目录下的配置
2. 确认或修改bin/run.php 里 SingleService/Server.php 的路径
3. 确认或修改bin/run.php 里 initServiceModule 那里模块路径
4. 确认或修改bin/start.sh 里 配置文件获取方式

- Email 发送邮件的
- HelloWorld 演示测试用的
- Ini 配置管理

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity62

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2876d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8f4ca102171f00a75538266b967af5dcf17882e2cc351312ae734d7db3d3888?d=identicon)[waynewn](/maintainers/waynewn)

---

Tags

service

### Embed Badge

![Health badge](/badges/steady-as-hill-single-service-server/health.svg)

```
[![Health](https://phpackages.com/badges/steady-as-hill-single-service-server/health.svg)](https://phpackages.com/packages/steady-as-hill-single-service-server)
```

###  Alternatives

[hprose/hprose

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

2.1k215.3k37](/packages/hprose-hprose)[ddesrosiers/silex-annotation-provider

A silex service provider that allows the use of annotations in ServiceControllers.

25246.7k3](/packages/ddesrosiers-silex-annotation-provider)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
