D and microservices

Laeeth Isharc via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 7 23:51:33 PDT 2015


On Wednesday, 7 October 2015 at 10:50:47 UTC, Russel Winder wrote:
> On Tue, 2015-10-06 at 18:56 +0000, Dicebot via Digitalmars-d 
> wrote:
>> On Tuesday, 6 October 2015 at 16:12:12 UTC, Russel Winder 
>> wrote:
>> > Has anyone got a small example of microservices using D, 
>> > with Vibe.d or otherwise, that I can make use of? I need 
>> > some examples of small microservices for a session at μCon 
>> > 2015.
>> 
>> What do you mean by microservice examples? It is 
>> infrastructure methodology, not specific code thing, any 
>> simple network service can be viewed as microservice.
>
> At the Web services application level it is having a small 
> framework for structuring the use of GET, POST, PUT, DELETE,… 
> packets. Basically RESTful services.
>
> At a non HTTP level I guess you can say all networking is 
> microservices except that you want a protocol over TCP/IP or 
> UDP/IP and shouldn't there be frameworks to assist building 
> these things?

Zeromq plus msgpack or the like (maybe cerealed!) gives you quite 
a lot.  I use nanomsg, which is still beta but nicer in some 
ways.  In any case it gives you survey, request/reply, bus, 
publish / subscribe patterns.  And it's very light and has decent 
throughput.  What kind of framework were you thinking of ?  
(nanomsg doesn't do UDP, but I think zeromq does.  You can write 
your own protocol or pattern if the existing ones don't work for 
you, and sounds like that's work, but not much more than it needs 
to be).




More information about the Digitalmars-d mailing list