lega911 / ijson Goto Github PK
View Code? Open in Web Editor NEWInverted json - lightweight and blazing fast message-broker
License: MIT License
Inverted json - lightweight and blazing fast message-broker
License: MIT License
I'm honestly really like this project as it's fast and simple. But I'm still a bit reluctant in using it as the replacement for my current Redis pub/sub setup. It'll be quite helpful if there is a perf comparison with Redis pub/sub.
One more issue is that, as I'm planning to use it on production, I'm a bit afraid of this project being abandoned.
If me, a customer, send a GET request with type: get
, I can, basically, intercept any message sent to the server (because I'm registering myself as a worker).
Is that right?
There is absolutely no security at all to register a worker????
Опять же есть пример на python:
import requests
s = requests.Session()
# send request to get first task with worker-mode (type = 'worker')
req = s.post('http://127.0.0.1:8001/msg/hello', headers={'type': 'worker'}).json()
while True:
result = {'result': 'Hello ' + req['name'] + '!'}
# send result, and receive next task
req = s.post('http://127.0.0.1:8001', json=result).json()
Что происходит здесь? Чтобы можно было воспроизвести на других языках. Конструкции requests.Session() нет например в nodejs. Там заголовки устанавливаются или куки или еще что?
Постоянно получаю 503 Service Unavailable после того как получил задачу и пытаюсь вернуть ответ.
Is there stream support? If not, is it planned?
В README.md есть пример:
# 2. a client invokes the command
curl localhost:8001/test/command -d '{"id": 123, "params": "test data"}'
Как получить ошибку на клиенте если воркер падает с ошибками?
Как пример в логи inverted json падает:
400 no id for /rpc/result
Клиент так и остается ждать ответа, это повторяется бесконечно.
This looks good, specially the performance part.
What is the recommended way to handle the Authentication / Authorization with this? For example, how do we allow only valid uses to make the RPC calls?
In typical HTTP requests, we usually get to handle the JWT issuance / verification in the pre-request handle hooks. Is it possible to have a pre-request webhook that can be handled before the actual worker code is executed?
For example, would like to have the JWT be verified in a node.js server before getting the RPC actually invoked.
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.