gabrielrcouto / php-gui

Extensionless PHP Graphic User Interface library
2.24k stars 175 forks source link

A better IPC Protocol #43

Open gabrielrcouto opened 8 years ago

gabrielrcouto commented 8 years ago

We can use a better IPC Protocol, it need to be:

Suggestions:

A great comparison: https://capnproto.org/news/2014-06-17-capnproto-flatbuffers-sbe.html

ghost commented 8 years ago

I'm not sure about splitting big data, but msgpack might be an option.

qbitza commented 8 years ago

Switching to BSON would be fairly easy when combining the Pascal side to mORMot. Or use anything STOMP based: https://en.wikipedia.org/wiki/Streaming_Text_Oriented_Messaging_Protocol

gabrielrcouto commented 8 years ago

Well, I did some tests:

We can see some bench for PHP encoders HERE and HERE.

reisraff commented 7 years ago

Take a loot in #104

PeratX commented 7 years ago

Use a binary stream xD

Gold-Samiar commented 4 years ago

I found few problems in communication between PHP and Pascal. There are no data type conversion in protocol. Pascal is more hard so it need more information before process any code. There are no dynamic call in Pascal side so limited development. My suggestion is that the protocol should have value:datatype format which can convert on pascal side. JSON data type is always string but pascal may need widestring datatype so we can write value:widestring. in this we need less code on pascal side and can fix basic datatypes conversion.