D Web Services Application Potential?
Etienne Cimon via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jul 25 19:53:14 PDT 2015
On 2015-07-25 22:35, Brandon Ragland wrote:
> On Sunday, 26 July 2015 at 00:46:58 UTC, Etienne Cimon wrote:
>> On 2015-07-25 18:47, Brandon Ragland wrote:
>>> Hi All,
>>>
>>> Not entirely certain if there is a decent D web applications server
>>> implementation as of yet, but if there is a project going on, I'd love
>>> to have a gander.
>>>
>>> On the off-chance there isn't one, who would be interested in going at
>>> it, call it, a 'group' project.
>>>
>>> I've been yearning for a D web app server for a while, as most of my day
>>> to day work is done on Java EE containers (think Glassfish, Weblogic,
>>> etc. Java Beans, lalala) and the insane system usage has bothered me
>>> from day one.
>>>
>>> There's Wt for C++, although I don't see much coming from that, though
>>> the concept is grand. Rust has a few up and coming web server frameworks
>>> as well.
>>>
>>> D could really excel here.
>>>
>>> -Thoughts? Am I crazy (probably)?
>>>
>>>
>>
>> Not crazy. I've been working towards exactly that as hard I could (see
>> on https://github.com/etcimon/), seeing how D would be the best
>> language to write any web backend with. I've since worked on writing
>> all the architecture in D: a new TLS library Botan, along with
>> libhttp2 for HTTP/2 support and an async event loop
>> (TCP/UDP/FileSystem/FileWatcher/DNS/Timers) library.
>>
>> I've written all the "glue" code to have it in the vibe.d framework
>> and tested it as thoroughly as I could. I now consider it an
>> achievement and use it in my web applications.
>>
>> I'm currently concentrating on improving an async postgresql driver
>> called DDB and adding transactions, Json, TLS, Listen/Notify, etc.
>>
>> I think my next priority would be to rewrite the back-end of
>> http://www.cosmocms.org with D and the vibe.web.web Web Interface, and
>> Redis+Postgresql (sessions in redis). It's about 4k-5k LOC
>>
>> I think a good and necessary library would be for cross-platform,
>> async DNS. I've been looking at this one in particular:
>> https://github.com/miekg/dns
>
> In relation to DDB: Have you seen: https://github.com/buggins/ddbc
>
> It's most similar to the JDBC driver in Java. Currently supports MySQL,
> PostgreSQL and SQLite. That might be a good starting point to expand the
> SQL driver support for a web framework.
>
> I dug around some of your repos, too early to comment but I'll sift
> through more of it as time allows, see if I can't offer anything towards
> your current goals in the near future.
>
> I fully agree that D would be a great fit for web development.
>
> Thanks for the reply.
>
>
Yes, the goal is to avoid libpq. A typical Vibe.d TCP Connection is
based on what you know as Green Threads, it's called Tasks/Fibers in D.
It means you have to avoid any library that uses thread-blocking I/O
because you're using 1 thread to handle all requests.
More information about the Digitalmars-d
mailing list