Comments (1)
Hello Pablo,
First of all, Pistache
really does not have anything to do with redis as its job is to serve http requests only.
Now, to answer your question more deeply, yes, it is possible to access a Redis database asynchronously through hiredis
. To give you a little more insight on that, I especially implemented the Reactor
system with that in mind. I wanted to give users a way to plug their custom asynchronous logic through Pistache's event-loop. For example, let's say that you have a fd
that represents a TCP connection to a Redis database and would like to be notified when something happens to that FD (when it becomes readable because a command returned data). You could use the Reactor
provided by Pistache to insert your fd in Pistache's event-loop in Polling::Read
mode and then install your own Handler
to handle events from that FD.
Now, for that to work, I would need to fix issues discovered by #20 (comment)
Let me know if you would be interested in working on that (providing a sample Redis asynchronous API sample use-able through the Pistache's event-loop), as it would be a great example on how to use the Reactor
for your own use-cases.
from pistache.
Related Issues (20)
- "Stack smashing detected" error in ubuntu docker container HOT 17
- New release to conan HOT 1
- keep alive timeout doesn't add to response header
- Pistache very poor performance when POST size exceeds `Endpoint::options().maxRequestSize()`, and `maxRequestSize` is large. HOT 4
- Out of bound read in std::strtol while parsing HTTP requests HOT 4
- Endpoint::Options::backlog_ is not used HOT 2
- What's up with the logging? HOT 3
- [FEATURE REQUEST] Add support for zstd compression
- ci: coverage fails on debian:testing runners HOT 3
- Cant stream MJPEG with multipart/x-mixed-replace HOT 2
- releasing / tagging HOT 1
- Pistacheio support for QNX HOT 1
- “stack smashing detected” error when processing Get requests via generated-cpp-pistache-server HOT 6
- failed to build example HOT 4
- add support for `meson wrap` HOT 4
- Error When Installing HOT 4
- Error When Installing
- Pistache when compiled with SSL gives SIGABRT when, its .so files are called to init a server. HOT 3
- *** stack smashing detected ***: terminated when using Router HOT 4
- Data race in Pistache::Rest::Router::route HOT 1
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 pistache.