[gsoc 2008] A C++ Remote Method Invocation Framework using Boost.Asio

Hi All, For the google summer of code 2008, I wish to build a Cross Platform Remote Method Invocation Framework for C++ using Boost.Asio, similar to Java's remote method invocation (RMI). I will provide some macro definitions to create the proxy code. Please provide me your comments to adjust this idea to best suit the interests of boost community. I higly appreciate your suggestions. A sample code that will use this framework wold look like, account.h -------------- DECLARE_BEGIN_PROXY(account) DECLARE_METHOD_1(deposit, void, double); DECLARE_METHOD_0(get_balance, double); DECLARE_END; class account { .......... ......... } Server Code ----------------- account acc = new account("Foo", 250); Server s = new server(server::TCP, 19000); s.attach("Foo", acc); s.run(); Client Code ---------------- account_proxy acct = account_proxy::get_proxy("172.25.44.195", server::TCP, 19000, "Foo"); acct.deposit(100); double balance = acct.get_balance(); Thank You, Salinda

salinda h wrote:
Hi All,
For the google summer of code 2008, I wish to build a Cross Platform Remote Method Invocation Framework for C++ using Boost.Asio, similar to Java's remote method invocation (RMI). I will provide some macro definitions to create the proxy code.
Interesting. Have you checked that there isn't something available already on asio...not sure, but I think someone might have already done something like this. That said, AFAIK it's not in Boost so this would be a nice extension.
Please provide me your comments to adjust this idea to best suit the interests of boost community. I higly appreciate your suggestions.
A sample code that will use this framework wold look like,
account.h -------------- DECLARE_BEGIN_PROXY(account) DECLARE_METHOD_1(deposit, void, double); DECLARE_METHOD_0(get_balance, double); DECLARE_END;
Have a look at Boost.Interface http://www.cdiggins.com/bil.html This library was never fully proposed for Boost, but it has alot of the same ideas/needs as you do w.r.t. binding with C++ interfaces. Also, a totally different way to go would be to support an IDL like language and write a tool to generate the needed C++.
class account { .......... ......... }
Server Code ----------------- account acc = new account("Foo", 250); Server s = new server(server::TCP, 19000); s.attach("Foo", acc); s.run();
Client Code ---------------- account_proxy acct = account_proxy::get_proxy("172.25.44.195", server::TCP, 19000, "Foo"); acct.deposit(100); double balance = acct.get_balance();
What do you have in mind for the transport protocol? Thanks! Jeff

Hi, you could also take a look to this work by Jarl Lindrud (http://www.codeproject.com/KB/threads/Rcf_Ipc_For_Cpp.aspx), which is already based on boost (uses boost asio and boost serialization, but also provides custom alternatives for both), but it's not in the form of a boost library. In the past there has been some discussion about possible integration between this library and boost.interface. As a user, I'd highly appreciate to have one such library in boost (I'm currently using the library by Lindrud in several projects). Paolo "salinda h" <salinda215@gmail.com> ha scritto nel messaggio news:350da3070803210611o594a7ad9j57fe42e5edfa1152@mail.gmail.com...
Hi All,
For the google summer of code 2008, I wish to build a Cross Platform Remote Method Invocation Framework for C++ using Boost.Asio, similar to Java's remote method invocation (RMI). I will provide some macro definitions to create the proxy code.
Please provide me your comments to adjust this idea to best suit the interests of boost community. I higly appreciate your suggestions.
A sample code that will use this framework wold look like,
account.h -------------- DECLARE_BEGIN_PROXY(account) DECLARE_METHOD_1(deposit, void, double); DECLARE_METHOD_0(get_balance, double); DECLARE_END;
class account { .......... ......... }
Server Code ----------------- account acc = new account("Foo", 250); Server s = new server(server::TCP, 19000); s.attach("Foo", acc); s.run();
Client Code ---------------- account_proxy acct = account_proxy::get_proxy("172.25.44.195", server::TCP, 19000, "Foo"); acct.deposit(100); double balance = acct.get_balance();
Thank You, Salinda _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Hi, I've built my own Rpc framework to communicate between a PC and an embedded system. I ended up rolling my own since there were a few features I needed that I couldn't find anywhere else. In particular . Cross Language support - I wanted to be able to talk between a C# application and a C++ application. (arguably this is beyond the scope of boost) . Support for providing my own transport layer - we communicate over a custom USB connection - pretty much all the implementations I found assumed http Andrew -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Paolo Coletta Sent: Friday, March 21, 2008 11:01 AM To: boost@lists.boost.org Subject: Re: [boost] [gsoc 2008] A C++ Remote Method Invocation FrameworkusingBoost.Asio Hi, you could also take a look to this work by Jarl Lindrud (http://www.codeproject.com/KB/threads/Rcf_Ipc_For_Cpp.aspx), which is already based on boost (uses boost asio and boost serialization, but also provides custom alternatives for both), but it's not in the form of a boost library. In the past there has been some discussion about possible integration between this library and boost.interface. As a user, I'd highly appreciate to have one such library in boost (I'm currently using the library by Lindrud in several projects). Paolo "salinda h" <salinda215@gmail.com> ha scritto nel messaggio news:350da3070803210611o594a7ad9j57fe42e5edfa1152@mail.gmail.com...
Hi All,
For the google summer of code 2008, I wish to build a Cross Platform Remote Method Invocation Framework for C++ using Boost.Asio, similar to Java's remote method invocation (RMI). I will provide some macro definitions to create the proxy code.
Please provide me your comments to adjust this idea to best suit the interests of boost community. I higly appreciate your suggestions.
A sample code that will use this framework wold look like,
account.h -------------- DECLARE_BEGIN_PROXY(account) DECLARE_METHOD_1(deposit, void, double); DECLARE_METHOD_0(get_balance, double); DECLARE_END;
class account { .......... ......... }
Server Code ----------------- account acc = new account("Foo", 250); Server s = new server(server::TCP, 19000); s.attach("Foo", acc); s.run();
Client Code ---------------- account_proxy acct = account_proxy::get_proxy("172.25.44.195", server::TCP, 19000, "Foo"); acct.deposit(100); double balance = acct.get_balance();
Thank You, Salinda _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost -- BEGIN-ANTISPAM-VOTING-LINKS ------------------------------------------------------ NOTE: This message was trained as non-spam. If this is wrong, please correct the training as soon as possible. Teach CanIt if this mail (ID 11287690) is spam: Spam: http://mail-gw.cognex.com/canit/b.php?c=s&i=11287690&m=6f0a194bece5 Not spam: http://mail-gw.cognex.com/canit/b.php?c=n&i=11287690&m=6f0a194bece5 Forget vote: http://mail-gw.cognex.com/canit/b.php?c=f&i=11287690&m=6f0a194bece5 ------------------------------------------------------ END-ANTISPAM-VOTING-LINKS

For the google summer of code 2008, I wish to build a Cross Platform Remote Method Invocation Framework for C++ using Boost.Asio, similar to Java's remote method invocation (RMI). I will provide some macro definitions to create the proxy code.
What does cross-platform mean here if you can only make boostified C++ talk to boostified C++? Why invent the wheel all over again? Why not stick to some already existing solutions like Corba or such? Admittedly, the C++ language binding of Corba is just horrible nowadays and needs to be revisited. So in my eyes, it would be much more rewarding to work out a modern, boostified C++ language binding to an already existing RPC framework like Corba (or the like).
account.h -------------- DECLARE_BEGIN_PROXY(account) DECLARE_METHOD_1(deposit, void, double); DECLARE_METHOD_0(get_balance, double); DECLARE_END;
That would effectively go to an idl file. The advantage is that the same idl file would also be usable for C, Java, C# or whatever.
Server Code ----------------- account acc = new account("Foo", 250); Server s = new server(server::TCP, 19000); s.attach("Foo", acc); s.run();
Client Code ---------------- account_proxy acct = account_proxy::get_proxy("172.25.44.195", server::TCP, 19000, "Foo"); acct.deposit(100); double balance = acct.get_balance();
Something similar is needed in any of those frameworks and may be found as introductory example in many books. But how will client and server get to know each other? How will they be started? What about dynamic port numbers? What about authentication? Authorization? Lifetime management for proxy and/or server objects? If you just want some fun and do your own implementation, just go ahead and have fun. But if you want a broadly useful RPC mechanism for modern C++, get out some literature about existing frameworks, and think about why e.g. Corba is such a complex monster. You will probably observe that most pieces do indeed have their use cases. I assume that people behind Corba did probably invest much more brain power than most of us (at least me personally) would be willing to do. Have fun, Martin. -- Dr. Martin Schulz (schulz@synopsys.com) Senior R&D Engineer Synopsys GmbH Karl-Hammerschmidt-Str. 34 D-85609 Dornach, Germany Munich office: +49 (89) 993-20203 Home office: +49 (721) 6099511 http://www.synopsys.com

On Tue, Apr 1, 2008 at 4:10 AM, Martin Schulz <Martin.Schulz@synopsys.com> wrote:
Why invent the wheel all over again? Why not stick to some already existing solutions like Corba or such?
Because frankly, CORBA sucks! And not just the C++ binding (which is atrocious). The entire architecture is overly complex, and reeks of "design by committee". Just my opinion though, having worked w/ CORBA for *many* years. Jon

Martin Schulz wrote:
For the google summer of code 2008, I wish to build a Cross Platform Remote Method Invocation Framework for C++ using Boost.Asio, similar to Java's remote method invocation (RMI). I will provide some macro definitions to create the proxy code.
What does cross-platform mean here if you can only make boostified C++ talk to boostified C++?
Why invent the wheel all over again? Why not stick to some already existing solutions like Corba or such?
Admittedly, the C++ language binding of Corba is just horrible nowadays and needs to be revisited. So in my eyes, it would be much more rewarding to work out a modern, boostified C++ language binding to an already existing RPC framework like Corba (or the like).
A reasonable C++ binding to CORBA would be awesome. Regards, m
participants (7)
-
Eames, Andrew
-
Jeff Garland
-
Jonathan Franklin
-
Martin Schulz
-
Martin Wille
-
Paolo Coletta
-
salinda h