Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a LWAN design architecture doc ? #220

Open
GuacheSuede opened this issue Feb 9, 2018 · 6 comments
Open

Is there a LWAN design architecture doc ? #220

GuacheSuede opened this issue Feb 9, 2018 · 6 comments

Comments

@GuacheSuede
Copy link
Contributor

No description provided.

@lpereira
Copy link
Owner

lpereira commented Feb 9, 2018

There's no documentation with the exception of some blog posts. What do you want to know, specifically?

@GuacheSuede
Copy link
Contributor Author

I would like to know about the concurrency design or how it handles multiple clients

@GuacheSuede
Copy link
Contributor Author

Another question if you dont mind, does lwan url map allow such patterns ?
/blog/post/{id}

@lpereira
Copy link
Owner

lpereira commented Feb 9, 2018

The concurrency design is explained here: https://tia.mat.br/posts/2014/10/06/life_of_a_http_request.html

As far as the URL map goes: it does not (it only matches prefixes), but you can use the rewrite module:

&blog_post /view_blog_post
rewrite /blog/ {
    pattern post/(%d+) {
         rewrite as /view_blog_post?id=%1
    }
}

This is considering that you have a handler named "blog_post" that gets a numeric ID via the query string.

@GuacheSuede
Copy link
Contributor Author

Would one be able to lets say implement libr3 in the handlers and if so which code should I look at ?

@lpereira
Copy link
Owner

It's possible to create a module with r3 to match URLs, yes. You can start by looking at the rewrite module (src/lib/lwan-mod-rewrite.c).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants