vti / sockjs-perl

SockJS Perl Plack/PSGI implementation
Other
21 stars 4 forks source link

Client example #14

Open Grimeton opened 5 years ago

Grimeton commented 5 years ago

Hi,

I'm missing an example that shows how to use the SockJS implementation as a client to send Json RPC2 information via the connection.

KR,

G.

vti commented 5 years ago

There is no Perl client code for SockJS, the client code is in JavaScript located here https://github.com/sockjs/sockjs-client

Grimeton commented 5 years ago

See the problem?

vti commented 5 years ago

What problem? I don't see any problem here :)

Grimeton commented 5 years ago

Of course not. Because you always implement the protocol and write the server side application without having a client at hand for the same programming language.

Looks like the low standards in javascript are finding their way into the Perl landscape.

Really sad.

Anyway, glad we talked about it.

vti commented 5 years ago

Why do you need a Perl client in the first place? You can always use raw websockets with a SockJS server. It doesn't make any sense to use SockJS client in a non-browser environment.

Feel free to write quality Perl software and submit to the GitHub btw.

Grimeton commented 5 years ago

It's a pretty simple thing: You try to connect to a server that uses a specific protocol so you use that protocol on your client side, too. Works surprisingly well for decades now, no matter if it's IP, TCP, HTTP, pick your poison...

So having a SockJS server, the logical step is to get the client application and use it.

But the way I understand it, after looking into the SockJS thing is that it tries to solve a problem nobody ever had in the first place anyway. Like using all the existing methods, putting itself on top of it, creating a little bit of protocol logic and then acting as another object...

Anyway, glad we talked about it.

Cu