tondrej / chakracore-delphi

Delphi and Free Pascal bindings and classes for Microsoft's ChakraCore library
https://tondrej.blogspot.com/search/label/chakracore
MIT License
136 stars 34 forks source link

FYI: ccws - the first large open source project that make massive use of chakracore-delphi #12

Open edwinyzh opened 5 years ago

edwinyzh commented 5 years ago

ccws - Linux Web(Socket) server powered by ChakraCore by @reddor

I just discovered it, I think it's a very useful example to demonstrate the integration with ChakraCore-Delphi from your code.

I guess (just guessing) it's easy to back-port to Delphi :)

tondrej commented 5 years ago

I'm watching it already. Very interesting. Thank you :-)

reddor commented 5 years ago

Oh hai :) The primary reason why the project is linux-only is the dependency on epoll, upon which the server logic is builting upon. Individual parts of it should be fairly reusable.
At some point I'd actually like to contribute ChakraRTTIObject back to this project, which automatically maps published properties & methods to the JS object. There's a similar feature in BESEN, and IMHO it makes writing new objects very comfortable. While we're at it, thanks for enabling to make this project in the first place!

tondrej commented 5 years ago

Hi :-)

Congrats on a very interesting project! It's also nice to see your RTTI extension. I had started something similar in a private branch already as I thought too it could be useful in simplifying the code on the Pascal side.

Looking forward to your contribution. :-) Cheers!

edwinyzh commented 5 years ago

Hey, I'm very glad that this post got attention from the authors of both chakracore-delphi itself and ccws :)

Speaking of RTTI I assume you talk about the lastly introduced Extended RTTI as opposed to the good-old fast RTTI (System.Typinfo.pas).

It's worth to note that the old RTTI is much faster, although it supports only publishedmethods and property, but IMHO the limit is worth due to the speed gain. the mORMot author had some tests and mORMot uses the good-old RTTI only for the sake of much better performance.