mysql user definde functions (UDF) in D
crimaniak via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jan 13 01:31:38 PST 2017
On Thursday, 12 January 2017 at 09:49:08 UTC, Martin Tschierschke
wrote:
> I am wondering has anybody tried to do it with D?
>
> http://dev.mysql.com/doc/refman/5.5/en/adding-udf.html
>
> By looking on the processing chain for rendering a web page,
> based on mysql data,
> I thought it would be very efficient, to let mysql deliver the
> datasets already rendered as html using a template engine like
> vibe.d diet templates.
>
> At the end of this integration process even the web server
> could be integrated in the db engine. I know this has been done
> as prove of concept for an other (db) system to deliver json
> data via http.
>
> Any suggestion?
1. I don't see, why moving HTML rendering task from vibe.d thread
to MySQL thread will give CPU benefit.
2. HTML usually bigger then data used to construct it (sometimes
much more bigger) so it will be more traffic in pipe/socket
between MySQL and vibe.d
3. MySQL database more hard to scale than WEB frontend so moving
more work to MySQL makes application less scalable.
4. This will add complexity to maintain changes
So my resume: this is bad case for UDF. Really good case is then
we have a lot of initial data to consider but relatively small
result. For example, ForceAtlas2 UDF, I think, is more
interesting idea.
More information about the Digitalmars-d
mailing list