PHPackages                             kim1ne/loop-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kim1ne/loop-server

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kim1ne/loop-server
==================

1.1.1(1y ago)17MITPHPPHP &gt;=8.1

Since Jan 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kim1ne/loop-server)[ Packagist](https://packagist.org/packages/kim1ne/loop-server)[ RSS](/packages/kim1ne-loop-server/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

Installation
============

[](#installation)

This package can be installed as a [Composer](https://getcomposer.org/) dependency.

```
composer require kim1ne/loop-server
```

This component unites all libraries, where needs start an infinite process. Example:

---

Producers publishing messages to the kafka. Workers expect messages from the kafka and when got messages, sending to the socket server. The socket-server sending messages to all connected clients [![image](https://private-user-images.githubusercontent.com/111231185/404436314-5657a5c2-7583-492c-ad05-bf16f2aeac2a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIxMTk3NjEsIm5iZiI6MTc4MjExOTQ2MSwicGF0aCI6Ii8xMTEyMzExODUvNDA0NDM2MzE0LTU2NTdhNWMyLTc1ODMtNDkyYy1hZDA1LWJmMTZmMmFlYWMyYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF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

```
use RdKafka\Conf;
use Kim1ne\Socket\Server\Server;
use Kim1ne\Socket\Server\Connection;
use Kim1ne\Socket\Server\Message;
use Kim1ne\Socket\Server\Transport;
use Kim1ne\Kafka\KafkaWorker;
use Kim1ne\Kafka\KafkaConsumer;
use Kim1ne\Kafka\Message as KafkaMessage;

$server = $server = new Server(transport: Transport::WS);

$server->on('message', function (Message $message, Connection $connection, Server $server) {
    InputMessage::green("I've got the message!");
});

$conf = new Conf(...);

$worker = new KafkaWorker($conf);
$worker->subscribe(['my-topic'])

$worker->on(function (KafkaMessage $message, KafkaConsumer $consumer) use ($server) {
    $consumer->commitAsync($message);
    $server->sendAll($message->payload);
});

\Kim1ne\Loop\Server::run($server, $worker);
```

 Version 1.1.0- All components have been updated 1.1.0
- A component has a scope-name. It has the method - getScopeName() - returns the scope-name. All events, which sends a component will merge with the scope-name.
- All components are isolated from each other. A component can sends an event, and another component will waiting for the event

---

Example: the object [KafkaWorker](https://github.com/kim1ne/kim1ne-kafka/blob/main/src/Kafka/KafkaWorker.php) has scope-name - `kafka:worker`, and sends an event `message`, the event will called `kafka:worker:message`

```
use Kim1ne\Socket\Server\Server;
use Kim1ne\Kafka\KafkaWorker;
use Kim1ne\Kafka\Message;
use Kim1ne\Kafka\KafkaConsumer;
use Kim1ne\Core\Event;

/**
 * @var Server $server
 */
$server->on('kafka:worker:message', function (Event $event) use ($server) {
    $message = $event->get('message');
    $server->sendAll($message);
});

/**
 * @var KafkaWorker $worker
 */
$worker->on('message', function (Message $message, KafkaConsumer $consumer) use ($worker) {
    $worker->dispatchEvent('message', new Event([
        'message' => $message->payload
    ]));
});
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance40

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~16 days

Total

3

Last Release

504d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/111231185?v=4)[kim1ne](/maintainers/kim1ne)[@kim1ne](https://github.com/kim1ne)

---

Top Contributors

[![kim1ne](https://avatars.githubusercontent.com/u/111231185?v=4)](https://github.com/kim1ne "kim1ne (1 commits)")

### Embed Badge

![Health badge](/badges/kim1ne-loop-server/health.svg)

```
[![Health](https://phpackages.com/badges/kim1ne-loop-server/health.svg)](https://phpackages.com/packages/kim1ne-loop-server)
```

###  Alternatives

[alexwight/php-signalr-client

Signal R Client

2331.9k](/packages/alexwight-php-signalr-client)[aertmann/history

An improved history backend module for Neos

1174.6k](/packages/aertmann-history)[pixelfederation/circuit-breaker-bundle

An analogous bundle to Java's Hystrix in PHP world.

1229.0k](/packages/pixelfederation-circuit-breaker-bundle)

PHPackages © 2026

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