You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by David Bennett <da...@yorkage.com> on 2015/09/08 13:58:16 UTC

Thrift as an API for Andl

Hi

I'm new to Thrift. I want to use it to implement a remoting API for a relational database language called Andl. See web site for details.

First: my platform is Windows C#. I found a few problems with setting up Thrift due to errors in the CSharp parts of the tutorial and related project files. I'm happy to raise issues for them if anyone is interested, but I don't really know Thrift well yet or how best to do that.

Second: I don't expect to have too much difficulty in writing a Thrift server to suit my purposes, but it's an asymmetric situation. Any user of Andl who wanted to use the Thrift interface would have to install and use Thrift (as well as my Andl/Thrift server), and I want to make sure that barrier to entry is as low as possible. IOW I write the server but they write the client; I get to work hard so they don't have to. I wondered if you could point me to any other projects doing something like this so I could get some tips on how best to approach it.

Third: As a kind of test of the above I wrote a Java client. I found that I was unable to load a jar file from the Thrift site (but I found it on the Central Repository). Then I found that the generated code had a dependency on a logging package. Then I had problems working out where to put the generated code, relative to the other source. This is the kind of friction I'm worried about. Comments?

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org



RE: Thrift as an API for Andl

Posted by David Bennett <da...@yorkage.com>.
Re tutorial issue: I've added a comment to clarify.

Re "how things are done": Adenauer knew his onions, but the problem is that
I don't know the people yet. In my experience, OSS projects vary enormously
in how much effort they are willing to put into making life easy for newbies
or outsiders vs working on interesting bugs and features deep in the code
and only visible to insiders. My (commercial) background puts a lot of
emphasis on making life easy for new customers, as part of winning new
business.

So far, the technical base for Thrift has been rock solid. It works as
advertised and the code looks pretty good, including the C#. It certainly
looks good enough for my purpose at the server end. How it will look to
potential client users of Andl remains to be seen, but I think there is work
to be done (particularly if like me they come from Windows).

Re NuGet: there is an old issue (2538) on this. Is it more usual to reopen
an old issue, or file a new one with a link?

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org


-----Original Message-----
From: Jens Geyer [mailto:jensgeyer@hotmail.com] 
Sent: Wednesday, 9 September 2015 5:24 AM
To: user@thrift.apache.org
Subject: Re: Thrift as an API for Andl

Hi David,

> Yes, the web site is linked in my footer. Strange how hard it is to see. 
> ;-)

What is a footer again?  ;-)


> What I don't know is anything about the culture or philosophy of 
> raising issues, the kind of language or repro required,

The ideal case is this: You have identified a problem and an idea for a
patch. If it is s small one, implement it and file a JIRA ticket. Add the PR
or the patch and wait for comments or commits. If nothing happens (which is
sometimes the case), you may want to send a reminder.

If the thing to implement is larger or huge, a PR is better than a patch. 
Also, in this case it is a good idea to create the ticket early to inform
people what's going on. If you're lucky, someone volunteers to help you with
reviews etc. At least we know what's going on. When the patch is ready, send
a PR. Get comments, if necessary fix issues and update the PR, until
everybody is happy.

If you only have identified an issue but no fix for some reason (maybe it is
Haskell and your Haskell is not so polished and you don't want to break
anything ...) file a ticket anyways. Make sure the issue is easily
reproducible and clearly described.


> why things are done the way they are when I would do it quite 
> differently

That's a pretty broad question. People do things because they come to some
sort of consensus that the way they are going to use is a good one. That
doesn't mean that there isn't any better, or there may be a better one in
the future. Things change and people are different, you know. I personally
stopped worrying about such things long ago, and Adenauer (a german
chancellor) said it best when he told us "Take people as they are: there
isn't anyone else".

With regard to coding style, a lot of the stuff comes from the origins of
Thrift and it has served us quite well so far.

Last not least you are always free to ask.


> Any others?

A number of Apache projects offer a Thrift API, e.g. HBase. And I'm sure
there are more out there in the wild. A lot more projects use Thrift only
internally.


> Did you know that the community 0.9.1 includes the compiler, but the 
> official 0.9.2 does not? It's pretty hard to use without the compiler, 
> but I'll put that in the issue.

I'd recommend to file another one for it. That's a different problem.


Have fun,
JensG


-----Ursprüngliche Nachricht-----
From: David Bennett
Sent: Tuesday, September 8, 2015 3:52 PM
To: user@thrift.apache.org
Subject: RE: Thrift as an API for Andl

[that's a new way to mangle email -- haven't seen that one before -- thanks
for the resend.]

Yes, the web site is linked in my footer. Strange how hard it is to see. ;-)

Re issues: yes I found the tracker and I know Jira. What I don't know is
anything about the culture or philosophy of raising issues, the kind of
language or repro required, why things are done the way they are when I
would do it quite differently, stuff like that. I'm a long way off
understanding the product well enough to propose an actual patch. But I'll
see if I can raise something and at least you'll know what it's about.

Evernote: I'll check it out.
Cassandra: yes, I found that. Looks like they've already moved to CQL. Not
much detail, but looks vaguely like ODBC with a different query language.
Any others?

Re Java: again, I don't know enough to tell you what you should be doing. I
figured out all that stuff, but I just know I found it harder than I
expected, and I'm familiar with Java. It seems you expect people to be
writing both the client and server and to invest the time to figure
everything out, including building from source, which is a higher barrier
than I was hoping for, for my client-only users.

Yes, I am using the NuGet and that certainly helps. Did you know that the
community 0.9.1 includes the compiler, but the official 0.9.2 does not? It's
pretty hard to use without the compiler, but I'll put that in the issue.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org


-----Original Message-----
From: Jens Geyer [mailto:jensgeyer@hotmail.com]
Sent: Tuesday, 8 September 2015 10:22 PM
To: user@thrift.apache.org
Subject: RE: Thrift as an API for Andl

Somehow the text got garvbled. here's a more readable version (hoppefully)
again:


-----------------------------------------------------------


Hi David,


> I'm new to Thrift. I want to use it to implement a remoting API for a
relational database

> language called Andl. See web site for details.



Great! Is that http://www.andl.org ?


> First: my platform is Windows C#. I found a few problems with setting 
> up
Thrift due

> to errors in the CSharp parts of the tutorial and related project files.
I'm happy to raise

> issues for them if anyone is interested, but I don't really know 
> Thrift
well yet or how best to do that.


There is a JIRA issue tracker, see web site. We also do accept PRs.

https://thrift.apache.org/docs/HowToContribute


> Second: I don't expect to have too much difficulty in writing a Thrift
server to suit my purposes,

> but it's an asymmetric situation. Any user of Andl who wanted to use 
> the
Thrift interface would

> have to install and use Thrift (as well as my Andl/Thrift server), and 
> I
want to make sure that

> barrier to entry is as low as possible. IOW I write the server but 
> they
write the client;

> I get to work hard so they don't have to. I wondered if you could 
> point me
to any other

> projects doing something like this so I could get some tips on how 
> best to
approach it.


Evernote has a public Thrift API since 2011


https://blog.evernote.com/tech/2011/05/26/evernote-and-thrift/


Apache Cassandra also offers a public Thrift-based API, albeit they are
about to deprecate it in favour of their own query language.


http://cassandra.apache.org/



And we do it at our company :-)


> Third: As a kind of test of the above I wrote a Java client. I found 
> that
I

> was unable to load a jar file from the Thrift site (but I found it on 
> the

> Central Repository).

That's the typical case for most (all) languages. For example, there's an
officially maintained nuget package for C# available.

> Then I found that the generated code had a dependency on a logging
package.

That has been solved IIRC. At least someone worked at it in the last weeks.
Try searching JIRA or the mailing list archives.


> Then I had problems working out where to put the generated code, 
> relative
to the other source.

That's a pretty generic question. The default location are folders that
start with gen-*, these are usually excluded from the CVS via that pattern.
You may set a different output folder using the -out NAME argument. Type
thrift --help for all options. If you want something else, please explain.

> This is the kind of friction I'm worried about. Comments?


Looking forward to your cool API :-)



Have fun,

JensG


Re: Thrift as an API for Andl

Posted by Jens Geyer <je...@hotmail.com>.
Hi David,

> Yes, the web site is linked in my footer. Strange how hard it is to see. 
> ;-)

What is a footer again?  ;-)


> What I don't know is anything about the culture or philosophy
> of raising issues, the kind of language or repro required,

The ideal case is this: You have identified a problem and an idea for a 
patch. If it is s small one, implement it and file a JIRA ticket. Add the PR 
or the patch and wait for comments or commits. If nothing happens (which is 
sometimes the case), you may want to send a reminder.

If the thing to implement is larger or huge, a PR is better than a patch. 
Also, in this case it is a good idea to create the ticket early to inform 
people what's going on. If you're lucky, someone volunteers to help you with 
reviews etc. At least we know what's going on. When the patch is ready, send 
a PR. Get comments, if necessary fix issues and update the PR, until 
everybody is happy.

If you only have identified an issue but no fix for some reason (maybe it is 
Haskell and your Haskell is not so polished and you don't want to break 
anything ...) file a ticket anyways. Make sure the issue is easily 
reproducible and clearly described.


> why things are done the way they are when I would do it quite differently

That's a pretty broad question. People do things because they come to some 
sort of consensus that the way they are going to use is a good one. That 
doesn't mean that there isn't any better, or there may be a better one in 
the future. Things change and people are different, you know. I personally 
stopped worrying about such things long ago, and Adenauer (a german 
chancellor) said it best when he told us "Take people as they are: there 
isn't anyone else".

With regard to coding style, a lot of the stuff comes from the origins of 
Thrift and it has served us quite well so far.

Last not least you are always free to ask.


> Any others?

A number of Apache projects offer a Thrift API, e.g. HBase. And I'm sure 
there are more out there in the wild. A lot more projects use Thrift only 
internally.


> Did you know that the community 0.9.1 includes the compiler, but the 
> official 0.9.2 does not? It's pretty hard to use without the compiler, but 
> I'll put that in the issue.

I'd recommend to file another one for it. That's a different problem.


Have fun,
JensG


-----Ursprüngliche Nachricht----- 
From: David Bennett
Sent: Tuesday, September 8, 2015 3:52 PM
To: user@thrift.apache.org
Subject: RE: Thrift as an API for Andl

[that's a new way to mangle email -- haven't seen that one before -- thanks
for the resend.]

Yes, the web site is linked in my footer. Strange how hard it is to see. ;-)

Re issues: yes I found the tracker and I know Jira. What I don't know is
anything about the culture or philosophy of raising issues, the kind of
language or repro required, why things are done the way they are when I
would do it quite differently, stuff like that. I'm a long way off
understanding the product well enough to propose an actual patch. But I'll
see if I can raise something and at least you'll know what it's about.

Evernote: I'll check it out.
Cassandra: yes, I found that. Looks like they've already moved to CQL. Not
much detail, but looks vaguely like ODBC with a different query language.
Any others?

Re Java: again, I don't know enough to tell you what you should be doing. I
figured out all that stuff, but I just know I found it harder than I
expected, and I'm familiar with Java. It seems you expect people to be
writing both the client and server and to invest the time to figure
everything out, including building from source, which is a higher barrier
than I was hoping for, for my client-only users.

Yes, I am using the NuGet and that certainly helps. Did you know that the
community 0.9.1 includes the compiler, but the official 0.9.2 does not? It's
pretty hard to use without the compiler, but I'll put that in the issue.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org


-----Original Message-----
From: Jens Geyer [mailto:jensgeyer@hotmail.com]
Sent: Tuesday, 8 September 2015 10:22 PM
To: user@thrift.apache.org
Subject: RE: Thrift as an API for Andl

Somehow the text got garvbled. here's a more readable version (hoppefully)
again:


-----------------------------------------------------------


Hi David,


> I'm new to Thrift. I want to use it to implement a remoting API for a
relational database

> language called Andl. See web site for details.



Great! Is that http://www.andl.org ?


> First: my platform is Windows C#. I found a few problems with setting up
Thrift due

> to errors in the CSharp parts of the tutorial and related project files.
I'm happy to raise

> issues for them if anyone is interested, but I don't really know Thrift
well yet or how best to do that.


There is a JIRA issue tracker, see web site. We also do accept PRs.

https://thrift.apache.org/docs/HowToContribute


> Second: I don't expect to have too much difficulty in writing a Thrift
server to suit my purposes,

> but it's an asymmetric situation. Any user of Andl who wanted to use the
Thrift interface would

> have to install and use Thrift (as well as my Andl/Thrift server), and I
want to make sure that

> barrier to entry is as low as possible. IOW I write the server but they
write the client;

> I get to work hard so they don't have to. I wondered if you could point me
to any other

> projects doing something like this so I could get some tips on how best to
approach it.


Evernote has a public Thrift API since 2011


https://blog.evernote.com/tech/2011/05/26/evernote-and-thrift/


Apache Cassandra also offers a public Thrift-based API, albeit they are
about to deprecate it in favour of their own query language.


http://cassandra.apache.org/



And we do it at our company :-)


> Third: As a kind of test of the above I wrote a Java client. I found that
I

> was unable to load a jar file from the Thrift site (but I found it on the

> Central Repository).

That's the typical case for most (all) languages. For example, there's an
officially maintained nuget package for C# available.

> Then I found that the generated code had a dependency on a logging
package.

That has been solved IIRC. At least someone worked at it in the last weeks.
Try searching JIRA or the mailing list archives.


> Then I had problems working out where to put the generated code, relative
to the other source.

That's a pretty generic question. The default location are folders that
start with gen-*, these are usually excluded from the CVS via that pattern.
You may set a different output folder using the -out NAME argument. Type
thrift --help for all options. If you want something else, please explain.

> This is the kind of friction I'm worried about. Comments?


Looking forward to your cool API :-)



Have fun,

JensG


RE: Thrift as an API for Andl

Posted by David Bennett <da...@yorkage.com>.
[that's a new way to mangle email -- haven't seen that one before -- thanks
for the resend.]

Yes, the web site is linked in my footer. Strange how hard it is to see. ;-)

Re issues: yes I found the tracker and I know Jira. What I don't know is
anything about the culture or philosophy of raising issues, the kind of
language or repro required, why things are done the way they are when I
would do it quite differently, stuff like that. I'm a long way off
understanding the product well enough to propose an actual patch. But I'll
see if I can raise something and at least you'll know what it's about.

Evernote: I'll check it out.
Cassandra: yes, I found that. Looks like they've already moved to CQL. Not
much detail, but looks vaguely like ODBC with a different query language.
Any others?

Re Java: again, I don't know enough to tell you what you should be doing. I
figured out all that stuff, but I just know I found it harder than I
expected, and I'm familiar with Java. It seems you expect people to be
writing both the client and server and to invest the time to figure
everything out, including building from source, which is a higher barrier
than I was hoping for, for my client-only users.

Yes, I am using the NuGet and that certainly helps. Did you know that the
community 0.9.1 includes the compiler, but the official 0.9.2 does not? It's
pretty hard to use without the compiler, but I'll put that in the issue.

Regards
David M Bennett FACS

Andl - A New Database Language - andl.org


-----Original Message-----
From: Jens Geyer [mailto:jensgeyer@hotmail.com] 
Sent: Tuesday, 8 September 2015 10:22 PM
To: user@thrift.apache.org
Subject: RE: Thrift as an API for Andl

Somehow the text got garvbled. here's a more readable version (hoppefully)
again:


-----------------------------------------------------------

 
Hi David,


> I'm new to Thrift. I want to use it to implement a remoting API for a
relational database 

> language called Andl. See web site for details.



Great! Is that http://www.andl.org ?


> First: my platform is Windows C#. I found a few problems with setting up
Thrift due 

> to errors in the CSharp parts of the tutorial and related project files.
I'm happy to raise 

> issues for them if anyone is interested, but I don't really know Thrift
well yet or how best to do that.

 
There is a JIRA issue tracker, see web site. We also do accept PRs. 

https://thrift.apache.org/docs/HowToContribute 


> Second: I don't expect to have too much difficulty in writing a Thrift
server to suit my purposes, 

> but it's an asymmetric situation. Any user of Andl who wanted to use the
Thrift interface would 

> have to install and use Thrift (as well as my Andl/Thrift server), and I
want to make sure that 

> barrier to entry is as low as possible. IOW I write the server but they
write the client; 

> I get to work hard so they don't have to. I wondered if you could point me
to any other 

> projects doing something like this so I could get some tips on how best to
approach it.

 
Evernote has a public Thrift API since 2011


https://blog.evernote.com/tech/2011/05/26/evernote-and-thrift/


Apache Cassandra also offers a public Thrift-based API, albeit they are
about to deprecate it in favour of their own query language.


http://cassandra.apache.org/



And we do it at our company :-)


> Third: As a kind of test of the above I wrote a Java client. I found that
I 

> was unable to load a jar file from the Thrift site (but I found it on the 

> Central Repository). 

 That's the typical case for most (all) languages. For example, there's an
officially maintained nuget package for C# available.
 
> Then I found that the generated code had a dependency on a logging
package. 

 That has been solved IIRC. At least someone worked at it in the last weeks.
Try searching JIRA or the mailing list archives.


> Then I had problems working out where to put the generated code, relative
to the other source. 

 That's a pretty generic question. The default location are folders that
start with gen-*, these are usually excluded from the CVS via that pattern.
You may set a different output folder using the -out NAME argument. Type
thrift --help for all options. If you want something else, please explain.

> This is the kind of friction I'm worried about. Comments?


Looking forward to your cool API :-)



Have fun,

JensG 		 	   		  


RE: Thrift as an API for Andl

Posted by Jens Geyer <je...@hotmail.com>.
Somehow the text got garvbled. here's a more readable version (hoppefully) again:


-----------------------------------------------------------

 
Hi David,


> I'm new to Thrift. I want to use it to implement a remoting API for a relational database 

> language called Andl. See web site for details.



Great! Is that http://www.andl.org ?


> First: my platform is Windows C#. I found a few problems with setting up Thrift due 

> to errors in the CSharp parts of the tutorial and related project files. I'm happy to raise 

> issues for them if anyone is interested, but I don't really know Thrift well yet or how best to do that.

 
There is a JIRA issue tracker, see web site. We also do accept PRs. 

https://thrift.apache.org/docs/HowToContribute 


> Second: I don't expect to have too much difficulty in writing a Thrift server to suit my purposes, 

> but it's an asymmetric situation. Any user of Andl who wanted to use the Thrift interface would 

> have to install and use Thrift (as well as my Andl/Thrift server), and I want to make sure that 

> barrier to entry is as low as possible. IOW I write the server but they write the client; 

> I get to work hard so they don't have to. I wondered if you could point me to any other 

> projects doing something like this so I could get some tips on how best to approach it.

 
Evernote has a public Thrift API since 2011


https://blog.evernote.com/tech/2011/05/26/evernote-and-thrift/


Apache Cassandra also offers a public Thrift-based API, albeit they are about to deprecate it in favour of their own query language.


http://cassandra.apache.org/



And we do it at our company :-)


> Third: As a kind of test of the above I wrote a Java client. I found that I 

> was unable to load a jar file from the Thrift site (but I found it on the 

> Central Repository). 

 That's the typical case for most (all) languages. For example, there's an officially maintained nuget package for C# available.
 
> Then I found that the generated code had a dependency on a logging package. 

 That has been solved IIRC. At least someone worked at it in the last weeks. Try searching JIRA or the mailing list archives.


> Then I had problems working out where to put the generated code, relative to the other source. 

 That's a pretty generic question. The default location are folders that start with gen-*, these are usually excluded from the CVS via that pattern. You may set a different output folder using the -out NAME argument. Type thrift --help for all options. If you want something else, please explain.

> This is the kind of friction I'm worried about. Comments?


Looking forward to your cool API :-)



Have fun,

JensG 		 	   		  

RE: Thrift as an API for Andl

Posted by Jens Geyer <je...@hotmail.com>.
Hi David,
 
> I'm new to Thrift. I want to use it to implement a remoting API for a relational database language called Andl. See web site for details. Great! Is that http://www.andl.org ?
> First: my platform is Windows C#. I found a few problems with setting up Thrift due to errors in the CSharp parts of the tutorial and related project files. I'm happy to raise issues for them if anyone is interested, but I don't really know Thrift well yet or how best to do that. There is a JIRA issue tracker, see web site. We also do accept PRs. https://thrift.apache.org/docs/HowToContribute 
> Second: I don't expect to have too much difficulty in writing a Thrift server to suit my purposes, but it's an asymmetric situation. Any user of Andl who wanted to use the Thrift interface would have to install and use Thrift (as well as my Andl/Thrift server), and I want to make sure that barrier to entry is as low as possible. IOW I write the server but they write the client; I get to work hard so they don't have to. I wondered if you could point me to any other projects doing something like this so I could get some tips on how best to approach it. Evernote has a public Thrift API since 2011https://blog.evernote.com/tech/2011/05/26/evernote-and-thrift/ Apache Cassandra also offers a public Thrift-based API, albeit they are about to deprecate it in favour of their own query language.http://cassandra.apache.org/ And we do it at our company :-)
> Third: As a kind of test of the above I wrote a Java client. I found that I was unable to load a jar file from the Thrift site (but I found it on the Central Repository).  That's the typical case for most (all) languages. For example, there's an officially maintained nuget package for C# available. > Then I found that the generated code had a dependency on a logging package.  That has been solved IIRC. At least someone worked at it in the last weeks. Try searching JIRA or the mailing list archives. > Then I had problems working out where to put the generated code, relative to the other source.  That's a pretty generic question. The default location are folders that start with gen-*, these are usually excluded from the CVS via that pattern. You may set a different output folder using the -out NAME argument. Type thrift --help for all options. If you want something else, please explain. > This is the kind of friction I'm worried about. Comments? Looking forward to your cool API :-) Have fun,JensG