robertbetts / nuropb Goto Github PK
View Code? Open in Web Editor NEWA Distributed Event Driven Service Mesh
Home Page: https://nuropb.readthedocs.io/en/latest/
License: Apache License 2.0
A Distributed Event Driven Service Mesh
Home Page: https://nuropb.readthedocs.io/en/latest/
License: Apache License 2.0
To initialize the a client instance of the library as a minimum you'd do the following.
from nuropb.rmq_api import RMQAPI
amqp_url = "amqp://guest:guest@localhost:5672/nuropb"
client_api = RMQAPI(
amqp_url=amqp_url,
)
await client_api.connect()
It would be very useful to be able to do the following, especially when working within notebooks
from nuropb import RMQAPI
client_api = RMQAPI()
await client_api.connect()
or even:
import nuropb
client_api = await nuropb.connect()
The ask covers two concepts:
The imports required when using the library can be somewhat clunky.
Something like this might make things simpler, making use of reasonable default and or specified environment parameters
import nuropb
npb_api = nuropb.client_connect()
In addition for basic service usage perhaps:
import nuropb
def my_event_handler(topic, event, context, target, trace_id):
pass
npb.api = nuropb.service_connect(
service_name="my-test-service",
event_subscriptions=["service-one.topic-i-like"],
event_handler=my_event_hander,
)
Question 1: Should a nuropb service mesh connection be able to make a request to itself when instantiated as a service ?
Question 2: Should a nuropb service mesh connection be able to subscribe to event topics, that it publishes ?
This is not a debate on conceptually how should these scenarios be handled, and the opinion of the team is that answering yes in both cases is bad practice.
The consideration is whether or not to implement restrictions aimed at preventing these two scenarios, either within the code base or by introducing topic naming and exchange binding conventions that prevent circular flows. Alternatively, should the current more "open" approach continue, leaving the decision to the implementation in deciding on the approach and patterns to follow?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.