Thread overview
arsd 11 progress report - scheduled for release in May
Mar 21, 2023
Adam D Ruppe
Mar 23, 2023
M.M.
Apr 21, 2023
Chris Piker
Apr 21, 2023
Adam D Ruppe
May 08, 2023
Chris Piker
March 21, 2023
I haven't written much in the blog lately but I tried to catch up a little this week with a progress report of the code I intend to release in a couple more months.

http://dpldocs.info/this-week-in-d/Blog.Posted_2023_03_20.html
March 23, 2023
On Tuesday, 21 March 2023 at 21:30:59 UTC, Adam D Ruppe wrote:
> I haven't written much in the blog lately but I tried to catch up a little this week with a progress report of the code I intend to release in a couple more months.
>
> http://dpldocs.info/this-week-in-d/Blog.Posted_2023_03_20.html

Good luck with the restructuring of your project; or, would you call it differently?
April 21, 2023
On Tuesday, 21 March 2023 at 21:30:59 UTC, Adam D Ruppe wrote:
> I haven't written much in the blog lately but I tried to catch up a little this week with a progress report of the code I intend to release in a couple more months.
>
> http://dpldocs.info/this-week-in-d/Blog.Posted_2023_03_20.html

Hi Adam

A cursory reading of the cgi module indicates that arsd provide some of the same functionality of vibe.d, but uses multi-processes or multi-threads instead of fibers.  Is that true?  Also, how do you keep DB requests from getting munged together on the same DB connection socket when using arsd.cgi with arsd.database?

In general what would you say are the advantages of using arsd.cgi over vibe.d (other then simplicity of course).

Also, if I should be posting these questions in some other forum, just let me know which one and I'll switch over.

Thanks,

April 21, 2023
On Friday, 21 April 2023 at 02:34:10 UTC, Chris Piker wrote:
> A cursory reading of the cgi module indicates that arsd provide some of the same functionality of vibe.d, but uses multi-processes or multi-threads instead of fibers.  Is that true?

It actually does a lot more than that, including a fiber impl too (the -version=embedded_httpd_hybrid)

> Also, how do you keep DB requests from getting munged together on the same DB connection socket when using arsd.cgi with arsd.database?

You don't use the same db connection socket. You have a separate one per worker.

The way I usually do it is:

---
Database getDb() {
    static Database db;
    if(db is null)
       db = new WhicheverImpl(args);
    return db;
}
---

So you get a thread-local cache, recreated whenever needed. This works reliably in all current modes. (I might be adding a new mode in version 11 that works differently, but I'll add a new helper function for that if I do).

> In general what would you say are the advantages of using arsd.cgi over vibe.d (other then simplicity of course).

Almost everything. It is much simpler to use, has more library compatibility, better performance (both compiles faster and serves faster), more stability (both fewer bugs and more long term api support), more features.... though there's a few places vibe might have something I don't (like there's a redis lib on their end, tho odds are you can use their lib in my system lol), I have most things they have and some things they don't (like my html form generators).

May 08, 2023

On Friday, 21 April 2023 at 12:52:28 UTC, Adam D Ruppe wrote:

>

Almost everything. It is much simpler to use...

Heck I'm game. My current project is too heavily dependent on vibe.d to change now, but I do have another coming up in the near future (~6 months) that has similar needs. I'll give arsd a whirl for that one. I've found your code easy to read in the past and am looking forward to trying it out.