Late addition:

Despite of anything that might have been said to the contrary by anyone, this is something that comes up every now and then, so it seems fair to say that there is enough use cases out there waiting for it.

Personal opinion is, that since Thrift is not only about RPC but also about serialization and we already have efficient means to do it when we need it, there is certainly room for improvement regarding th support of serialization techniques that favor other goals besides efficiency.

For example, when I want to save my configs in a Thrift-like manner, be it simply for the sake of consistency through the code base or whatever other reason I migh have, then with this particular use case human-readability is probably of higher value than being fast and efficient.

Since I still want my RPC be fast, I will probably not use SimpleJSON there, but I might use it for my configs. Awesome that the modular architecture of Thrift exactly allows for this kind of flexibility, isn't it?

TL;DR: If you want to invest some time in this and contribute, much appreciated. Consider sharing via PR and dev mailing list in early stages to get valuable comnunity feedback.

Have fun,
JensG

-----Ursprüngliche Nachricht----- From: Jens Geyer
Sent: Tuesday, February 9, 2021 3:11 PM
To: user@thrift.apache.org
Subject: Re: Extending the SimpleJSONProtocol for reading

Hi,

I think there’s a far bigger use case than simply debugging for this

Sure. That's why I wrote "e.g." and "or whatever else comes to mind" :-)

Can I ask I really dumb question, being a member of generation z, mailing lists are quite alien to be, how do I do a full text search of it?

https://thrift.apache.org/mailing has links to all archives, there are some
more archives available in the web. Also Google indexes that stuff.

Have fun,
JensG


-----Ursprüngliche Nachricht----- From: Rollo Konig-Brock
Sent: Monday, February 8, 2021 11:23 PM
To: user@thrift.apache.org
Subject: Re: Extending the SimpleJSONProtocol for reading

Thanks for that,

I think there’s a far bigger use case than simply debugging for this:
interoperation with comments that don’t use thrift.

Can I ask I really dumb question, being a member of generation z, mailing
lists are quite alien to be, how do I do a full text search of it?

Rollo

On 8 Feb 2021, at 11:39, Jens Geyer <jensge...@hotmail.com> wrote:


I might add that there is JSON protocol and SimpleJSON protocol. While the forner is intended to works as a fully fledged protocol, the latter is not. AFAIK the idea was to have a write-only, human-readable format.

Regarding RPC in general and Thrift in particular there is a goal conflict: The primary goal is to have RPC serialization/deserialization as fast as possible, and this goal by no means includes human-readability as a requirement (in fact, it's most often the exact opposite).

Of course some other secondary use cases do exist, e.g. developers during debugging sessions, maybe logging or whatever else comes to mind, but they may also come with conflicting requirements - parsing human readable stuff is usually way more complex than reading 8 bytes from a byte array that form a double.

Have fun,
JensG


-----Ursprüngliche Nachricht----- From: Jens Geyer
Sent: Monday, February 8, 2021 12:16 PM
To: user@thrift.apache.org
Subject: Re: Extending the SimpleJSONProtocol for reading

Yes, there have been numerous attempts. You may be able to find via mailing list search.

Sent from mobile device. You know what that means...

________________________________
From: Rollo Konig-Brock <roll...@gmail.com>
Sent: Monday, February 8, 2021 11:04:35 AM
To: user@thrift.apache.org <user@thrift.apache.org>
Subject: Extending the SimpleJSONProtocol for reading

Hey all,

I am looking to document a websocket connection and I’m considering Apache Thrift with a SimpleJSON protocol. However you can’t deserialize using SimpleJSON.

I don’t quite see the practical problem of implementing read methods for simple json; as long as the types defined in your structs are also JSON types (that is, strings, floats, arrays, dicts, and bools), you can parse things.

Before I go galivanting off to implement something wholly inadvisable, has anyone attempted to do this? And what were the successes and failures?

Rollo

Reply via email to