best way to communicate javascript and C++ [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
how can I communicate javascript with C++, run some commands, get active processes, but I didn't find any information on the web.
What I saw is the following links but none helps me:
http://comunidad.aisoy.es/api/Communication.html
http://www.mosync.com/docs/sdk/js/guides/wormhole/extending-javascript-with-cpp/index.html
http://www.codeguru.com/cpp/i-n/ieprogram/article.php/c4399/JavaScript-Calls-from-C.htm

Based on your tiny requirements description, here's a brief overview:
Run your C++ code as a stripped down version of http server, OR better write a C++ apache module. Make your javascript to make AJAX request to the exposed URL by the C++ http server, return the response in JSON/XML.
Just the standard way for your UI (javascript) to speak to the backend (C++)

Related

Python and JavaScript basic communication [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have a local HTML page: leaflet.html, which is displayed in an embedded browser inside a python-tkinter application.
Inside leaflet.html there is a simple JavaScript piece of code that contains a function:
addMarkerIn(longitude, latitude)
{
}
It is not important what this function does, what I need is to call addMarkerIn from python when a specific event occurs. Is it possible to avoid building a full http server environment and communicate through other methods such as named pipes?
You can add socket connection between js on html page and python backend. Using some library (like socket.io) it seems to be the simplest way.
Maybe this answer I wrote once helps you out?
You could make a function in python called addMarkerIn and call it with subprocess

Should i try to replace an api by minimalist website [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm working on a chrome extension and I need to get a schedule data from outside of the extension to let the admin broadcast the schedule to the extension users. I wanted to use hapi.js but I can't afford to buy any private server. I did find free website hosting. I thought I would do a minimal website with just a login system and some pages containing the data I would want and make some get request on the extension and extract the schedule on the extension.
Is it okay like a replacement plane for the API?
For almost the same purpose I was using WordPress website with json api plugin. (https://wordpress.org/plugins/json-api/) It is super easy to install and later you can simply run fetch requests inside of your application or extension.

Is there any advantage to use the Mantra.js architecture framework? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Meteor.js integrates well inside a Mantra.js architecture, but does it have advantages since it slows the running of my requests.
For instance a dummy request in GraphQL (get a random string from the server) runs in few ms using Apollo Client and 1 second and more using Mantra.js (exact same request wrapping Apollo stack).
It only depends what kind of project you want to work on.
Mantra.js is an architecture framework for Meteor.js, that means :
it helps a developer to follow the creation and development of its modules corresponding to the Mantra framework. The developer is free to use any kind of front-end library he/she wants, any Data Query and Client caching he wants, but in my opinion, it doesn't really improve the quality of the code. Someone can organize a project with own rules and it can be maintainable easily.
So if your team is comfortable with your code structure you definitively don't need something like Mantra.js.

Would it be possible to convert a NodeJS function to plain Javascript [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Im currently playing with the following thing: http://cgbystrom.com/articles/deconstructing-spotifys-builtin-http-server/, I want to be able to access the SpotifyWebHelper with Javascript, people have build this in NodeJS but I wonder if this is possible in plain JavaScript. Can anyone give me some pointers to start with? Or is this not possible at all?
NodeJS version:
https://github.com/onetune/spotify-web-helper/blob/master/index.js
Node.js is "plain Javascript", the only difference between Node.js and everything else is it has access to the actual computer instead of being trapped in a web sandbox.
If you mean "can I make this work in a browser?" the answer is no. It needs to be able to spawn processes, which you can't do in a browser.

Implementing webrtc at server side [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Is it possible to implement webRTC at server side? ie., I want my browser to connect to a http server(tomcat which runs a java based app to stream a video) using webRTC protocol and get the streem from the server?
I think compiling webRTC api and access it through JNI will help. Any other easy directions to do this?
There is now a server-side implementation of WebRTC in Asterisk that should enable that: https://wiki.asterisk.org/wiki/display/AST/Asterisk+WebRTC+Support
I haven't yet looked into it that much so I can't say for sure that it does what you want.
Take a look at Lynckia's Licode Project. It is however, Node.js serverside.

Categories