Konstrukt without apache?

7 views
Skip to first unread message

jaa...@heeringson.com

unread,
Mar 3, 2010, 11:33:31 AM3/3/10
to Konstrukt
The thought occurred to me while investigating PHP's socket libs with
the consideration of building a http-based bayoux server in php: Why
does konstrukt need apache and what would it take to run it as a CLI
application? Sure, there is the small issue of creating the http
protocol layer on top of PHP TCP sockets but it doesn't strike me as
undoable. In it's current state konstruct is allready as decoupled as
could be from the webserver. My guess is this could open up a whole
new world of optimization?

troels knak-nielsen

unread,
Mar 7, 2010, 7:10:51 AM3/7/10
to kons...@googlegroups.com

Hi Jaanus.

Konstrukt has a very explicit interface to the http layer, which makes
it quite trivial to substitute. For example, the virtualbrowser
component stubs out the entire http layer, making it possible to run
functional tests without having a web server. You could most certainly
create a web server in php and run Konstrukt on top of that. Whether
that's a good idea is a questionable matter though. Php has a rather
primitive resource management mechanism. Running everything within a
single process would make it very hard not to introduce memory leaks
and concurrency problems.

--
troels

Jaanus Heeringson

unread,
Mar 7, 2010, 3:51:16 PM3/7/10
to kons...@googlegroups.com
I know there are issues, mainly with the poor/non-existing threading support, but this beast could easily be run in in a forked server, in which case memory-leaks could be handled the dirty way by handler process lifespan etc. I have some experience in building other, simpler forking apps using PHP and I believe it would be doable in this case to.

On a sidenote - the issues that have cropped up during my reasearch into this have made me move up my timetable for finding a replacemnent for PHP. This is one of the areas that exposes a lot of PHP's weaknesses...


--
You received this message because you are subscribed to the Google Groups "Konstrukt" group.
To post to this group, send email to kons...@googlegroups.com.
To unsubscribe from this group, send email to konstrukt+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/konstrukt?hl=en.




--
MVH

Jaanus Heeringson
Underwerks Design

www.underwerks.com
+46 735 016179

troels knak-nielsen

unread,
Mar 7, 2010, 5:11:27 PM3/7/10
to kons...@googlegroups.com
On Sun, Mar 7, 2010 at 9:51 PM, Jaanus Heeringson <jaa...@heeringson.com> wrote:
> I know there are issues, mainly with the poor/non-existing threading
> support, but this beast could easily be run in in a forked server, in which
> case memory-leaks could be handled the dirty way by handler process lifespan
> etc. I have some experience in building other, simpler forking apps using
> PHP and I believe it would be doable in this case to.

Perhaps, but what would the gain be of doing that?

> On a sidenote - the issues that have cropped up during my reasearch into
> this have made me move up my timetable for finding a replacemnent for PHP.
> This is one of the areas that exposes a lot of PHP's weaknesses...

Yes, but in my experience it isn't that much of an issue for most
applications. I think that the simplicity that this design gives is a
very good trade off for some wasted resources.

--
troels

Reply all
Reply to author
Forward
0 new messages