litecable icon indicating copy to clipboard operation
litecable copied to clipboard

Iodine integration

Open haukot opened this issue 6 years ago • 3 comments

Hi, Here is the integration with Iodine. Almost all is working, except few problems that listed in the top of lib/lite_cable/iodine.rb. Most important problem is the one with broadcast from outside of iodine server - it'll be cool to hear your opinion about this.

Also, I did this integration with Iodine, not with Plezi, because all related to websockets methods and handlers(write, close, subscribe, publish, on_open, on_message, etc) Plezi redirects directly to Iodine, and from websockets point of view it only adds some analog of RackApp with routing.

I'll be glad to hear some feedback from you.

P.S. Of course, I'll delete russian comments and add tests closer to the final version.

haukot avatar Mar 12 '18 20:03 haukot

Yep, thank you for so fast response!

In fact, I really like the example with Sinatra, because it's simple though real app that you can run and play.

I'd not quite understand what you mean by

We can move shared code into a separate folder (such as chat.rb).

but maybe it'll be enough if a simple example will be in Readme like so https://github.com/palkan/litecable/pull/10/files#diff-04c6e90faac2675aa89e2176d2eec7d8 ?

haukot avatar Mar 14 '18 00:03 haukot

I'd not quite understand what you mean by

I meant to extract business logic (i.e. chat.rb) into examples/shared folder and make separate folders for sinatra+anycable example, iodine example and sinatra+iodine example.

From the end-user point of view, it's better to have 3 almost identical examples than to have one with a lot of conditional switches.

palkan avatar Mar 14 '18 08:03 palkan

Okay, I updated examples folder, please check it out

haukot avatar Mar 14 '18 16:03 haukot