Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-03 Thread ilya-stromberg
On Tuesday, 3 September 2013 at 10:28:56 UTC, Pavel Kirienko 
wrote:
Guys, I decided to stay away from phobos integration at least 
until it has some HTTP server out of the box.

Anyway this decision does not make xmlrpc-d less usable. :)


You can try to integrate in Phobos only xmlrpc-d client.
It can be useful for integration whith 3rd-party XML RPC servises.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-03 Thread Pavel Kirienko
Guys, I decided to stay away from phobos integration at least 
until it has some HTTP server out of the box.

Anyway this decision does not make xmlrpc-d less usable. :)


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread Dmitry Olshansky

02-Sep-2013 20:41, Flamaros пишет:

On Monday, 2 September 2013 at 15:54:12 UTC, Pavel Kirienko wrote:



I don't think a real server is needed here. A simple listen on a port is
sufficient.



Well I don't expect that to pass review :)
--
Dmitry Olshansky


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread Flamaros

On Monday, 2 September 2013 at 15:54:12 UTC, Pavel Kirienko wrote:
On Monday, 2 September 2013 at 15:37:16 UTC, ilya-stromberg 
wrote:
On Monday, 2 September 2013 at 15:12:24 UTC, Pavel Kirienko 
wrote:
So, the question is: shall I make a pull request for xmlrpc-d 
with no HTTP server included? Is there anyone who have a 
solid HTTP server which is good enough for the standard 
library? We could cooperate.


As I know, the Vibe.d is good:
https://github.com/rejectedsoftware/vibe.d

But I don't know if it will be useful for you.


I know vibe.d, but it does not seem to be going into phobos, 
does it?



I should warn - it won't be easy and is likely to require lot 
of work from contributor. Recent trend in Phobos contribution 
is to require good integration with existing modules and 
approaches - you can have a look at `std.serialization` 
threads to see what Jacob is going to go through to get to 
voting.


Yeah it is not so easy I know, and I'm not sure I can make time 
for that right now. However, if someone wants to volunteer I'd 
glad to help.


I don't think a real server is needed here. A simple listen on a 
port is sufficient.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread ilya-stromberg

On Monday, 2 September 2013 at 15:54:12 UTC, Pavel Kirienko wrote:
I know vibe.d, but it does not seem to be going into phobos, 
does it?


I don't know, you should contact Sönke Ludwig to find out it.
As I can see, there are a lot of code that could be useful for 
Phobos.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread Pavel Kirienko

On Monday, 2 September 2013 at 15:37:16 UTC, ilya-stromberg wrote:
On Monday, 2 September 2013 at 15:12:24 UTC, Pavel Kirienko 
wrote:
So, the question is: shall I make a pull request for xmlrpc-d 
with no HTTP server included? Is there anyone who have a solid 
HTTP server which is good enough for the standard library? We 
could cooperate.


As I know, the Vibe.d is good:
https://github.com/rejectedsoftware/vibe.d

But I don't know if it will be useful for you.


I know vibe.d, but it does not seem to be going into phobos, does 
it?



I should warn - it won't be easy and is likely to require lot 
of work from contributor. Recent trend in Phobos contribution 
is to require good integration with existing modules and 
approaches - you can have a look at `std.serialization` threads 
to see what Jacob is going to go through to get to voting.


Yeah it is not so easy I know, and I'm not sure I can make time 
for that right now. However, if someone wants to volunteer I'd 
glad to help.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread ilya-stromberg

On Monday, 2 September 2013 at 15:12:24 UTC, Pavel Kirienko wrote:
So, the question is: shall I make a pull request for xmlrpc-d 
with no HTTP server included? Is there anyone who have a solid 
HTTP server which is good enough for the standard library? We 
could cooperate.


As I know, the Vibe.d is good:
https://github.com/rejectedsoftware/vibe.d

But I don't know if it will be useful for you.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread Dicebot

On Monday, 2 September 2013 at 10:31:15 UTC, Flamaros wrote:

I hope you'll made pull requests for an integration to phobos.


I should warn - it won't be easy and is likely to require lot of 
work from contributor. Recent trend in Phobos contribution is to 
require good integration with existing modules and approaches - 
you can have a look at `std.serialization` threads to see what 
Jacob is going to go through to get to voting. One may argue if 
it is too demanding but I personally like high quality and 
consistency levels defined by standard library.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread Pavel Kirienko

On Monday, 2 September 2013 at 14:07:52 UTC, ilya-stromberg wrote:

On Monday, 2 September 2013 at 10:31:15 UTC, Flamaros wrote:

We'll need RPC for our projects, we are interested.

I hope you'll made pull requests for an integration to phobos.


+1
It's really useful project.


Thanks!

To be honest, the HTTP server shipped with this library is not so 
hot, it is just a stub which purpose is to fill the lacking of 
the default HTTP server in phobos.


https://github.com/pavel-kirienko/xmlrpc-d/blob/master/src/http_server_bob.d

I think there is no place for this particular piece of code in 
phobos.


So, the question is: shall I make a pull request for xmlrpc-d 
with no HTTP server included? Is there anyone who have a solid 
HTTP server which is good enough for the standard library? We 
could cooperate.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread ilya-stromberg

On Monday, 2 September 2013 at 10:31:15 UTC, Flamaros wrote:

We'll need RPC for our projects, we are interested.

I hope you'll made pull requests for an integration to phobos.


+1
It's really useful project.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread Flamaros

On Sunday, 1 September 2013 at 19:50:47 UTC, Pavel Kirienko wrote:

Hi everyone,

I am working on some D-based project that needs to call and 
serve XML-RPC procedures with multiple output parameters. Quick 
lookaround revealed that:
1. There are no XML-RPC servers implemented in D, or wrapped in 
D;
2. There are some simple XML-RPC clients, but no one supports 
methods with multiple output parameters.


So I decided to write ultimate XML-RPC library that could 
follow XML-RPC standard as close as ... well, as I could manage 
it. :)


Grab your copy here: https://github.com/pavel-kirienko/xmlrpc-d

D's compile-time introspection is utterly amazing, it enables 
such features as automatic conversion of a value which type is 
not known at compile-time to something predefined. This makes 
possible to define XML-RPC methods in the simplest way possible 
(as regular functions), all the boring job of turning the 
function parameters into XML-RPC types and vice versa is 
carried out by compiler with the help of the Variant type:


--
real multiply(real a, real b) { return a * b; }
xmlrpcServer.addMethod!multiply();
--

Which also makes possble such weird things like that:

--
// multiply() expects two arguments of type 'real' and returns 
'real',

// but we call it with strings:
string ret = client.call!("multiply", string)("6", "9");
--

Take a look into the 'example' directory on the Github page to 
see more examples.


It is worth to mention that this is my first project in D - I 
was concurrently studying "The D Programming Language" by 
Andrei Alexandrescu (great book Andrei!), thus the code may 
need some review.



Good luck with your projects,
Pavel.


We'll need RPC for our projects, we are interested.

I hope you'll made pull requests for an integration to phobos.


Good luck.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-02 Thread Pavel Kirienko

On Monday, 2 September 2013 at 05:53:22 UTC, angel wrote:
Did you look at std.serialization (currently in the review 
queue)

? An RPC does need serialization.


Yes I'm aware of std.serialization, but it does not seem to
support XML-RPC data representation.

So I decided to use std.xml, with plans to switch to std.xml2
when available.


Re: XML RPC Client and Server - meet xmlrpc-d

2013-09-01 Thread angel

Did you look at std.serialization (currently in the review queue)
? An RPC does need serialization.


XML RPC Client and Server - meet xmlrpc-d

2013-09-01 Thread Pavel Kirienko

Hi everyone,

I am working on some D-based project that needs to call and serve 
XML-RPC procedures with multiple output parameters. Quick 
lookaround revealed that:

1. There are no XML-RPC servers implemented in D, or wrapped in D;
2. There are some simple XML-RPC clients, but no one supports 
methods with multiple output parameters.


So I decided to write ultimate XML-RPC library that could follow 
XML-RPC standard as close as ... well, as I could manage it. :)


Grab your copy here: https://github.com/pavel-kirienko/xmlrpc-d

D's compile-time introspection is utterly amazing, it enables 
such features as automatic conversion of a value which type is 
not known at compile-time to something predefined. This makes 
possible to define XML-RPC methods in the simplest way possible 
(as regular functions), all the boring job of turning the 
function parameters into XML-RPC types and vice versa is carried 
out by compiler with the help of the Variant type:


--
real multiply(real a, real b) { return a * b; }
xmlrpcServer.addMethod!multiply();
--

Which also makes possble such weird things like that:

--
// multiply() expects two arguments of type 'real' and returns 
'real',

// but we call it with strings:
string ret = client.call!("multiply", string)("6", "9");
--

Take a look into the 'example' directory on the Github page to 
see more examples.


It is worth to mention that this is my first project in D - I was 
concurrently studying "The D Programming Language" by Andrei 
Alexandrescu (great book Andrei!), thus the code may need some 
review.



Good luck with your projects,
Pavel.