Slashdot Mirror


Do We Need Another OO RPC Mechanism?

Paul68 queries: "I am looking for an RPC mechanism for a project. Granted, there are many to choose from, yet there seem none that meet my requirements! When one has toyed with the requirements the solution generaly becomes obvious. So, yeah sure, I can set out and create the next RPC mechanism, but it is a lot of hassle. But does the world need yet another OORPC, or have I simply not looked in the right corners?"

"My requirements are:

  1. object oriented
  2. extensible
  3. platform independent
  4. supports signatures for integrity and sender checking
  5. supports privacy of the message contents (i.e. encryption)
  6. time sensitive: I should be able to detect a dead server and do failover while the user is waiting for the response
  7. bandwidth efficient, as I am looking to deploy it in wireless environments
Now #1-3 are no problem, #4 and #5 can be found, and #7 rules out anything XML-based. #6 seems to be the killer, as this rules out anything over TCP, and at that point the list gets pretty short.

Does anyone have any options that I may have missed?"

92 comments

  1. It's time to stop by Anonymous Coward · · Score: 5, Insightful

    And ask yourself, "What am I really trying to do?"

    1. Re:It's time to stop by mystran · · Score: 5, Insightful
      Well, I've done CORBA for work, play'ed around with all kinds of other RPC systems, programmed with a quite a lot of languages, and after some hobby research and all kinds of strange projects, I've come to the following conclusion personally:

      There is one good RPC system, and it's called HTTP. It works wonderfully when you can generate stuff from a database into some text-representation.

      There are a lot of bad ones, which mostly have the same thing in common: It is NOT a good idea to make a remote resource act like an object. It just doesn't work well. To get an impression that it works well, you need a huge bloated library, so you can pretend that everything works, until your network breaks and you have to deal with all the shit yourself anyway, but now add the complexity of the RPC system to the mix.

      The thing is, when you design to work with a very simple system, either HTTP or something similar built on top of TCP directly, you end up with design, where the network is a natural part of the system. When you build something on top of a generic RPC system, you just add a layer of indirectness, which makes a good design much harder to get. In addition, when you restructure your data into text-representation (or other simple representation), you usually end up doing it in the right place, because it's usually the only place where such representation can be handled in a sane way.

      That's my 1 cent about RPC. The other 1 cent deals with objects. Objects are nice, if you don't have 1) database or 2) proper functions. When you have a (relational) database, you end up with something like objects anyway, when you build a good database access layer. For many things this is what you would want to do anyway, with the added benefit that you never need to care about object references. You just tell the system how to find/alter what you need.

      For the functions, as soon as you have first-class functions, objects no longer make much sense, as it takes about 15 seconds to build an object system on top of these functions. Most of the time you don't want object anyway, as you usually want functions and data instead. Learn LISP. It is more useful today than ever before. If there's something wrong with existing dialects, then help build a better one.

      As for your requirements: You could use TCP directly, but you need encryption, so add ssl or something. Authenticate the connection or something, the encryption should handle rest of the integrity (this is pretty much a cipher question). Build a simple protocol with no tweaks and leave the extensibility there. If you want, you could send XML anyway, if you use zlib or something to compress it. Depending on your data, it might be the easiest thing to parse anyway. Separate the protocol layer, have it timeout and catch TCP failures, and automatically reconnect (same or other server), and you have the time-sensitivity. If you need more, send requests to multiple servers, and handle them with the one that answers first. Aim for stateless protocol, and it becomes easier. TCP and SSL are pretty platform independent, so unless your protocol is really bad that shouldn't be a problem. Now, you basicly want this all for every application in existence.

      Forget the objects, they just make life a lot harder. Use cookies and numerical identifiers if you really need to. A lot of things look like they needed OO-RPC, but to this day I've not seen a single one where it really made sense. Doesn't even speedup development in the long run..

      --
      Software should be free as in speech, but if we also get some free beer, all the better.
    2. Re:It's time to stop by Anonymous Coward · · Score: 0

      Exactly. He's fishing for buzzword compliance. Once you define a problem, you can find a solution. However, the problem today is that folks have lost the hacker mentality, and have to have perfect shiny-ness in all sorts of areas. IMHO, this is a sign of the weakening of the programming art by "coder for hire" folks, easily wooed by buzzwords and trends, without any real knowledge about how to do things. Can the article submitter write a networked application himself in raw-binary? I doubt he could!

    3. Re:It's time to stop by duffbeer703 · · Score: 3, Insightful

      The AC speaks the truth.

      A million years ago, a caveman spent alot of time developing the wheel. Don't replicate his work. You're likely to make lots of mistakes when you reimplement RPC or yet another master framework product, particularly with the encryption and signing part.

      I know of people working on a similar project using Java Jini. Check it out.

      Also, base your decision on the actual architecture of your application, not the buzzword-compliance of the glossy brochure or website.

      --
      Conformity is the jailer of freedom and enemy of growth. -JFK
    4. Re:It's time to stop by marcello_dl · · Score: 2, Interesting

      There is one good RPC system, and it's called HTTP. It works wonderfully when you can generate stuff from a database into some text-representation.

      The people behind REST seem to agree with you, I think.

      --
      ---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
    5. Re:It's time to stop by 1iar_parad0x · · Score: 1

      This reminds me of a story. It came from the book "Out of Their Minds". One of the problems that early programmers faced was the fact that you where forced to use fixed-point arithmatic. Of course, when your "hard-coding" programs on the bit level and doing basic arithmatical calculations, this all becomes quite a pain the ass. John Backus approached Von Nuemann about the idea of using floating point arithmatic. This abstraction would have required a lot of programming (and a clever nmenonic, like a language). John Von Nuemann couldn't imagine that any "real" programmer would need this. Fortunately IBM did. The result was FORTRAN.

      My point is that the programming art was never about assembly or C. The programming art is mathematics. Abstraction is part of good math or engineering. It's the tautologies and syllogisms that count. So, frankly good coders can code in PHP, VB, C++, or LISP. I'm more worried about our (ABET/IEEE/ECE-EECS sans math) new computer science.

      Oh, for what ever it's worth, we all know that Johnny probably wasn't human anyway.

      --
      What do you mean my sig is repetitive? What do you mean my sig is repetitive? What do you mean....
  2. Does 7 really rule out XML? by forsetti · · Score: 4, Insightful

    How much overhead do you expect XML to incur? Or more importantly, what do you expect your data/(data + XML) ratio to be? With large amounts of data, the relative amount of XML is relatively small.

    Of course, if you are sending many packets, each with small amounts of data, perhaps strewn across many XML tag sets, then the XML "noise" ratio may be high. How about gzipped XML-RPC ?

    --
    10b||~10b -- aah, what a question!
    1. Re:Does 7 really rule out XML? by kaisyain · · Score: 5, Interesting

      And even if it does rule out XML per se, what's wrong with binary XML?

    2. Re:Does 7 really rule out XML? by RevAaron · · Score: 3, Funny

      binary XML? Is that like "wireless DSL" I've heard advertised in my area?

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    3. Re:Does 7 really rule out XML? by noselasd · · Score: 4, Informative

      When I experimented with SOAP, it was around 60% metadata, and the bytes sent by the protocol were 600% more than the equivialent done with SunRPC.
      (That was for one particular application, others will vary.)

    4. Re:Does 7 really rule out XML? by RevAaron · · Score: 2, Insightful

      I concurr- I never saw what was wrong with just using gzipped XML-RPC or SOAP. Apache mod and everything, almost no setup involved.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    5. Re:Does 7 really rule out XML? by saikatguha266 · · Score: 1

      Compressed XML is comparable in size to binary formats. I remember there being some comparision of XML representations of objects in compressed format and the same objects in binary representations.

      XML is highly compressible. Not only are <=/> characters and tagnames are repeated all over the place, being mainly in printable ASCII means most characters use 7bits.

      Throwing a compress/decompress around the RPC process often adds very little extra processing and gives you the advantage of a very extensible, self describing, structured data.

    6. Re:Does 7 really rule out XML? by gstamp · · Score: 1

      If you can get gzip compression turned on it makes a huge difference. The main downer is that if you're sending over HTTP the overhead of the constant connects and disconnects is pretty large.

    7. Re:Does 7 really rule out XML? by CaptnMArk · · Score: 1

      Except that the compression/decompression will flush most else from CPU cache on lower-end CPUs

  3. Something XML-RPC (SOAP) doesn't have by SteveX · · Score: 4, Informative

    ...that bugs me is that there's no way to make a call that will return multiple pieces of data over a long period. Like, I want to connect to a server and say "tell me every time the price of IBM stock changes". I can use SOAP for most of a trader type UI but for streaming the data back to the client, you have to use another protocol (unless I'm missing something).

    The dude asking the quesiton here is, I think, a little too worried about overhead - the overhead of XML is fairly tiny, and the overhead of TCP/IP isn't that great either - if both of those really are too much then you're probably on your own as there isn't likely to be a "general purpose" solution that will work for you.

    - Steve

    1. Re:Something XML-RPC (SOAP) doesn't have by ZeroLogic · · Score: 2, Insightful

      What you are looking for is more along the lines of an asynchronous publish subscribe style architecture such as JMS, MQSeries, or Tibco.

      SOAP is designed for easy synchronous communication, and while you can fake synchronous over asynchronous, it can be more challenging to go the other way.

    2. Re:Something XML-RPC (SOAP) doesn't have by ThenAgain · · Score: 4, Informative
      I once implemented a web interface that used XML-RPC to communicate with a search engine back-end. Each request lived in a state machine on the server. When the server received a request it would start processing and if it took more than a few seconds it would return an object with a status report and a request ID. The client would send a browser meta-refresh that would check on the status of the request every few seconds until it was done or returned an error.

      If you're looking for something closer to real-time (a way for the server to initiate contact with the client) check out the BEEP protocol.

      From the BEEP web page:
      BEEP is a turbocharger for Internet applications that offers advanced features such as:

      • a standard application layer that supports dynamic, pluggable application "profiles" (protocols)
      • peer-to-peer, client-server, or server-to-server capabilities
      • multiple channels over a single authenticated session
      • support for arbitrary MIME payloads, including XML
    3. Re:Something XML-RPC (SOAP) doesn't have by RevAaron · · Score: 1

      What you describe is possible using XML-RPC or SOAP. Simply have the data source make calls to the "client" when it has new data. And when that happens, the "client" processes the data, whatever. A setup that did this automatically would probably not be much different than this underneath. Simply have the client register itself as wanting the data, etc etc.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    4. Re:Something XML-RPC (SOAP) doesn't have by WWE-TicK · · Score: 1

      You could have the XML-RPC client make the XML-RPC call to the server, and simply not have the server return a response until it wants to send data back to the client. Of course, this will only work if the XML-RPC client and server implementations do not have a timeout value. Fortunately, most XML-RPC server implementations do not. You can use Apache's HTTP KeepAlive option to help implement this.

    5. Re:Something XML-RPC (SOAP) doesn't have by scrytch · · Score: 1

      > that bugs me is that there's no way to make a call that will return multiple pieces of data over a long period.

      With a SAX-based XML parser, you can stream data back in as leisurely a pace as you want and have your client react immediately to whatever tag delimits your message boundaries.

      As for overhead, I'm in agreement there: the overhead of TCP/IP is definitely minimal compared to the cost of marshalling RPC data to begin with. TCP/IP can be tuned anyway, and it'll almost certainly be faster and more robust than something that tries to reinvent it over UDP.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    6. Re:Something XML-RPC (SOAP) doesn't have by Anm · · Score: 2, Informative

      Grid services, which extend SOAP based web services, does provide for this sort of subscriber model.

      Check out: http://www.globus.org/ogsa/ and the globus toolkit.

      Anm

    7. Re:Something XML-RPC (SOAP) doesn't have by Doomdark · · Score: 4, Interesting
      As for overhead, I'm in agreement there: the overhead of TCP/IP is definitely minimal compared to the cost of marshalling RPC data to begin with. TCP/IP can be tuned anyway, and it'll almost certainly be faster and more robust than something that tries to reinvent it over UDP.

      Perhaps I misread original points, but it seemed like he wasn't so much worried about overhead, but about time-sensitivity aspect. TCP tries really hard to get all the data get through (with re-sends etc), without worrying at all about delays. It's good for bulk transfers, and things that simply have to get through, but for real-time (or in general time sensitive) data it's pretty useless to get anything that is late. And worse, since there's no way to really know what's going on (from TCP POV, "app shouldn't care"), it's difficult for the app to try to failover or other sensible action to resolve the (likely transient) problem.

      Trying to figure out information about why and how data just isn't getting back, via socket (or whatever) API is next to impossible... thus, protocols such as RTP were developed. It's been a while since I followed what was happening there, but there was definite need for something that would give better control over timing information; at the very least for apps to be able to find out if there are timing problems, and do the right thing whatever it is (mark server as likely being down, find alternatives etc).

      As to overhead, I'd agree; esp. due to HTTP being so ubiquitous, all stacks are ridiculously optimized, and handle "non-optimal" usage of TCP (simple request-reply) rather fine, all things considered.

      --
      I like paying taxes. With them I buy civilization -- Oliver Wendell Holmes
    8. Re:Something XML-RPC (SOAP) doesn't have by soft_guy · · Score: 1

      I was going to post a suggestion similar to this one. Basically, you would need to allow the client to make an RPC call to register a callback function. I've done similar things when I call into a DLL giving it a function pointer so the DLL can call me back and notify me that something has happened. You might need to have the client listen on some port.

      --
      Avoid Missing Ball for High Score
    9. Re:Something XML-RPC (SOAP) doesn't have by animaal · · Score: 1

      I've implemented systems like that, using xml-based asynchronous messaging. A good Service Oriented Architecture (SOA) will do the job for you. Got to be careful though, lots of companies use these buzz-words to describe their existing synchronous products that they've been selling for years (not looking at anybody in particular, Oracle and BEA!)

      You're dead right about the size overhead of XML not being a problem. But the problem with XML is the performance of the standard parsers. XML parsers need to understand namespaces, and all sorts of other things that are not really needed 95% of the time when you're the one defining the format of the XML document. So if the number of times that a document is parsed is kept to a minimum, things should be fine.

  4. You don't mention... by ThenAgain · · Score: 5, Informative
    what you've already looked at. Whenever I've been tempted to implement my own RPC mechanism I've found that XML-RPC meets my needs perfectly.

    It's easily capable of representing objects, platform independent, encryptable (via SSL), compressable (via gzip [and probably SSL as well]), and textual.

    The advantages of being textual in your protocols is well laid out in Eric Raymond's book The Art of Unix Programming. He even treats it as a case study.

    1. Re:You don't mention... by Anonymous Coward · · Score: 0

      Bah. Just send lisp sexps over http. Cheap, easy and fast (and not just for lisp - a simple sexp parser is a few k in C compared to the bloated monstrosity xml became)

  5. Extensible? by Anonymous Coward · · Score: 0

    "Extensible"? What an obscure word to use instead of "extendible" which fits better. After all, have you ever extensed something? Then, have you ever extended something?

    1. Re:Extensible? by Gyler+St.+James · · Score: 2, Informative

      Definition from dictionary.com: 1. Capable of being extended or protruded: an extensible tongue; extensible tables. 2. Computer Science. Of or relating to a programming language or a system that can be modified by changing or adding features.

      --

    2. Re:Extensible? by Anonymous Coward · · Score: 0

      Is your point that:

      a) You know how to use a dictionary
      OR
      b) that you didn't know what extensible meant ?

  6. NML by kinema · · Score: 5, Informative

    You might want to take a look at the Neutral Message Language, NML. Developed at the Intelligent Systems Division of the National Instute of Standards and Technology is was intended from the start for use in real-time/time critical situations. I know that it currently has support cor C, C++ and Java.

  7. Does 6 rule out TCP? by jrstewart · · Score: 4, Interesting

    I think you'll find that in practice a UDP-based solution isn't going to make your life any easier than TCP. You may want to use TCP in conjunction with an external timer to fail the connection well before TCP gives up though. If you tend to do multiple RPCs to the same host the overhead of TCP should be minimal, and you get a lot of functionality (retries, backoff, etc.) for free. There's RFCs for transactional TCP which solves some of the overhead problems for small exchanges but I don't think they're widely implemented.

    If you do end up writing your own UDP-based protocol, take some time to study TCP as well as other UDP based protocols and make sure you write something network friendly. There are a lot of naive protocols which fail spectacularly in less-than-perfect conditions.

    1. Re:Does 6 rule out TCP? by functor0 · · Score: 1

      I'd like to chime in support of this. Having gone down the exact road of implementing something in UDP, make very sure that you absolutely need it.

    2. Re:Does 6 rule out TCP? by Anonymous Coward · · Score: 0

      SCTP (intro) would probably be good for this. It has most/all the functionality of TCP (retries, backoff, ...) as well as time-sensitive behavior and failover (it was designed for internet telephony signaling).

      It's not widely deployed (but it does have Linux/BSD implementations), so you couldn't really use it unless you control the network and the attached computers.

    3. Re:Does 6 rule out TCP? by Anonymous Coward · · Score: 0

      The best thing about UDP is that you can use it in a stateless-manner, just firing packets off to a remote destination without caring whether or not they arrive in order (or at all), while TCP requires connection setup/teardown, and may get stuck retransmitting one packet while holding up others. The extra state needed by TCP is all well and good when every byte has to get there, but when you can relax those requirements at all, it might be a good idea to examine the alternatives.

      That said, implementing a robust, UDP-based protocol is non-trivial. One should give careful thought to whether or not your application will really benefit from the lossy nature of UDP, or if you're just trying to avoid the perceived overhead of TCP (TCP is often faster than UDP, due to the numerous optimizations made over the years).

      For something like server failover, it's probably better not to do this sort of thing at the TCP/UDP layer; in which case, TCP isn't really a detriment. Some possible solutions would be fancy routing to do load balancing, and simply designing the application-level protocols to be tolerant of connection failures (as any good network application should be). The easiest way to ensure this is to avoid state (as HTTP does).

    4. Re:Does 6 rule out TCP? by Anonymous Coward · · Score: 0

      One example where UDP is useful is with game data.

      UDP is best when the data being transmitted gets stale quickly over time. In a game, player position info constantly gets sent to a server. If the server misses a packet you don't really want to retransmit it ala TCP, because by the time you finally get it, that player has moved somewhere else.

      *However*, it may or may not be more bandwidth efficient than TCP. But if you don't want your clients perceiving a "snap-back" effect in the game, then you'll be hard pressed to resolve that in a TCP-based networking system.

      Anyhow just food for thought. I don't know if this sort of time-dependent data applies to the app the original question referred to.

  8. #6 is not a killer by Anonymous Coward · · Score: 2, Interesting

    Just because TCP provides a sequenced, reliable byte stream with no need to transfer data past connection setup does not mean you can't use it to implement your application level requirements. Simply implement a null request with the client demanding a response within X seconds or you declare the peer dead (or effectively dead) and try another (yes this is a little simplistic and can result in livelock under heavy load but adaption, making X depend upon the peer's load and possibly dynamically measured response time, can help here).

  9. Recommending Gled as a C++ solution by Kvorg · · Score: 1
    I am biased, but I think Gled is a very network-efficient and fast GPL'd OO RPC soulution for C++.

    It is in early stages of desing and development, but is fully fucntional and comes with a complete toolkit and devloping framework, including a C++ interpreter (ROOTCINT), visualisation, object collection introspection and streaming interfaces from ROOT, autogenerated GUI for system and user C++ classes, object-collection monitor, cluster infrastructure using a hierarchical OO RPC system and visualisation with a GL renderer.

    It is a complex design and still not a stable target, but it is already very usable. A a development environment, it provides for a very fast development cycle with advanced introspection and monitoring abilities. Autogenerated GUI also saves a lot of time.

    --
    -Kvorg
  10. RPC is rarely worth the trouble. by tyrecius · · Score: 3, Informative

    RPC causes untold security/authentication headaches and is often hard to program with besides.

    See ESR

    --
    char a[]="lbiitgt l e \n\n\0";main(){for(char*c=a; *(short*)c;c+=2){putchar(*(short*)c);}}
  11. Try Twisted maybe by LesFerg · · Score: 2, Interesting

    If you arent scared of 'scripting' languages,
    http://www.twistedmatrix.com/products/ twisted

    Haven't used it myself yet, but from the specs it seems to cover everything you could need.

    --
    If I had a DeLorean... I would probably only drive it from time to time.
    1. Re:Try Twisted maybe by Scaba · · Score: 1

      Maybe an even better idea is Pyro?

    2. Re:Try Twisted maybe by Anonymous Coward · · Score: 0

      Pyro is insecure, as Pickles sent over the network open you to a wide variety of nasty attacks.

  12. Clue by Markus+Registrada · · Score: 2, Insightful
    The number of different RPC mechanisms extant should be a clue that
    • none of them are really satisfactory (else people wouldn't feel compelled to keep inventing new ones), and
    • they don't really work out, in practice (else people would be satisfied with one of them).

    The problem with RPC is that, to be useful at all, it has to be used where the function-call abstraction fails. In inter-process communication and (more so) in network communications, there are too many failure modes that just don't fit that abstraction, but that a reliable application needs to handle anyway.

    The whole point of RPC is supposed to be that the code invoking them looks just like regular function calls. To be reliable, though, they need to be decorated with so much error handling junk that any such benefit is usually lost. You're better off with explicit message passing and a documented wire protocol. You need the latter anyway to have a debuggable application.

    1. Re:Clue by RevAaron · · Score: 1

      The kind of RPC and IPC problems you mention is what systems like .NET have been designed to solve.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    2. Re:Clue by Markus+Registrada · · Score: 1
      The kind of RPC and IPC problems you mention is what systems like .NET have been designed to solve.

      You're not paying attention. Lots of "systems like .NET have been designed to solve" the problems. Those systems always fail. The next person comes along and finds the same problems, and says "I'm designing an RPC system...". That's why we have so many.

      Clue.

    3. Re:Clue by Anonymous Coward · · Score: 0

      Sadly, what you say is 100% true. In most instances, you are better off passing well defined messages between clients/servers.

    4. Re:Clue by Anonymous Coward · · Score: 0

      You're ignoring network effects. The reason there are so many tepid imitations of CORBA isn't that it doesn't work, it's that Sun and Microsoft want to convince us to adopt RPC mechanisms that are harder to interoperate with from other vendors' platforms. It doesn't help that we have an army of dilletantes who'd rather bash out something half-assed in Perl (why else would anyone even consider a wire protocol that has to be parsed because it can contain whitespace and comments?) than read a damn spec and learn how the experts solved the problem.

  13. Take a look at CORBA by (H)elix1 · · Score: 2, Informative

    It has been a long time for me, but CORBA might fit the bill.

    1. Re:Take a look at CORBA by RevAaron · · Score: 1

      Ugh, except CORBA is a huge pain in the ass compared to SOAP or XML-RPC. Does a lot more, though. Shame there isn't something inbetween, more power and flexibility but as easy to use as SOAP or XML-RPC. Languages with decent introspective/reflective capabilities should make it relatively easy to implement such a system.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  14. SunRPC ;) by noselasd · · Score: 2, Interesting

    Well I reccomend the good old time SunRPC.
    It doesnt have 1. though that depends on what you mean by
    "object oriented". I sense you want do export your C++ objects ;) There are other ways of doing OO..
    It is somewhat lacking in 4 and 5 , though GSS-RPC will give you both. It is also not that difficult to implement authentication providers for sunrpc.. And for those that hate the portmapper, you don't have to use it. Another + is that it's small and fast. And you can do rpc over unix domain sockets, easing the pain to create custom protocols for interproces communication on the local box.

  15. no, but you missed a requirement by Anonymous Coward · · Score: 0

    #8. Performs sexual favors at a discount price.

    1. Re:no, but you missed a requirement by Anonymous Coward · · Score: 0

      Sounds just like a desciption of Timothy, or Taco, well come to think of it, all the people involved with Slashdot.

  16. Java: try RMI or Jini by shodson · · Score: 1

    Have you looked at Java RMI or Jini?

  17. Do We Really Need Another Program? by LarryRiedel · · Score: 1

    Do We Really Need Another Program? We have so many already... thousands... millions!

    I do not think it is a good idea to try to create one "mechanism" providing options along the dimensions of security, performance, reliability, simplicity, portability, expandability, elegance, extensibility, etc, etc. If "separation of concerns" and "aspect oriented design" is still trendy, then I use that as proof by reference.

    Larry

  18. #6 by sohp · · Score: 2, Insightful

    Effective dead connection detection and failover is a Hard Problem in general. Asking for a general-purpose RPC mechanism that solves this problem is asking quite a lot. Perhaps it would be worth re-examining the requirements for the system that lead to asking for failover, and considering what other solutions to those requirement there might be other than robust failover.

  19. The problem is your requirements by mnmn · · Score: 2, Insightful

    RPCs are inherently insecure and introduces a balancing act of keeping the algorithms secure while keeping an eye on inputs and making sure nothing gets memory-leaked.

    All this overhead also will take resources. So whats is it exactly youre working on that needs RPCs? Most networked applications Ive seen doesnt need RPCs, especially ones that are secure and efficient.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
    1. Re:The problem is your requirements by Anonymous Coward · · Score: 0

      > RPCs are inherently insecure

      Oh ballocks. Secure the transport, drop any connections with unrecognized keys. Problem solved, decades ago I might add.

  20. Try zeroc's ICE by Anonymous Coward · · Score: 1, Informative

    You should have a look at zeroC. I haven't used it but have had very good reports about it. Plus the licensing is purely volume based or free if your product is open source.

  21. http over udp? by josepha48 · · Score: 1
    #7 rules out wsdl / SOAP, but using this kind of concept, it may be a role your own. Use binary or text transfer. HMMM DNS query rings a bell? SMTP / POP3 protocols are cross platform, and all text, and all can be secured using ssl. Yes they work over tcp, but I'm sure one could code the connections over udp instead.

    Something like:

    COMMAND: getStockQuote
    PARAM COUNT: 1 PARAM 1: MSFT END COMMAND

    This is the basic principal of POP3 / SMTP and could be extended to allow for RPC. Each side would have to know how to execute the 'command' and extract parameters and then you'd have to deal with return types. Not difficult to come up with the idea, but more difficult to implement. Could be a fun project,....

    --

    Only 'flamers' flame!
    Does slashdot hate my posts?

  22. Why OO? You can add it on your side by Tablizer · · Score: 1

    Why does it have to be OO? You could put OO wrappers around it on your own, no? It is hard for inter-language communications to be OO anyhow because OO is mostly about behavior wrapping data; but you will generally need "naked" data between two potentially different languages and/or systems for them to communicate. Making language-specific protocols is generally tougher because it reduces the number of users/testers/buyers, etc. than a multi-language multi-paradigm-friendly approach.

  23. ICE? by AtrN · · Score: 0, Redundant

    Have you looked at ICE? The developers are long time CORBA gurus who set out to fix some of CORBA's problems. It looks quite promising but then I haven't used it in anger.

    1. Re:ICE? by Anonymous Coward · · Score: 0

      That's a singularly annoying choice of name on their part. A moments googling shows that a different "ICE" is already widely used - it's a lightweight communication/rpc library bundled with just about every X Window System installation on the planet, it's what KDE's DCOP is built on. Argh.

  24. Message Queuing Server? by psykocrime · · Score: 3, Informative

    You could probably implement what you want using
    some type of message queuing server, like IBM Websphere MQ, or equivelant.

    As a mental exercise, and to make sure I'm not talking out my ass, let's run down your list of requirements:

    equirements are:


    1. object oriented


    Well, in the case of Websphere MQ, I'd say "yes" to this one, at least partially. There is a C++ based client library, IIRC, a (IBM specific) Java client library, and a JMS client. And even if the client libraries weren't OO, you could write OO wrappers for procedural calls more easily than writing your own RPC mechanism from scratch, I think.


    2. extensible


    Check. If you use pub/sub messaging instead of point to point messaging, even more so. And if you use a message type (MapMessage in JMS) that is based on name / value pairs, it's easy to extend your messages without breaking backwards compatibility.


    3. platform independent


    Not completely, but with both Java and C++ clients available, you should be able to support most everything.


    4. supports signatures for integrity and sender checking


    Not sure if it has native support for signatures, but a signature can always be added to a message as a property.

    5. supports privacy of the message contents (i.e. encryption)


    Again, using Websphere MQ as an example, it does support the use of SSL for communications, if that helps meet your requirements.


    6. time sensitive: I should be able to detect a dead server and do failover while the user is waiting for the response


    You're right, that's the tricky one. I think there are ways to achieve this goal using message passing servers, but it might take some work.


    7. bandwidth efficient, as I am looking to deploy it in wireless environments


    I think this requirement is met as well. Most messaging products support a message type that is nothing more than a stream of bytes that you interpret as you will... and even if you use a slightly move involved message type (MapMessage or StreamMessage to use JMS types as examples) you're still not carrying a lot of overhead.


    Now #1-3 are no problem, #4 and #5 can be found, and #7 rules out anything XML-based. #6 seems to be the killer, as this rules out anything over TCP, and at that point the list gets pretty short.


    Depending on just how "time sensitive" #6 really is, I do think you could come up with a solution using a message passing server. If you're able to use Java for the clients, JMS makes doing an RPC style messaging very easy, using the QueueRequestor and TopicRequestor interfaces. And even if you can't use Java, it shouldn't be to hard to cook up your own request / reply mechanism, built on top of the messaging system.

    --
    // TODO: Insert Cool Sig
  25. Or even Jabber by axxackall · · Score: 1

    Twisted is Python-oriented. If you need it language-independent then try Jabber. It has all XML-RPC good things, and it's more reliable on a transport layer. Someone will suggest you IBM MQ - functionally it's same as Jabber, just costs lots more dollars.

    --

    Less is more !
  26. Messaging by kruntiform · · Score: 2, Informative

    I think that messaging is nearly always a better solution than RPC, especially for wireless where the network might not be very reliable. I've been playing with Spread recently. It looks pretty good.

  27. binary RPC by Ooobles · · Score: 2, Informative

    It's true. There has been very little research done in RPC mechanisms. In November I attended three different conferences (two on distributed computing) to see what work was being done. Most research is in either building on top of CORBA or XML and web services. Infact, I was disapointed at the lack of research in the low level guts of RPC mechanisms.

    The reason I attended the conferences is that I have spent a lot of time developing a binary RPC mechanism. The method I use can be used in messages (eg MQSeries) or over TCP or UDP or whatever other connection mechanism you feel like.

    It fulfills:
    1. object oriented
    Its currently implemented in java, and allows basic data types, objects and streams to be sent between client and server.
    2. extensible
    Any object can be sent between client and server, and the programming paradigm is simple.
    3. platform independent
    Currently written in java, with implementation for
    C++ and .Net on the todo list.
    4. supports signatures..
    Not yet. This is an additional layer which could be quickly added into the communication stack. I haven't had a need for it yet, so haven't been interested in implementing anything like it.
    5. privacy
    as above. Simple solution is to use SSL as the connection layer.
    6. time sensitive
    simple timeouts are easy to implement, however this hints at other issues which is a big can of worms. ie Was the task completed on the server?
    7. bandwidth efficency
    pure binary with very small overhead

    The negatives are that its not available yet. We are currently working out licensing issues. Sorry, this isn't open source. More information will be made available over the next month or two.

    A small hint at what Colony can do is at www.livemedia.com.au

  28. What Programming Language? by osewa77 · · Score: 1

    Hi,

    You're looking for an Object Oriented RPC language but you forget to tell us what language you're actually coding for. Objects in C++ are very different from Objects in Java, Python ... you get the picture!

    Also, to get better input it'd by nice to know why exactly you need an RPC! Perhaps you have chosen to have one to solve your problems?

    Regards!

    1. Re:What Programming Language? by Paul68 · · Score: 1
      The RPC mechanism should be independent on the platform, which for me includes the language. So the object description should come with the mechanism and map to the language. Maybe I should have stated this explicitly.


      I need the mechanism to communicate between nodes in a distributed telecommunications-type application. I opted for looking at one RPC mechanism rather than invent a slew of new protocols.

    2. Re:What Programming Language? by osewa77 · · Score: 1
      The RPC mechanism should be independent of the platform
      Why? (if this is a special-purpose kind of project). Are you going to be using different programming languages or OSs for this task? Why would you program the various nodes in different languages or on different platforms?
    3. Re:What Programming Language? by Paul68 · · Score: 1

      This is to be an open system and probably end up to be quite large. I will not create all nodes. As the system grows it will aquire nodes from different sources. Each source will choose their own OS and language.

    4. Re:What Programming Language? by osewa77 · · Score: 1

      Well, I guess binary XML is a serious option as someone already said. Possibly combined with any reliable datagram protocol (TCP may not be slow if combined with some form of multiplexing and reusing of individual connections). Have you considered this?

      It would have been really great if you mentioned the protocols you have already ruled out and the ones you are considering. Best of luck to your project!

  29. CORBA or RMI/IIOP by Hard_Code · · Score: 2, Informative

    CORBA fulfills essentially what you describe (not sure about #4). However, the CORBA spec is fairly large and baroque, so you are going to eat some overhead in complexity (not necessarily performance!) if you choose CORBA.

    RMI is also a nice spec. Contrary to popular belief RMI is not a wire protocol but simply a spec for an RPC interface. The standard implementation uses a specific wire protocol and is tied to Java. However, RMI/IIOP also comes standard and is transparently interoperable with CORBA. I'm sure if you wanted to you could write your own transport implementation.

    XML-RPC and SOAP are not really OO RPC mechanisms (despite SOAP containing the word "object" in it). SOAP is a bloated compromise spec created by committee by a few large players in the industry to satisfy all their requirements, and hence does not really enforce any sort of object or typing system. Already I see people addled by XML-think outright proposing this protocols. If it fits your project go for it, but XML is not the panacea people think it is.

    --

    It's 10 PM. Do you know if you're un-American?
    1. Re:CORBA or RMI/IIOP by joonasl · · Score: 2, Informative
      XML-RPC and SOAP are not really OO RPC mechanisms (despite SOAP containing the word "object" in it).

      Actually it doesn't contain the word "object" anymore, since W3 realized that the original name "Simple Object Access Protocol" was a bit misleading and the newest version of the spec does not expand the acronum anymore. So now SOAP is just SOAP :)

      --
      "There is a terrorist behind every bush"
  30. Take a look at Ice by be-fan · · Score: 1, Redundant

    You can find Ice at this page. From what I've seen, it's everything CORBA should have been, and easy to use to boot!

    --
    A deep unwavering belief is a sure sign you're missing something...
  31. Endian-ness by Nynaeve · · Score: 2, Interesting

    Keep in mind that if you are truly cross platform and your communications are pure binary, then endian-ness will be an issue. I had to deal with this once when passing messages from a MIPS SGI to an x86 PC.

    It can be a real pain when the underlying communication protocol blindly assumes endian-ness is the same on every machine. I prefer text-based protocols because they alleviate that problem.

    1. Re:Endian-ness by Anonymous Coward · · Score: 0

      Most of the protocols I design blindly assume endian-ness is big endian (the conventional network byte order). Then I write abstraction layers to convert endianess for me, and I forget about it.

      Of course, this throws in some overhead when you're pushing bytes between two little endian machines. If performance is uber-critical (as CORBA assumes), you can negotiate endian conversions (as CORBA does).

      Text is nice and all, but there are some applications where it's not appropriate. Text can never beat binary in pure performance (assuming both formats are competently designed). It's not so hard if you just think in terms of bytes going over the network.

      Incidentally, if you think text is easy, you haven't thought about the internationalization issues (UTF-8? UTF-16? UTF-32? ASCII? Latin 1? Windows code pages? ;-) ), or the existence of EBCDIC machines (ack, scream). The contortions you have to go through to get simple "text" on an EBCDIC machine (the Apache EBCDIC port is a good example of this done right) make it about as difficult as doing anything with pure binary, probably moreso.

  32. Check out RO... by eric2hill · · Score: 1

    Disclaimer: I'm a Team RO member.

    Check out RemObjects. It's really a brilliant piece of software and is the first RPC development system I've used that's been a real joy to work with.

    --
    LOAD "SIG",8,1
    LOADING...
    READY.
    RUN
  33. That, or they're all overkill by mactari · · Score: 1

    If you want to have two completely anonymous, very large systems talk to each other, SOAP isn't a bad way to go. But how many of us are working for giant firms that require building hooks into our system for a completely anonymous client?

    Do note that you can also substitute "anonymous client" with "corporation with a heck of a lot of red tape".

    As another post in this thread has already well put, SOAP is the compromise product of a number of these giant corporations. It doesn't do nearly so well when you've got two reasonably-sized *partners* (much less something in-house) working on a very specific product.

    Because so many practical implementations don't need all the overhead of SOAP, you see tons of much easier implementations, like XML-RPC, that don't get the same press. This lack of press (so lack of manager buy-in) combined with the one-shot nature taken by so many coding projects, with a bit of the "Not Invented Here complex" thrown in, and I think we begin to see why so many people are scratching the same itch.

    --

    It's all 0s and 1s. Or it's not.
  34. JMS - Second this by puffybsd · · Score: 1

    and go as far as to say JMS would probably achieve exactly what you want to do, and using Java is a good idea. JMSExpiration, JMSPriority and JMSTimestamp are some of the header fields that might help with the time-sensitivity. In addition, JMS can provide some delivery guarantees, and persistence.
    Check out openjms:
    http://openjms.sourceforge.net/
    or the JBoss impl. for starts. Plus it's more fun that CORBA/DCOM/RMI.

  35. Think before UDPing by acomj · · Score: 1

    UDP is not connection based so you have no idea a connection was made on the other end. Its kind of a send a forget protocol, unless you want to write your own handshaking in the application.
    Also udps message size limit of 64k might be limiting..

  36. QNX messaging by Animats · · Score: 1
    I rather like QNX messaging, which is a good, low-level mechanism, and one that's much faster than most of the alternatives.

    QNX messaging reliably passes an arbitrary-length string of bytes from a client to a server, waits for a response, and returns another arbitrary-length string of bytes from the server. This is the basic primitive of the QNX operating system. Everything, including I/O, uses it. It's integrated with scheduling, so if you do a MsgSend to another process that's waiting in a MsgReceive, it takes only one process switch, and that process switch happens immediately.

    Messaging works across the network, but local messaging isn't held down by running it through some elaborate "object broker". So local performance is so good that messaging can be used freely.

    Other mechanisms can be built on top of this. But this is what you need at the bottom: a discrite message system, not a stream system like sockets. There's an inherent inefficiency with running messages through a stream system.

    For most other operating systems, messaging is an afterthought and sluggish. In the Windows world, it's bad enough that objects are often placed in the same address space to avoid overhead. In the Linux world, there are about five different versions of messaging, all incompatible. And then there's SOAP, a great way to use up CPU time.

  37. Don't do in software what the network can do by Anonymous Coward · · Score: 0

    Do failover in the network. A load-balancing machine that can detect failures will work wonders, and simplify your software a great deal. Your app can set a short timeout, and if it doesn't get a response, close (assuming a connection) and retry.

  38. WTFO? by BigLinuxGuy · · Score: 1

    What you're looking at is a client/server set accompanied by a custom protocol. If you're wanting to work with keeping the client synched up with a server, you could look at SyncML.

    Alternatively, you could use HTTP and set the refresh time-out to automatically poll the server for refreshes. Send your data in HTML/WML/xHTML/cHTML/whatever and let the client deal with interpreting it. Mod your client to provide a default error page if the refresh times out.

    Done.

  39. CORBA by BeerMilkshake · · Score: 2, Informative

    I am a big fan of CORBA, though I admit it has some issues.

    > 1. object oriented

    CORBA is definitely object-oriented. Much better than XML and SOAP (SOAP is -NOT- OO at all). I love the fact that once you have a reference to an object, it does not matter where that object is.

    > 2. extensible

    Yes. There are many useful (and optional) services available for CORBA. You don't pay for what you don't use with CORBA, so if you don't require a Naming Service or a Transaction Service, you don't have to include it.

    > 3. platform independent

    This is where CORBA wins. It is platform, language and network agnostic. I don't pay attention to new technologies unless they have a way to interface with CORBA.

    > 4. supports signatures for integrity and
    > sender checking

    Some ORBs can do CORBA over SSL for security, which can include certificate-checking if you wish.

    > 5. supports privacy of the message contents
    > (i.e. encryption)

    See previous comment.

    > 6. time sensitive: I should be able to detect
    > a dead server and do failover while the
    > user is waiting for the response

    Yes, CORBA calls will fail with a COMMUNICATIONS_EXCEPTION, which you can catch and take action. Some ORBs let you configure the timeout.

    > 7. bandwidth efficient, as I am looking to
    > deploy it in wireless environments

    CORBA is binary and fairly BW-efficient. Again, you don't pay for what you don't need.

    On the downside of CORBA, there are issues with:

    - complexity. It is definitely not for the beginner and has a large initial learning curve. If you write client-side stuff, it is heaven. If you write server-side stuff, prepare yourself. If you want to do CORBA-compliant fault tolerance or security, don't call me :)

    - penetration. Not all ORB providers implement all the nifty services. Finding an ORB for your environment that provides what you need can be tricky (e.g. POA, Portable Interceptors)

    - mindshare. So many people pushing alternate technologies with a few useful features and a promise of equalling CORBA, if only they get enough interest.

    - Openness. The OMG process is lengthy and can only be crafted by consortium members. Maybe a W3C-style process would make it evolve more rapidly and get implemented quicker ?!?

    1. Re:CORBA by Michi · · Score: 1

      > - complexity. It is definitely not for the beginner and has a large initial learning curve. If you write client-side stuff, it is heaven. If you write server-side stuff, prepare yourself. If you want to do CORBA-compliant fault tolerance or security, don't call me :)

      I wouldn't say "heaven" myself :) There are *many* issues around CORBA's complexity:

      - the insanely complex C++ mapping
      - bloated and complex run-time APIs
      - inefficient protocol
      - far too complex type system
      - missing features
      - inefficient and overly complex object model

      I've been working on Ice (www.zeroc.com) in an effort to come up with something that is as powerful as CORBA, adds some features that are sorely missing from CORBA (such as UDP support), yet is *much* simpler. To give one example, the definition of the POA API requires 211 lines of IDL. Ice has an object adapter that is just as fully featured and flexible, yet its API is defined in only 29 lines of IDL.

      I think the original scenario calls for middleware, no doubt. What gets in the way is that what most people call "middleware" is far too complex and heavy-weight to be palatable, so developers get put off using middleware and endlessly re-invent the wheel by going down to raw sockets. It shouldn't have to be that way...

      Cheers,

      Michi.

  40. Thank you for your vaporware promise by Anonymous Coward · · Score: 0

    I can also pull a list of features for unfinished software out of my ass. I will remember to avoid your product when I am searching for real middleware.

  41. One word - CORBA by Anonymous Coward · · Score: 0

    Its robust, full featured and does all the below.

    >platform independence:
    It is language independent as well.

    >supports signatures for integrity and sender checking
    >supports privacy of the message contents (i.e. encryption)

    IIOP the on the wire protocal can run over SSL/TLS.

    >time sensitive: I should be able to detect a dead server and do failover while the user is waiting for the response

    Has a robust support for these cases. The latest specification defines numerous timeouts and cases. Generally, vendor products provide more. For eg. Orbix has support for tens if not hundreds of such cases.

    >bandwidth efficient, as I am looking to deploy it in wireless environments

    - You can compress payload
    - You can fragment the payload. i.e Marshaling and unmarshaling can happen almost simultaneouly. Great for large payloads. And ofcourse takes care of collisions.

    Besides CDR - the data represenation is very iffecient.

    You can also use RMI/IIOP if going for an all-java implementation. But it is NOT feature rich in the case of failover, quality of service, granular timeouts etc.

  42. Your requirements... by Anonymous Coward · · Score: 0

    Obviously it depends on what you want to do, but you're requirements point to Distributed Objects.

    1) object oriented

    Objective-C certainly is

    2) extensible

    Objective-C certainly is

    3) platform independent

    Well, yes, if you use GNUstep on other UNICES or Windows...

    4) supports signatures for integrity and sender checking

    Would be possible, depending on your implementation

    5) supports privacy of the message contents (i.e. encryption)

    Again, would be possible, depending on your implementation

    6) time sensitive: I should be able to detect a dead server and do failover while the user is waiting for the response

    DO can do that for you

    7) bandwidth efficient, as I am looking to deploy it in wireless environments

    Not sure about this one

  43. gzip by Anonymous Coward · · Score: 0

    could probably gzip the xml to bring it back in the list of options

  44. Ice by Anonymous Coward · · Score: 0

    Go to www.zeroc.com

    Fast binary protocol, OpenSource, supports C++ and Java, Plugin for OpenSSL.

    The company employs a number of CORBA experts, and the employees have implemented a popular CORBA ORB before.

  45. "A New Approach to Object-Oriented Middleware" by marclaukien · · Score: 1

    Perhaps you find this article interesting: "A New Approach to Object-Oriented Middleware". This article appeared in the IEEE Internet Computing magazine, and compares Ice with CORBA.