Re: RFC: Add C Bindings to Geode Native Client

2020-04-10 Thread Blake Bender
Hello everyone, I neglected to put an end date on this RFC, but it's been open for 2+ weeks now, and I believe we're close to (at?) consensus, so I would like to close it out and move on ASAP. If you still have anything urgent to add, please reply here and let's hash it out. All other things bei

Re: RFC: Add C Bindings to Geode Native Client

2020-04-06 Thread Blake Bender
Jake, to follow up on your previous comment re: consensus, after face-to-face conversation I believe the following is our current status. Agreed: * Strong types with opaque struct pointers * No complete structs in the API/ABI * split shared libraries - one for C, one for C++, one mixed-mode assemb

Re: RFC: Add C Bindings to Geode Native Client

2020-04-01 Thread Jacob Barrett
Agreed. It was sort of an inside joke. There used to be a ccache executable but that was deleted a long time ago. I am in no way advocating for ccache as the directory or library name. > On Apr 1, 2020, at 2:48 PM, Robert Houghton wrote: > > Quick note: ccache is a C/C++ compiler cache. Examp

Re: RFC: Add C Bindings to Geode Native Client

2020-04-01 Thread Robert Houghton
Quick note: ccache is a C/C++ compiler cache. Examples using 'ccache' as the name are confusing. On Tue, Mar 31, 2020 at 3:56 PM Jacob Barrett wrote: > > > > On Mar 31, 2020, at 3:06 PM, Blake Bender wrote: > > > > We in this instance means the native client team. As far as specific > > commen

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Jacob Barrett
> On Mar 31, 2020, at 3:06 PM, Blake Bender wrote: > > We in this instance means the native client team. As far as specific > comments, I'm going to suggest we not go down that road, because this feels > a little more adversarial to me than it needs to be already. Sorry it feels adversarial.

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Blake Bender
We in this instance means the native client team. As far as specific comments, I'm going to suggest we not go down that road, because this feels a little more adversarial to me than it needs to be already. Suffice to say that from my own perspective, in both what you wrote and what I got from our

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Jacob Barrett
> On Mar 31, 2020, at 1:48 PM, Matthew Reddington > wrote: > > A separate repo is our interpretation of the comments generated by this RFC. Can you please quote specific statements that you interpreted to suggest separate repositories. I would like to understand where this interpretation c

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Jacob Barrett
> On Mar 31, 2020, at 12:25 PM, Blake Bender wrote: > > Just want to make sure I understand what you're after here. We should have > a "ccache" directory or similar in the geode-native repo, where we build C > bindings for the client, then we should compile them into a shared library > contai

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Matthew Reddington
A separate repo is our interpretation of the comments generated by this RFC. It’s easier to combine repositories later than it is to take them apart. The take away of this library is the ABI; that it will presently link against the C++ library is an implementation detail. We consider these separ

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Dan Smith
Once we do have agreement on what new repositories we want, I think any pmc member should be able to create them on gitbox.apache.org. Deleting them if we decide we don't want them is harder :) -Dan On Tue, Mar 31, 2020, 12:26 PM Blake Bender wrote: > Just want to make sure I understand what yo

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Blake Bender
Just want to make sure I understand what you're after here. We should have a "ccache" directory or similar in the geode-native repo, where we build C bindings for the client, then we should compile them into a shared library containing all of the code, and export/make visible only the C interface?

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Jacob Barrett
Given that the C-binding will be tightly coupled with the C++ layer and written in C++ I don’t think it make sense to have its own repository. In order for the C-binding need to access internal, non-exported methods, for things like serialization it will need to be statically linked to the C++ l

Re: RFC: Add C Bindings to Geode Native Client

2020-03-31 Thread Matthew Reddington
I would like to request the addition of two new repositories under Apache in order to implement this RFC and to take advantage of it in practice. That would be Apache/geode-c-client and Apache/geode-dot-net-core-client. > On Mar 30, 2020, at 3:33 PM, Jacob Barrett wrote: > > https://github.com

Re: RFC: Add C Bindings to Geode Native Client

2020-03-30 Thread Jacob Barrett
https://github.com/pivotal-jbarrett/geode-native/tree/ee34cfbb5bddb55f5f890bb013c75d7780a787ae/ccache Quick stab at a POC for thread exception handling. -Jake

Re: RFC: Add C Bindings to Geode Native Client

2020-03-30 Thread Jacob Barrett
> On Mar 30, 2020, at 10:32 AM, Blake Bender wrote: > > Just want to +1 on the use of a dynamic library - this really has to be a > shared lib, interop with most other languages demands it. On the other > hand, I'm not a huge fan of making this a separate library from the native > client itse

Re: RFC: Add C Bindings to Geode Native Client

2020-03-30 Thread Jacob Barrett
> On Mar 30, 2020, at 2:38 PM, Matthew Reddington > wrote: > Does it make sense to have the CacheFactory concept at all (especially > since it is more of a builder)? Could we have some C struct that can be > used to create the cache, where the struct has fields for all the > configuratio

Re: RFC: Add C Bindings to Geode Native Client

2020-03-30 Thread Matthew Reddington
>>>Does it make sense to have the CacheFactory concept at all (especially since it is more of a builder)? Could we have some C struct that can be used to create the cache, where the struct has fields for all the configuration? In general can we rethink the API so that it makes sense for C or other

Re: RFC: Add C Bindings to Geode Native Client

2020-03-30 Thread Blake Bender
Just want to +1 on the use of a dynamic library - this really has to be a shared lib, interop with most other languages demands it. On the other hand, I'm not a huge fan of making this a separate library from the native client itself, simply because proliferation of binary files makes life difficu

Re: RFC: Add C Bindings to Geode Native Client

2020-03-30 Thread Jacob Barrett
> On Mar 27, 2020, at 4:04 PM, Matthew Reddington > wrote: > * C does not have namespaces or overloading, so we will need a naming > convention to differentiate our types and methods from any other library or > the application code. That means all types and functions should be prepended > w

Re: RFC: Add C Bindings to Geode Native Client

2020-03-27 Thread Matthew Reddington
* As per my offline comment and as Jake had pointed out, you can cast pointers to incomplete types, this will leverage the C type system better than mere typedefs, and enforce a modicum of an interface’s contract. * C does not have namespaces or overloading, so we will need a naming convention t

Re: RFC: Add C Bindings to Geode Native Client

2020-03-27 Thread Jacob Barrett
Another couple of thing I thought of last night. The RFC should probably include mentions of tools like SWIG or Clang libtooling for auto generating C-bindings for C++ headers. One important area that isn’t covered is how this would address serialization of types/objects in the bound language.

Re: RFC: Add C Bindings to Geode Native Client

2020-03-26 Thread Jacob Barrett
Forgot to include the source example: https://github.com/pivotal-jbarrett/geode-native/tree/e47698bad3cf725dcbddaad458813e26e75c8c71/ccache > On Mar 26, 2020, at 2:56 PM, Jacob Barrett wrot

Re: RFC: Add C Bindings to Geode Native Client

2020-03-26 Thread Jacob Barrett
On the strongly typed, I found a solution I like even better. struct CacheFactory; typedef struct CacheFactory CacheFactory; struct Cache; typedef struct Cache Cache; CacheFactory* createCacheFactory() { return reinterpret_cast( new apache::geode::client::CacheFactory()); } void destroy

Re: RFC: Add C Bindings to Geode Native Client

2020-03-26 Thread Jacob Barrett
I am onboard with the idea but I would like more details in the RFC. I would prefer that the C bindings be in its own library. The only symbols that should be visible from this library should be the C exported symbols, the internal C++ symbols should be hidden. I feel like this library makes th

Re: RFC: Add C Bindings to Geode Native Client

2020-03-25 Thread Michael Oleske
+1 Would certainly be nice since the protobuf work is still mostly experimental (and then I can continue my goal of Geode-ing all the languages) -michael On Wed, Mar 25, 2020 at 9:03 AM Dan Smith wrote: > +1 > > Great idea! Hey, it's also easy to call into C libraries from Java - maybe > we c

Re: RFC: Add C Bindings to Geode Native Client

2020-03-25 Thread Dan Smith
+1 Great idea! Hey, it's also easy to call into C libraries from Java - maybe we can write a java client ;) It would be nice to see a little bit more detail about the actual API, like what does a region put look like? -Dan On Wed, Mar 25, 2020 at 8:25 AM Robert Houghton wrote: > +1 > YES. > >

Re: RFC: Add C Bindings to Geode Native Client

2020-03-25 Thread Robert Houghton
+1 YES. Having a set of clean C headers also allows for using a broad set of code generators for additional languages (Swig, for example). On Tue, Mar 24, 2020 at 2:20 PM Blake Bender wrote: > Hello everyone, > > We'd like to add C bindings to the native client, in preparation for the > large

RFC: Add C Bindings to Geode Native Client

2020-03-24 Thread Blake Bender
Hello everyone, We'd like to add C bindings to the native client, in preparation for the larger task of adding support for new languages, e.g. .net core. Please have a look at the proposal below and let me know what you think. Thanks, Blake https://cwiki.apache.org/confluence/display/GEODE/Ad