pika icon indicating copy to clipboard operation
pika copied to clipboard

Support for unix socket

Open sprappcom opened this issue 2 years ago • 1 comments

Which PikiwiDB functionalities are relevant/related to the feature request?

No response

Description

Support unix socket, scenario is directly locally using unix://var/run/pika/pika.sock https://github.com/OpenAtomFoundation/pika/issues/414

because unix socket is faster and will be using custom proxy to proxy locally to pika.

using custom proxy to call pika instead of port. results should be faster by 2x. also local implementation of single pika instance will also be 2x faster.

Proposed solution

Support unix socket, scenario is directly locally using unix://var/run/pika/pika.sock

Alternatives considered

using default tcp but it's slow

sprappcom avatar Jan 23 '24 05:01 sprappcom

i try simple change bind,it almost no different with use lo 127.0.0.1 sockfd_ = socket(AF_UNIX, SOCK_STREAM, 0); memset(&servaddr_un, 0, sizeof(servaddr_un)); char tmpPath[128]; memset(tmpPath,0,sizeof(tmpPath)); sprintf(tmpPath,"/tmp/pika_%s:%d",bind_ip.c_str(),port_);****

sailornet avatar Jan 26 '24 09:01 sailornet