Peer-to-peer Javascript & something










2














I'm looking for a method to connect client(web browser) to server(without external IP) using p2p.



As client-side language i would like to use javascript.



I was reading about WebRTC Peer-to-peer but i don't know if it only works with two clients(javascript) or if i can use some other language ( PHP, Python, Node.js ).



I know about signaling, STUN and TURN servers. I have server with external IP address so it won't be a problem.



My question is what programming language can i use on the server?










share|improve this question





















  • How about use websocket? there's a very good library in JS called socket.io... WebRTC is more used for vídeo and audio p2p. What's your goal with that? maybe websocket solve your problem
    – Milton Filho
    Nov 11 '18 at 22:29










  • My goal is only to send and receive data in text format.
    – HealV
    Nov 12 '18 at 8:05















2














I'm looking for a method to connect client(web browser) to server(without external IP) using p2p.



As client-side language i would like to use javascript.



I was reading about WebRTC Peer-to-peer but i don't know if it only works with two clients(javascript) or if i can use some other language ( PHP, Python, Node.js ).



I know about signaling, STUN and TURN servers. I have server with external IP address so it won't be a problem.



My question is what programming language can i use on the server?










share|improve this question





















  • How about use websocket? there's a very good library in JS called socket.io... WebRTC is more used for vídeo and audio p2p. What's your goal with that? maybe websocket solve your problem
    – Milton Filho
    Nov 11 '18 at 22:29










  • My goal is only to send and receive data in text format.
    – HealV
    Nov 12 '18 at 8:05













2












2








2


0





I'm looking for a method to connect client(web browser) to server(without external IP) using p2p.



As client-side language i would like to use javascript.



I was reading about WebRTC Peer-to-peer but i don't know if it only works with two clients(javascript) or if i can use some other language ( PHP, Python, Node.js ).



I know about signaling, STUN and TURN servers. I have server with external IP address so it won't be a problem.



My question is what programming language can i use on the server?










share|improve this question













I'm looking for a method to connect client(web browser) to server(without external IP) using p2p.



As client-side language i would like to use javascript.



I was reading about WebRTC Peer-to-peer but i don't know if it only works with two clients(javascript) or if i can use some other language ( PHP, Python, Node.js ).



I know about signaling, STUN and TURN servers. I have server with external IP address so it won't be a problem.



My question is what programming language can i use on the server?







javascript python node.js p2p peer






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 11 '18 at 22:05









HealV

224




224











  • How about use websocket? there's a very good library in JS called socket.io... WebRTC is more used for vídeo and audio p2p. What's your goal with that? maybe websocket solve your problem
    – Milton Filho
    Nov 11 '18 at 22:29










  • My goal is only to send and receive data in text format.
    – HealV
    Nov 12 '18 at 8:05
















  • How about use websocket? there's a very good library in JS called socket.io... WebRTC is more used for vídeo and audio p2p. What's your goal with that? maybe websocket solve your problem
    – Milton Filho
    Nov 11 '18 at 22:29










  • My goal is only to send and receive data in text format.
    – HealV
    Nov 12 '18 at 8:05















How about use websocket? there's a very good library in JS called socket.io... WebRTC is more used for vídeo and audio p2p. What's your goal with that? maybe websocket solve your problem
– Milton Filho
Nov 11 '18 at 22:29




How about use websocket? there's a very good library in JS called socket.io... WebRTC is more used for vídeo and audio p2p. What's your goal with that? maybe websocket solve your problem
– Milton Filho
Nov 11 '18 at 22:29












My goal is only to send and receive data in text format.
– HealV
Nov 12 '18 at 8:05




My goal is only to send and receive data in text format.
– HealV
Nov 12 '18 at 8:05












3 Answers
3






active

oldest

votes


















1














Actualy you can avoid other languages if you will use Kurento media server. It have javascript like native. And it frendly desiged to use it with Node.js backend.



Also Janus-Gateawey have commodious JavaScript API and allows build backend on any language you want. Managing all webRTC things happens on client side. That very cose if you understand webRTC and JS at least on basical level.



For control webRTC from back side on python you can use aiortc library



If you need to send/receive only text data then socket.io with e.g. python-socket.io (on server side) is that what you need






share|improve this answer






























    1














    I added to Andrey Suglobov's answer: The client does not receive the WebRTC packets from the server because it doesn't have an external IP. In order to solve this problem, you have to configure it to communicate via the TURN server in the middle.



    [WebRTC server] ↔ [TURN] ↔ [NAT] ↔ [client]



    Generally, the client uses JavaScript because it's a browser. But WebRTC is a specification that supports P2P on the web. If supporting this specification, it does not matter what programming language you use.



    Thank you.






    share|improve this answer




























      0














      Probably found an answer.
      I can use javascript server side in node.js






      share|improve this answer




















        Your Answer






        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "1"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253718%2fpeer-to-peer-javascript-something%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        1














        Actualy you can avoid other languages if you will use Kurento media server. It have javascript like native. And it frendly desiged to use it with Node.js backend.



        Also Janus-Gateawey have commodious JavaScript API and allows build backend on any language you want. Managing all webRTC things happens on client side. That very cose if you understand webRTC and JS at least on basical level.



        For control webRTC from back side on python you can use aiortc library



        If you need to send/receive only text data then socket.io with e.g. python-socket.io (on server side) is that what you need






        share|improve this answer



























          1














          Actualy you can avoid other languages if you will use Kurento media server. It have javascript like native. And it frendly desiged to use it with Node.js backend.



          Also Janus-Gateawey have commodious JavaScript API and allows build backend on any language you want. Managing all webRTC things happens on client side. That very cose if you understand webRTC and JS at least on basical level.



          For control webRTC from back side on python you can use aiortc library



          If you need to send/receive only text data then socket.io with e.g. python-socket.io (on server side) is that what you need






          share|improve this answer

























            1












            1








            1






            Actualy you can avoid other languages if you will use Kurento media server. It have javascript like native. And it frendly desiged to use it with Node.js backend.



            Also Janus-Gateawey have commodious JavaScript API and allows build backend on any language you want. Managing all webRTC things happens on client side. That very cose if you understand webRTC and JS at least on basical level.



            For control webRTC from back side on python you can use aiortc library



            If you need to send/receive only text data then socket.io with e.g. python-socket.io (on server side) is that what you need






            share|improve this answer














            Actualy you can avoid other languages if you will use Kurento media server. It have javascript like native. And it frendly desiged to use it with Node.js backend.



            Also Janus-Gateawey have commodious JavaScript API and allows build backend on any language you want. Managing all webRTC things happens on client side. That very cose if you understand webRTC and JS at least on basical level.



            For control webRTC from back side on python you can use aiortc library



            If you need to send/receive only text data then socket.io with e.g. python-socket.io (on server side) is that what you need







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 12 '18 at 12:10

























            answered Nov 11 '18 at 23:03









            Andrey Suglobov

            1248




            1248























                1














                I added to Andrey Suglobov's answer: The client does not receive the WebRTC packets from the server because it doesn't have an external IP. In order to solve this problem, you have to configure it to communicate via the TURN server in the middle.



                [WebRTC server] ↔ [TURN] ↔ [NAT] ↔ [client]



                Generally, the client uses JavaScript because it's a browser. But WebRTC is a specification that supports P2P on the web. If supporting this specification, it does not matter what programming language you use.



                Thank you.






                share|improve this answer

























                  1














                  I added to Andrey Suglobov's answer: The client does not receive the WebRTC packets from the server because it doesn't have an external IP. In order to solve this problem, you have to configure it to communicate via the TURN server in the middle.



                  [WebRTC server] ↔ [TURN] ↔ [NAT] ↔ [client]



                  Generally, the client uses JavaScript because it's a browser. But WebRTC is a specification that supports P2P on the web. If supporting this specification, it does not matter what programming language you use.



                  Thank you.






                  share|improve this answer























                    1












                    1








                    1






                    I added to Andrey Suglobov's answer: The client does not receive the WebRTC packets from the server because it doesn't have an external IP. In order to solve this problem, you have to configure it to communicate via the TURN server in the middle.



                    [WebRTC server] ↔ [TURN] ↔ [NAT] ↔ [client]



                    Generally, the client uses JavaScript because it's a browser. But WebRTC is a specification that supports P2P on the web. If supporting this specification, it does not matter what programming language you use.



                    Thank you.






                    share|improve this answer












                    I added to Andrey Suglobov's answer: The client does not receive the WebRTC packets from the server because it doesn't have an external IP. In order to solve this problem, you have to configure it to communicate via the TURN server in the middle.



                    [WebRTC server] ↔ [TURN] ↔ [NAT] ↔ [client]



                    Generally, the client uses JavaScript because it's a browser. But WebRTC is a specification that supports P2P on the web. If supporting this specification, it does not matter what programming language you use.



                    Thank you.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 13 '18 at 3:47









                    AirenSoft

                    363




                    363





















                        0














                        Probably found an answer.
                        I can use javascript server side in node.js






                        share|improve this answer

























                          0














                          Probably found an answer.
                          I can use javascript server side in node.js






                          share|improve this answer























                            0












                            0








                            0






                            Probably found an answer.
                            I can use javascript server side in node.js






                            share|improve this answer












                            Probably found an answer.
                            I can use javascript server side in node.js







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 12 '18 at 13:16









                            HealV

                            224




                            224



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253718%2fpeer-to-peer-javascript-something%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Kleinkühnau

                                Makov (Slowakei)

                                Deutsches Schauspielhaus