Comments (3)
I think it may be easier to go from a different angle: keep native drivers single-threaded, but allow running multiple native processes, which are controlled/scaled by Go driver server (the "stdio-to-gRPC proxy" that exists in every driver).
Scaling can be very naive: always keep 1 driver instance alive, if more requests arrive - run more processes inside the same container (up to the number of CPUs). Then, kill them immediately if no other requests are waiting to get a driver. More advance scaling will be done by K8S or other high-level system, allowing to keep the code simple.
This change can also be introduced incrementally, while keeping current bblfshd design.
As the next steps we may drop driver scaling in bblfshd completely and allow running only a single driver per language (multi-process, as proposed). This should still cover existing use case (saturating CPUs of a single server), while allowing to run and scale drivers separately in K8S.
The only missing piece after this is to implement driver discovery for K8S in any suitable way. We may or may not proxy traffic through bblfshd at that point.
from bblfshd.
This part should not touch k8s in any sense. In my opinion it's up to us how many CPU we allow to use (GOMAXPROCS). The whole thing sounds to me like a queueing system which we can implement. And we can handle number of processes which can pull tasks from the queue.
if one routine finished the task and wants to return to the pool we can close it or keep running and pull another task.
from bblfshd.
I'm mentioning K8S only to illustrate how this change can fit in the whole picture. It's not directly related.
Re: queueing, yes, this is more or less what I propose, at least if you mean implementing it in a Go process and not externally :)
from bblfshd.
Related Issues (20)
- install --all has the same effect as --recommended HOT 1
- bblfshd and go-client interdependency HOT 1
- Design/Prototype scalability and deployment support
- Design/Prototype local scalable environment
- Test scalability layers
- Drivers discovery mechanism HOT 2
- make test fails HOT 2
- cron job fails in Travis
- Is this still active? HOT 1
- Archive project(s)
- Ongoing maintenance of the Babelfish project HOT 6
- Driver instance not killed after deadline
- Cannot get latest version: module contains a go.mod file, so module path should be github.com/bblfsh/bblfshd/v2 HOT 5
- Security Issue: Request for contact
- bblfshd not run HOT 1
- https://doc.bblf.sh/ down?
- Babelfish run test error
- Is bblfshd dead? HOT 3
- The vulnerability CVE-2021-32825 has been fixed, but no specific tag denotes the patched version.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bblfshd.