I think the downside of having a single generic message type is that we lose “type safety” and some efficiency. The message definition would essentially become:
String functionName; byte[][] args; It’s a little more challenging for an author of a Geode Driver to fill in the args correctly compared to calling specific methods on a generated stub. Also, if the argument data types are fixed in the message definition we can apply efficient encoding techniques automatically (e.g. varint, zigzag, optional). I also wonder about the code path efficiency for functions vs get / put. That would be an interesting test. Anthony > On May 1, 2017, at 5:27 PM, Dan Smith <dsm...@pivotal.io> wrote: > > I think any new client driver or server we develop might want to > incorporate function execution at lower level than region operations like > get and put, etc. We could then easily build operations like GET, PUT, > PUTALL, etc. on top of that by making them functions. The original client > protocol isn't designed like that because it pre-dates function execution. > > The current function execution API is a little clunky and needs some work. > But what it does do is provide the fundamental logic to target operations > at members that host certain keys and retry in the case of failure. > > The advantage of this approach is that if someone just builds a driver that > only supports function execution and whatever serialization framework is > required to serialize function arguments, they already have an API that > application developers could use to do pretty much anything they wanted to > do on the server. Having a Region object with methods like get and put on > it could just be a little syntatic sugar on top of that. > > -Dan > > On Fri, Apr 28, 2017 at 2:49 PM, Udo Kohlmeyer <ukohlme...@pivotal.io> > wrote: > >> Hi there Geode community, >> >> The new Client-Server protocol proposal is available for review. >> >> It can be viewed and commented on https://cwiki.apache.org/confl >> uence/display/GEODE/New+Client+Server+Protocol >> >> --Udo >> >>