Re: GLIB for a webserver



Hello,

     Sorry for the delay to replay..

If you write applications which don't leak memory, then you probably won't
have any problem. Also if your web server fails because it consumes too much
memory, this also probably means that either your HW is not strong enough to
support your web server or your web server is leaking memory, and in this
last case having it fail and restarting it is IMHO quite a good idea (much
better code than trying to handle failed memory allocations).
    Actually, I am going to be honest in saying that I don't totally
agree to you. You are right in saying that more hardware is needed or
that leaking memory shouldn't exist. However, when we talk about a web
server, we are talking about an application that will use memory on a
per request basis.
    Imagine the following scenario: the application running on my web
server spends 20k of memory for each concurrent request. If I have
enough concurrent requests in a way it will consume more memory than,
let's say, 2Gb available memory, the expected result would be to
refuse new connections, not restart the application and all current
requests being handle. Agree?
    Anyway, let me just make a point clear, first of all: I didn't
asked this expecting someone on the list to solve this problem and my
interest is not to criticize glib either. Actually, I understand this
problem exists and I am willing to (and want to) use glib anyway. My
fear is that I start to use it and see the glib development going in a
different path in future, for example: someone might change the lib
design in future in a way it would serve each time less server side
applications, to focus better on being a basis to graphical frontend.
   The main question I tried to ask (I am usually bad to express it
well, sorry), is: what are the plans for glib? Do you thing it will be
each time more an independent library, with general use purpose, or
will it be something focused to gnome apps?
    I was reading about D-BUS, for example, as I was interested in
ways to implement IPC using glib, but althought it is part of GIO, its
intention is to serve only to desktop apps, isn't it?

Please have a look at the LibSoup library, I've used it before for a small
embedded web server (in Libgda's console's tool) and it worked quite well,
but it really depends on what you want to do.
   Thanks again for the recommendation. I took a look and it seems an
excelent library for what I want to do. However, I still need to read
the docs in details, it was not clear to me how the lib deals with
threads to service calls and if it supports blocking/non blocking
service handling.  But if it serves to me, it will be my first choice.
I already entered the mailing list too! :D

Regards,
-- 
Marcelo Elias Del Valle
http://mvalle.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]