network-services
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "network-services", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "", | ||
"main": "./dist/index.js", | ||
"scripts": { | ||
"test": "cd ./tests/test && npm run clean:build && npm start", | ||
"clean": "rm -rf ./dist/*", | ||
@@ -8,0 +9,0 @@ "build": "tsc --build .", |
@@ -5,3 +5,3 @@ # *Network⬄Services* | ||
## Introduction | ||
*Network-Services* provides a simple and intuitive toolkit that makes scaling your app and connecting your app to the network *easy*. You can use *Network-Services* to transform your application into a network connected [Service App](#service-app). You can connect to your Service App, from the same process or another process, and call methods on it using a type-safe [Service API](#service-api). | ||
*Network-Services* provides a simple and intuitive toolkit that makes connecting your app to the network *easy*. You can use *Network-Services* to transform your application into a network connected [Service App](#service-app). You can connect to your Service App, from the same process or another process, and call methods on it using a type-safe [Service API](#service-api). You can optionally use a [Service Pool](#service-pool) to scale your Service App. | ||
@@ -14,6 +14,6 @@ A *Network-Services* app can be explained with a complete and simple example. In the "Hello, world!" example shown below, a Greeter Service App is hosted on 127.0.0.1:3000 and its `greeter.greet` method is called over a `net.Socket` using a Service API of type `Greeter`. | ||
- Type-safe APIs: *code completion*, *parameter types*, and *return types*. | ||
- **Easily scale your Service App using a [Service Pool](#scaling).** | ||
- Return values *and* Errors are marshalled back to the caller. | ||
- Infinite property nesting; you can use a Service API to call *nested* properties on a Service App at any depth. | ||
- Bi-directional asynchronous RPC over TCP. | ||
- Easily scale your Service App using a [Service Pool](#scaling). | ||
- Return values *and* Errors are [marshalled](#marshalling) back to the caller. | ||
- Infinite [property nesting](#use-network-services-to-create-an-api-with-a-nested-method-example); you can use a Service API to call *nested* properties on a Service App at any depth. | ||
- [Bi-directional](#use-network-services-to-create-bi-directional-type-safe-apis-example) asynchronous RPC over TCP. | ||
- [Security](#security) can be implemented using the native Node [TLS module](https://nodejs.org/docs/latest-v20.x/api/tls.html) (i.e., TLS and Client Certificate Authentication). | ||
@@ -48,3 +48,3 @@ - A configurable [message protocol](#message-protocol). You can marshal your messages however you choose (e.g., JSON, binary, etc.), or use the default *minimalist* JSON message protocol. | ||
- [Restrict API calls at runtime.](#restrict-api-calls-at-runtime) | ||
- [Specify an `ingressQueueLimit` and `egressQueueLimit` in the Service options.](#specify-an-ingressqueuesizelimit-and-egressqueuesizelimit-in-the-service-options) | ||
- [Specify an `ingressQueueSizeLimit` and `egressQueueSizeLimit` in the Service options.](#specify-an-ingressqueuesizelimit-and-egressqueuesizelimit-in-the-service-options) | ||
- [Best Practices](#best-practices) | ||
@@ -212,3 +212,3 @@ - [Create a TypeScript interface for your Service API.](#create-a-typescript-interface-for-your-service-api) | ||
## Scaling | ||
*Network-Services* was architected in order to support a variety of scaling models. The model implemented by the utility [Service Pool](#service-pool) facility, which supports request-response messaging, is just one of many possible approaches to scaling an application built on *Network-Services*. For example, a Service Pool implementation where there is a one-to-one relationship between Service APIs and Service Apps would permit bi-directional communication. An alternative approach may be to run multiple servers in separate processes or Worker threads, connect to each of them, and round-robin through the respective Service APIs. Likewise, a container orchestration framework could be used to easily scale a *Network-Services* app. | ||
*Network-Services* is architected in order to support a variety of scaling models. The model implemented by the utility [Service Pool](#service-pool) facility, which supports request-response messaging, is just one of many possible approaches to scaling an application built on *Network-Services*. For example, a Service Pool implementation where there is a one-to-one relationship between Service APIs and Service Apps would permit bi-directional communication. An alternative approach may be to run multiple servers in separate processes or Worker threads, connect to each of them, and round-robin through the respective Service APIs. Likewise, a container orchestration framework could be used to easily scale a *Network-Services* app. | ||
@@ -215,0 +215,0 @@ Complexities arise when muxing many-to-many relationships; hence, please see the simple and capable [`ServicePool`](https://github.com/faranalytics/network-services/blob/main/src/service_pool.ts) implementation for relevant considerations if you wish to draft a custom implementation. |
73615