
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ataraxia-services
Advanced tools
Services with RPC and events for an Ataraxia network.
To use services on top of a network install ataraxia-services
:
npm install ataraxia-services
Services can then be consumed and registered by creating a Services instance on top of the network:
import { Services, ServiceContract, stringType } from 'ataraxia-services';
const net = ... // setup network with at least one transport
const services = new Services(net);
services.onServiceAvailable(service => console.log(service.id, 'is now available'));
services.onServiceUnavailable(service => console.log(service.id, 'is no longer available'));
// Join the network
await net.join();
// Join the services layer on top of the network
await services.join();
// Use contracts to describe services
const EchoService = new ServiceContract()
.defineMethod('echo', {
returnType: stringType,
parameters: [
{
name: 'message',
type: stringType
}
]
});
// Easily register and expose services to other nodes
services.register('echo', EchoService.implement({
echo(message) {
return Promise.resolve(message);
}
}));
// Consume a service registered anywhere, local or remote
const echoService = services.get('echo');
if(echoService.available) {
// Call methods
await echoService.call('echo', 'Hello world');
// Or create a proxy for a cleaner API
const proxied = echoService.as(EchoService);
await proxied.echo('Hello world');
}
FAQs
Services with RPC and events over Ataraxia mesh network
We found that ataraxia-services demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.