All Projects → soapdog → nodejs-rust-sample-module

soapdog / nodejs-rust-sample-module

Licence: other
A sample node module built with Rust. Calculates the closest airport to a given latlon coordinate.

Programming Languages

HTML
75241 projects
rust
11053 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nodejs-rust-sample-module

SampleProject
A starter project for Sample Project in Objective C. Objective C version of https://github.com/xeieshan/SwiftySampleProject
Stars: ✭ 31 (+72.22%)
Mutual labels:  sample-code
ui5-webcomponents-sample-vue
UI5 Web Components Sample TODO application built with Vue.
Stars: ✭ 52 (+188.89%)
Mutual labels:  sample-code
dbus-sample
Sample C/C++ code for basic D-Bus use case
Stars: ✭ 76 (+322.22%)
Mutual labels:  sample-code
smb-summit-hackathon
Build Blocks for the SAP SMB Summit Hackathons.
Stars: ✭ 23 (+27.78%)
Mutual labels:  sample-code
opendaylight-sample-apps
Sample applications for use with OpenDaylight (https://www.opendaylight.org/)
Stars: ✭ 56 (+211.11%)
Mutual labels:  sample-code
ui5-cap-event-app
Showcase of SAP Cloud Application Programming Model and OData V4 with draft mode in a freestyle SAPUI5 app and an SAP Fiori elements app.
Stars: ✭ 70 (+288.89%)
Mutual labels:  sample-code
xf-application-mocks
Contains lightweight substitutes for SAP applications to ease the development and testing of extension and integration scenarios. In conjunction with SAP Business Technology Platform, kyma runtime, the efficient implementation of application extensions is supported without the need for real SAP applications being accessible during development.
Stars: ✭ 21 (+16.67%)
Mutual labels:  sample-code
Myapplications
My Tutorials
Stars: ✭ 50 (+177.78%)
Mutual labels:  sample-code
ui5-webcomponents-sample-angular
UI5 Web Components Sample TODO application built with Angular.
Stars: ✭ 34 (+88.89%)
Mutual labels:  sample-code
btp-workflow-management-opensap
This repository contain the exercises for the openSAP course "Improve Business Processes with SAP Workflow Management."
Stars: ✭ 30 (+66.67%)
Mutual labels:  sample-code
uxp-photoshop-plugin-samples
UXP Plugin samples for Photoshop 22 and higher.
Stars: ✭ 131 (+627.78%)
Mutual labels:  sample-code
pragmaconf17
A collection of slide decks, videos and other material from the Pragma Conference 2017 talks
Stars: ✭ 39 (+116.67%)
Mutual labels:  sample-code
truevault-react-js-sample-app
A React Sample Application that integrates with TrueVault for HIPAA Compliance
Stars: ✭ 27 (+50%)
Mutual labels:  sample-code
abap-alv-google-upload-sheet
Sample demonstrating export of ALV Grid data from SAP GUI directly to Google Drive and display exported data snapshots automatically in Google Sheets.
Stars: ✭ 24 (+33.33%)
Mutual labels:  sample-code
blockchain
No description or website provided.
Stars: ✭ 28 (+55.56%)
Mutual labels:  sample-code
abap-exercises-codejam
Material for CodeJams on SAP Business Technology Platform, ABAP Environment and ABAP RESTful Application Programming Model.
Stars: ✭ 25 (+38.89%)
Mutual labels:  sample-code
abap-platform-jak
The JSON ABAP Konverter
Stars: ✭ 16 (-11.11%)
Mutual labels:  sample-code
cloud-mdk-tutorial-samples
Sample from the SAP mobile development kit tutorials demonstrating various components and features of the MDK in the context of an enterprise mobile solution.
Stars: ✭ 16 (-11.11%)
Mutual labels:  sample-code
iot-edge-samples
Showcase of various extension scenarios for SAP IoT Edge, intelligent edge computing software that provides "microservices at the edge" for Internet of Things (IoT).
Stars: ✭ 16 (-11.11%)
Mutual labels:  sample-code
cloud-workflow-samples
Workflow sample projects as reference content. Users can download and import the content of this project to their tenant to understand and learn how to consume workflow.
Stars: ✭ 52 (+188.89%)
Mutual labels:  sample-code

Find Airports Close to You Webapp

This is a sample webapp to demonstrate the usage of Rust 🦀-based modules with NodeJS webapps.

How the algorithm works

There is a CSV file containing about 46.000 airports. For each record we have a lot of data, including its Latitude and Longitude.

Our algorithm is quite naive and there is a lot of room for improvements. Basically, we parse the CSV file into a large array of objects and then iterate over this array doing some math to calculate the Harversine distance between your location and the airport, if it is below 30km then that airport is included in the results.

There is no parallelism involved even though it would speedup the code a lot.

REMARK: Of course there are tons of ways of solving this, going from having it all in an Oracle database with some functions in PL/SQL to calculate everthing with a simple SELECT to having a ton of microservices or serverless lambda functions figuring this out using some third-party API you have no control of. The main objective of this sample, is to show how easy it is to build Rust-based NodeJS modules by presenting an useful and rich sample.

How to setup

You need both NodeJS and Rust installed for this to work. You also need Neon Bindings to be able to compile the Rust code.

Use:

$ npm install

To install all the required NodeJS modules. To build the Rust-based module using Neon Bindings:

$ neon build

Run the application with:

$ node index.js
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].