# Event-driven server

**URL:** <https://help.nextcloud.com/t/event-driven-server/151676>\
**Category:** 💻 Development\
**Created:** [December 11, 2022, 6:31pm UTC](https://help.nextcloud.com/t/event-driven-server/151676 "2022-12-11T18:31:46Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![pulsejet](https://help.nextcloud.com/user_avatar/help.nextcloud.com/pulsejet/32/55436_2.png) [@pulsejet](https://help.nextcloud.com/u/pulsejet)\
**Post date:** [December 12, 2022, 7:43am UTC](https://help.nextcloud.com/t/event-driven-server/151676/7 "2022-12-12T07:43:20Z")

</div>

> [@christianlupus](#):
>
> In the current setup, each request from the client boots the NC server core plus bootstraps all apps. This should be rather fast unless some apps do nasty things or you have immense amounts of apps installed.

Depends on your definition of fast. It takes ~10ms for core apps to bootstrap for me (extremely fast machine). I’d consider the latency as fairly low but keep in mind this is 10ms of actual CPU usage. With a lot of requests, bootstraping is a major chunk of the total CPU usage.

> [@christianlupus](#):
>
> Switching to an asynchronous model seems like a major difference to me. Are you intending to run one (or more) PHP process in a continuous way that keeps running and serves request for request? Still within the PHP and with help if the symfony tools?

Correct. Check out [Swoole](https://openswoole.com/) if you’re unfamiliar with this. [It’s ridiculously fast](https://openswoole.com/benchmark), btw.

> [@christianlupus](#):
>
> This would be a serious require of the core code.

Indeed. I already mentioned this is a big breaking change.

> [@christianlupus](#):
>
> I fear this forum is not the best location to discuss things as this is a highly technical question. I would go for the server repo.

Not so sure about that. I’m looking for opinions from anyone (who has one) from the core team, not just the devs.

> [@christianlupus](#):
>
> A side remark: you wrote that you would girl and create it for yourself. So, you have the resources to handle this yourself? Then, you cannot lose anything, right? Either you use it for yourself or your ideas get accepted and merged into the server core.

I’m willing to work up most of the basics (might need a while admittedly, but hopefully it’s doable). Getting all apps to work right is where I’ll definitely need more help.

On the other hand, if I _know_ this is never going to get merged, I’d do several things differently. For a start, any kind of backward compatibility goes out of the window then. E.g. any deprecated functionality can be safely discarded. It just gets a lot easier in this case:

> [@pulsejet](#):
>
> I just want to make sure there’s no wasted effort.

---

_[View the full topic](https://help.nextcloud.com/t/event-driven-server/151676)._
