https://github.com/aesalazar/nodeelectronopenfinwebperformance
Simple Performance Measurement with Node.js, Electron, OpenFin and Web that can run in Windows, Linux, or macOS
https://github.com/aesalazar/nodeelectronopenfinwebperformance
Last synced: about 1 month ago
JSON representation
Simple Performance Measurement with Node.js, Electron, OpenFin and Web that can run in Windows, Linux, or macOS
- Host: GitHub
- URL: https://github.com/aesalazar/nodeelectronopenfinwebperformance
- Owner: aesalazar
- Created: 2016-11-02T21:47:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-21T00:18:57.000Z (over 8 years ago)
- Last Synced: 2025-04-11T22:38:45.990Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 4.28 MB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Performance Measurements in Node.js, OpenFin, Electron, and Web
This project is intended to demonstrate the ability of a single node.js server with a single code-based to run in OpenFin and Electron desktop applications as well as any modern web browser simultaneously.The OpenFin RVM (the ability to dynamically build the installation package via URL) is currently only available for the Windows OS but the company promises to release Mac and Linux versions in the near future. But if you wish to run in those OSs you can manually launch following these instructions: OpenFin CLI for Windows, Mac, and Linux
The Electron version will compile and run based on the OS you are running this project in. It has been tested with in Windows 10, Mac OS X, and Ubuntu Desktop 16 LTS.
More detailed breakdowns of different parts of the code can be read here:
* Measuring application performance in Node.js, Web and OpenFin
* Electron: Create a single app for Windows, Linux, and MacApplication screenshots:
The project itself performs basic time calculations measuring client, server, and network latencies. A data stream is opened by the client via web-sockets upon which the server sends updates at regular intervals. The updates on the server and the client are both intentionally time consuming so as to generate viable measurements (milliseconds).
Since they are running inside chromium-based OpenFin and Electron APIs they can be written using pure HTML5. And because it is JavaScript and CSS the code can also be ran in any modern web browser achieving greater than 99% reuse.
This was built in Visual Studio Code but can be ran like any other node project. It is using node.js version 6 and the client requires support for Web Workers and the performance.now() function. To start remember to first run
`npm install`
to get needed dependencies and then
`npm start`
to start the server. If running in VS Code the launch.json file is already configure so simply press F5.
Once started, it will create an HTTP and WebSocket server listening on port:
```javascript
//Port settings
const webPort = 5000;
```To test electron in development without having to build the installation package run:
`npm run electron`
To test the openfin in development via the CLI (note this will still perform an installation) run:
`npm run openfin`
For OpenFin and Electron installation packages, navigate to `http://localhost:5000/install`, click the Download buttons and follow the instructions to complete installation. For electron it can take a minute or so to build the package once started but the browser will prompt for download when ready.
For the web version, simply navigate to `http://localhost:5000/`. This will show the same single page seen in the desktop versions.
In any application click the Open Data Stream button to begin generating time measurements.
Additional resources:
* Eikos Partners Homepage
* OpenFin Homepage
* OpenFin Developers Documentation
* Electron Homepage
* Electron Developers Documentation