Skip to content

17 comments

Sounds remarkably like a shill post.

9 points

It is used by many sites like Baidu Search and Baidu Maps, even alibaba uses that.

It is not a shill.

https://discourse.zendframework.com/t/expressive-swoole-vs-node-js-express-js/439

​

https://github.com/swooletw/laravel-swoole/wiki/1.-Introduction

​

It officially supports Co routine based asynchronous programming

​

​

1 points

Your reply isn't making it would less like a shill post...The problem isn't that Swoole is unheard of. It's that your post doesn't sound balanced or caused by normal exposure. To your credit, you don't appear to only post positively about it, so you're probably not a shill.

2 points

You can also do multi threading

Can't wait to see event based code mixed with threading in an application.

5 points

I'm currently in beta-testing phase with swoole. We have many services (servers) that deal with post-processing or timed execution (we don't use cron but event loop's timer function).

​

The sole reason we went with swoole is the fact that there's the event loop interface available, which means I don't have to use outdated eventloop extensions that I had to patch up myself (and I did a lousy job).

The added benefit is that it's fast. VERY fast.

What I liked a lot was coroutine and how it ties in nicely with what I had to do. We use ZeroMQ for transport and many of these services listen on 2-3 ports (one for heartbeat, one for receiving data and the third for publishing or pushing data furhter). Using the coroutine and event loop made it a breeze to create services which bind to multiple ports. Yes, I could have multiplexed over a single port but I like to have dedicated pipes in services instead of one big pipe that chugs everything.

​

So far so good, the performance is nothing short of amazing but as I mentioned before - it's just sugar on top. The ease of using swoole and the fact I simply dropped it in and without too many modifications - our stack works and works well.

3 points

have you also tried react php?

1 points

Yes, I tried react and amp too (I used reactphp for ~12 months initially). They can't compare to swoole at all, it's like comparing a skateboard to Starship Enterprise.

2 points

Their Docker support leaves to be desire. If they spend more time updating their docs or even provide an official Dicker image more people will try it

1 points

That kind of speed doesn't matter for 80%+ of the php codebases out there (or other solutions exists), and the cons are not unsignificant, so...

Some usage, sure, default stack, I don't think so

1 points

I tried the multithreading part, didn't go so well... Ended up with bash exec

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.