Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
razorframe
Advanced tools
####Empowering real-time databases in Node.js
###Description
Razorframe is a Javascript library built on Node.js which enables developers to build a real-time client experience while maintaining traditional database implementations such as SQL.
We use a messaging queue, called a razorframe, that intercepts incoming user interactions over a two-way socket channel. Those interactions are held in the queue only as long as the server needs before dequeuing. The dequeuing process then triggers an event that both updates the client UI and launches an asynchronous back-end process such as a database write.
Our tests have shown this process keeps the client UI updating in sub 100ms "real-time" fashion at scale while maintaining accurate database writes.
###Installation Using npm:
$ npm i --save razorframe
###Example server.js:
const rz = require('razorframe');
/**
* config parameters - passes into rb any user-defined callbacks
* @param - {Object} http => instantiate an http server
* @param - {Function} write => a DB write callback (user-defined)
* @param - {Function} show => a DB pull callback (user-defined)
*/
const config = {
write: addToDb,
show: showAll,
};
/**
* Instantiate razorframe passing in Node's http object
* (to connect with your server) as well as the config object
* which contains all the user-defined callbacks
*/
rz(http, config);
client.html:
<script src="/socket.io/socket.io.js"></script>
client.js:
const socket = io();
/**
* MSG parameters
* @param {string} MSG.contents => the message value
* @param {string} MSG.eventOut => the outbound event name
* @param {string} MSG.channel => the channel name
*/
textForm.addEventListener('submit', (e) => {
e.preventDefault();
const contents = textInput.value;
const eventOut = 'msgSent';
const channel = 'message-channel';
socket.emit('msgSent', { contents, eventOut, channel });
textInput.value = '';
});
###Platform Node.js
###Dependencies Socket.io
###Authors
Travis Huff
Eddie Park
Michael Sotkin
###Support
Tested in Chrome 55 & Node 6/7.
GitHub Issues: https://github.com/team-emt/razorframe/issues
###Contributions
❤️ Contributions welcome!
Please see out GitHub repo at: https://github.com/team-emt/razorframe
###License
MIT
FAQs
Empowering scalable, real-time web apps in Node.js
The npm package razorframe receives a total of 15 weekly downloads. As such, razorframe popularity was classified as not popular.
We found that razorframe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.