I am currently working on a Three.js based WebGL project and I need to get a screenshot of a given model quickly when needed.
I have implemented some JavaScript code that will render a 3D model then return a picture of it. But the problem is that the JavaScript code runs at client side, but I need it to make it server-side, so I can get the picture by a URL (such as example.com/get-screenshot.php?id=2) and serve it to my users.
I am wondering if there is a mechanism that will automatically trigger the job and return what I need. Besides the server that hosts my site, which is Azure website, I also have access to an Azure virtual machine with Windows Server or Ubuntu Server installed; I don't know if it helps.
Thanks in advance.
Your WebGL code needs a GPU to run; Amazon recently introduced a GPU instance to EC2, but Azure currently does not have that option.
The next release of the Verold platform gives you a full Three.js editor with hosting options for your web 3D desktop and mobile apps. You will be able to implement this usecase on our platform. Send an email to info#verold.com for details.
Ross
You can try use phantomjs with grunt and node to genarate those images.
phantomjs can simulate a full stack browser enironment, and can run on server side.
Related
I know that SWUpdate has its own embedded web server with which is possible to upload the image file for the upgrade.
I already realized a small web page with Node.js that I use to do some configuration on my board, and I would like to know if would be possible to add in it my own web page for upgrading the software, just like embedded SWUpdate web server does. In short, I would like to integrate a webpage for the upgrade in my node.js web server, instead of use the standard one.
I suppose I should use a specific protocol to make my custom web page to be "transparent" to the board.
Is it possible? Has someone already tried? Thanks
I'm starting out on my Node.JS journey and I discovered a fantastic boilerplate over at https://github.com/azouaoui-med/pro-sidebar-template. I'm unsure though how to turn the static html into a web app. Just wondering how someone with more experience would do this?
Do I take the html and translate it into a PUG template file? I'm guessing to then make the onclick / links actually run some code, i'd need to point them at the routes setup in the web app?
Sorry to ask such inexperienced questions, web apps seem to take a vastly different approach to the desktop apps i'm familiar with programming
I'm wanting to create a web app that runs on a server, which I will later put on the desktop via electron.
thanks
The project you have is using browser-sync which indirectly uses NodeJS to run a local server and host the web application files.
Do I take the HTML and translate it into a PUG template file?
I am not sure about this question unless you specifically want to use server-side rendering I am not sure I would recommend this to start with especially if you plan to later convert this to a desktop application.
[Note* - Assuming you are referencing this library PUGJS in statements above ]
Now For this requirement I'm wanting to create a web app that runs on a server, which I will later put on the desktop via electron.
This will require you to make your data serving layer which is most commonly called backend separate from that of the data viewing layer which is most commonly referred to as front-end. Thus a case for using the same data layer across different types of clients viz. A web application and/or A desktop application ( electron if you choose so )
Step 1 - Define what sort of web application architecture you want to follow or use. This will be based on your project and business requirements. From what information I have so far I would suggest a simple client-server architecture where your frontend or web-application is the client which makes REST API calls to the backend (API Server) and thus produces a meaningful result.
Step 2 - Start with the creation of 2 projects a frontend where your HTML, CSS JS, etc will be and a simple NodeJS script to serve this static web app when deployed on the server. I am going with NodeJS since the context of this question is suggesting the same.
Step 3 - The other project which will only be an API Server or Backend. This server will provide only REST API to the frontend. This server will talk to the database and provide other services like authentication and logging etc. You can use expressJS for this also in the frontend project.
Here is a simplistic representation of the client-server model which you can reference.
Some additional links for you to digest.
What is the difference between a web application and a client/server application?
https://medium.com/codiumclub/web-application-architecture-part-1-guide-to-become-full-stack-developer-cc9526a3519b
Is it possible to include the google assistant into my local web application so that everyone can use it? I've got a JSF-Application that runs on a local tomcat 7 server. My goal is to change the views by voice. I want to do it with the google assistant sdk.
There is the service sdk (python, all functions) and the library sdk(gPRC (java), general function). I tried the java-client, but the hotword detection only works for the service sdk. I need the hotword detection.
Can I run the service python google assistant and my jsf-app on one tomcat server? I can't get my head around it and need your help.
This is only the first step to my goal. Have you any suggestions?
Hotword detection would be non-trivial to implement. A web application contains two parts: a client, which would be the web browser, and the server, which is your local tomcat server.
Web apps basically work with multiple clients communicating to one server through HTTP requests, primarily through Javascript. Your server then processes this, and the cool thing is that the server can be any language you want.
However, the client cannot directly interact with server-side code. This means that locally running feature like hotword detection on the server cannot be directly controlled by the client. You'd need to use a client-side hotword detection library, which would presumably need to be written in Javascript.
I was given the following to consider:
Develop desktop application using Nodeweb kit.
Also develop web application using the same code base.
Applications should look identical.
Both apps must use the same code base. The reason for this is to cut down development expenses.
If it was up to me I would not even consider using node-webkit for desktop. There are far better desktop solutions for Win platforms. For web application using Node is certanly viable.
But people who plan the project somehow think Node is a way to go for both apps.
After lots of thinking, I came to the conclusion that doing what they want will only increase dev and maintenance costs.
I consider using express (maybe even Sails.js) for web application. I made some tests where I used express on node-webkit and it run just fine.
Certanly NW is powerfull platform (popcorn). Just in my case I fail to see how can it cut down the dev expense
Am I right to be against this solution? Is this a plausible decision and I am not seeing another solution?
Any opinion is very welcome
I have actually done exactly this, and it worked very well. The trick was to write some Node Webkit code that will "detect" that it's running as a desktop application, instead of a web app, and thus integrate with desktop notifications etc.
Yes, it was more work than just writing a web app, but it was also less work (and maintenance) than developing separate applications. You get to use a lot of common code, because of the fact that you are running in a browser already, that I feel the project saved a lot of time.
In fact, I am currently working on another application that requires some desktop features (file access, notifications) but the same functionality as the web application, and I'm proposing that the development happens in Node Webkit.
The important criteria here for me is that both applications are 90% the same, the desktop just adds things you don't normally have on the web. So the core of the application is exactly the same AngularJS application, with some JavaScript injected by the Node Webkit startup page to add the required desktop behaviour.
You haven't presented reasons why you think node-webkit is not a suitable option for desktop application.
On the other hand I think client's opinion that development in node and node-webkit will be able to cut down costs is not ungrounded.
nw.js (formerly node-webkit) is basically a Chromium browser with intergrated node.js engine. So if you develop a web-application using node.js (and any of its frameworks) then you will be able to reuse it in nw.js fairly easy.
Does anyone know of any article/publication on the security architecture of Metro app?
For example, can the metro app call an external service. If it can,
under what condition. Will it prompt the user first? And if so will
they be able to change their restriction later and how?
Cross domain scripting in a website is usually considered a big
no-no. But if I were to turn the same code into a metro app (since
presumably they're both written in Html 5 + js), does it mean I can
make ajax calls to any server irrespective of their domain? Is it
even possible to port a website into an app? If so how easy is that?
What about accessing local file system? Or does it have to go
through the contracts to do so?
And this is kind of related but if I were to write a website (not an
app). And the site was opened using Metro IE10, can it subscribe
into the metro specific js events? I guess I'm trying to figure out
how to save cost by doing as little development as possible. I
prefer a website that can target multiple platforms and only target
specific platform for the features that absolutely require it - also
not to thrilled with the idea of having to go through microsoft in
order to publish my app.
Any help appreciated.
Metro applications can call into web services located on other machines, but their ability to interact with the local machine is severely limited.
Similarly, accessing arbitrary parts of the local filesystem is not permitted. If your application has the documents (or music or photos) library permission, it can access the files in those libraries.