On Sunday, 22 October 2017 at 02:48:57 UTC, Joakim wrote:
I just read the following two week-old comment on the ldc issue
tracker, when someone tried to run D on Alpine linux:
"For now everything works(?) but I think the process could be
improved.. Would be really cool to have LDC easily building
alpine containers + static D binaries for microservice and
tooling development. I'm pretty tired of reading Go code :)"
https://github.com/ldc-developers/ldc/issues/2341#issuecomment-334626550
It strikes me that microservices are a great way for new
programming languages like D to get tried and gain some uptake,
but that D might not be that easy to deploy to that scenario
yet.
Its the future. Netflix, Google, Facebook, etc. all have open
source tools around microservices. Its currently ruled by
JavaScript > Go > Java. JavaScript being the leader.
They have these in common:
1. Easy to deploy their code in docker containers including
alpine Linux.
2. They have APIs for major cloud services. Both official and
third-party.
3. Good support for networking. HTTP, Websockets, IPC*, etc.
Mostly HTTP.
That's it. The major advantages besides the hype.
Lets see about D based on these requirements.
1. Kind of. There are dmd-ldc-dub docker images on docker hub.
One by sociomantic. None using Alpine Linux as base though. Most
people prefer alpine cus its lightweight (not a requirement).
2. Nope. Official APIs comes when there's mass adoption for that
language and has good ROI. No complete and production ready cloud
services API that I know of. Seems D users in that area roll out
something on their own for private use with features they need.
But most cloud PaaS provide support for custom runtimes which D
has one for Heroku. Major candidate is Google AppEngine.
3. Phobos doesn't have a D HTTP API. Its sad but we have
"requests" at code.dlang.org which works. We have vibe.d for http
servers (aka nodejs of D) and seems popular based on threads
about it and downloads.
So this is a question for those deploying microservices, as I'm
not in that field, what can the D devs do to make it as easy as
possible to get D microservices up and running, make some
Docker and Alpine containers with ldc/dub/vibe.d preinstalled
publicly available? What else, what kinds of libraries do you
normally use?
There several database APIs at cods.dlang.org. I don't know why
some complain about no db APIs.
This is a niche that D and all newer languages should target.
How do we do it?
Good question.