# "*": "https://raw.githubusercontent.com/wefindx/schema/master/project/oo-item.yaml" # "base:title": "0oo - Efficient multithreaded server" "og:title": "Efficient multithreaded server" "og:description": "I have some epoll server code that I tweaked to run the server in a thread. Now I'm taking this code and changing it so that each client connection is multiplexed by multiple threads." "og:image": "https://avatars0.githubusercontent.com/u/28134655" "og:url": "/intent/53001/" "base:css": "/static/css/bootstrap.min.9c25540d6272.css" "base:extra-css": "/static/css/base.57997aeac1df.css" "base:favicon": "/static/favicon.acaa334f0136.ico" "base:body_class": "" "layout:logo": "/static/0oo.8d2a8bbef612.svg" "layout:index": "/" "layout:menu": "/menu/" "layout:categories": "/intents/" "layout:ideas": "/methods/" "layout:projects": "/projects/" "layout:users": "/users/" "layout:about": "/about/" "layout:help": "/help/" "layout:bug_report": "https://github.com/wefindx/0oo" "layout:login": "/accounts/login/" "layout:light-off": "/darken/?darken=true" "layout:set-monolingual": "/mulang/?mulang=false" "layout:lang": "Language" "layout:set-language-post-action": "/i18n/setlang/" "layout:csrf-token": "TZGWG5X4pk9KRExfkhpasP82c4A8u0s7stCTRb3FwGVatXfxjCRk876KfNq3QZmk" "layout:input-next": "/project/53001/" "layout:languages": [{"code": "ja", "is-active": "false", "name": "日本語"}, {"code": "lt", "is-active": "false", "name": "Lietuviškai"}, {"code": "zh-hans", "is-active": "false", "name": "简体中文"}, {"code": "en", "is-active": "true", "name": "English"}, {"code": "ru", "is-active": "false", "name": "Русский"}, {"code": "oo", "is-active": "false", "name": "O;o,"}] # "item:title": "Efficient multithreaded server" "item:score": -7.0 "item:mission": "Use epoll and pthread to create a multithreaded multiplexed connection server" "item:permalink": "/project/53001/?l=en" "item:base-administration": false "item:body": | I have some epoll server code that I tweaked to run the server in a thread. Now I'm taking this code and changing it so that each client connection is multiplexed by multiple threads. "item:destinations": | "item:source-date": "" "item:permalink": "/method/53001/?l=en" "item:owner": "chronological" "item:created": "2022-08-20T06:48:55.342794" "item:ownerlink": "/user/198/chronological" # "item:result:items": - "id": "t-147001" "url": "https://github.com/samsquire/epoll-server" "text": | I updated epollserver to multiplex client sockets across threads. "cost": -7.0 "currency": "HUR" "assets": | The idea is that each thread has a ringbuffer, when a socket is accepted, a message is put on the ringbuffer and the thread begins listening to that user. All the other threads are notified of all the users so they can also echo data to them. This is efficient as a thread can serve thousands-millions of connections and there are multiple threads. One problem, which is a generic problem for multithreading is servicing one of multiple kinds of events from one thread. I rely on the fact I am polling a ringbuffer and epoll. "owner": "chronological" "ownerlink": "/user/198/chronological" "permalink": "/project/53001/?l=en#t-147001" "created": "2022-08-21T09:05:07.479929" "happened": "2022-08-21T08:59:52" "models": "item:result:add": "/admin/hlog/task/add/?parent=53001" "item:transfer:items": "item:transfer:add": "/admin/hlog/operation/add/?parent=53001" "item:comment:add": "/projects/addnote?parent=53001" "item:comment:add:csrf_token": "TZGWG5X4pk9KRExfkhpasP82c4A8u0s7stCTRb3FwGVatXfxjCRk876KfNq3QZmk" "item:comment:form": |
  • Mark if the comment raises new questions.
  • Mark if the comment contributes potential solutions.
  • Mark if the comment contributes facts for reasoning.
  • Mark if the comment contributes tasks for doing.
  • Please, log in. # "comments": "base:js": "/static/js/base.c7357c06cc89.js"