[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libuv based http server for Guile
From: |
Nala Ginrut |
Subject: |
Re: libuv based http server for Guile |
Date: |
Sun, 03 Nov 2019 14:11:09 +0800 |
User-agent: |
mu4e 1.3.2; emacs 26.1 |
Hi Shiv!
Shiv Shankar Dayal writes:
> Hi,
>
> I saw on GNU Guile mailing list that you are interested in a libuv based
> http server for GNU Guile. libh2o is a libuv based http server as you might
> know. I think that we can access it using FFI for GNU Guile.
> Please let me know your thoughts on this.
First, I'm glad that someone is interested in an alternative server-core
of GNU Artanis. To gain more interestes, let me CC this mail to
address@hidden.
Here's my short answer:
I'd like to make GNU Artanis more general to support replaceable HTTP
server-core as a plugin. This requires standardize the low-level APIs,
which implies bigger works. But it's worth to go.
FWIW, there're some points that we should care about:
1. Ragnarok is co-routine based, so the current GNU Artanis has no
support for multi-threading. That is to say, no any locks. However, I'd
like to support multi-threading server-core as well. And I wrapped the
low-level data accessing with an abstract layer, so that we may add
locks without changing too many codes.
2. I've read a little libuv code before, the exported APIs seem not
general enough for us. I don't remember it exactly, but I've ever taken
a look at it for other purpose, finally we have to choose libevent.
3. I hope the folks who is interested in multi-threading server-core
start to research it. But I'd recommend not so hurry to make the hands
dirty, it's better to discuss in address@hidden first.
4. For FFI part, I have a macro in (artanis utils) that I'm using for
binding libnss currently:
https://gitlab.com/NalaGinrut/artanis/blob/master/artanis/utils.scm#L1594
The usage is simple:
-----------------code---------------------
(eval-when (eval load compile)
(ffi-binding "libnss3"
(define-c-function int NSS_Init ('*))
...
))
-----------------end----------------------
Then there's %NSS_Init, one have to do some validation to write a
function like nss:init or else.
4. I'll write an article about the roadmap of GNU Artanis-1.0. There'll
be more details about the plan. (Not only server-core).
Best regards.
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
signature.asc
Description: PGP signature
- Re: libuv based http server for Guile,
Nala Ginrut <=