Server / client use case

38 views
Skip to first unread message

Raul Gherman

unread,
Sep 16, 2017, 7:58:01 AM9/16/17
to FlatBuffers
hi guys, here is my use case:
i am communicating between client and server using FlatBuffers
example:
Client: generates and sends AuthorizationRequest (write)
Server: receives  and processes AuthorizationRequest (read-only)
Server: generates and sends AuthorizationReply (write)
Client: receives  and processes  AuthorizationReply (read-only)

my point is, some tables are read-only for one of the ends of the communication channel, so there would be no need for Put methods / builder
vice-versa, there are some tables that are write-only for one of the ends, so no need for Get methods

do you know if there is any way to achieve this?

best regards,

Raul

Wouter van Oortmerssen

unread,
Sep 18, 2017, 12:09:37 PM9/18/17
to Raul Gherman, FlatBuffers
The read and write APIs are already completely separate, i.e. they don't sit in the same class.

Do you simply want less code to be generated for each use case? The code all sits in a header and is all inline, meaning if one side doesn't use half the code, there is no cost to it.

--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raul Gherman

unread,
Sep 18, 2017, 1:01:16 PM9/18/17
to FlatBuffers
hi, thank you for your reply

i have noticed that, but i really do not know how to generate the server / client side code, right from the IDL

i know i could strip it down after it is generated... but i would like to do that from one take, not to manually intervene in the code after generation

ATB,

R
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers...@googlegroups.com.

Wouter van Oortmerssen

unread,
Sep 21, 2017, 1:52:22 PM9/21/17
to Raul Gherman, FlatBuffers
Like I said, there should not be any reason to separate the reading/writing code. Why would you want to do that?

To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages