alibaba / alibaba/PhotonLibOS

Photon and ZeroMQ

Open
#833 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.2k
Forks
179
Avg merge
1d 15h
Merged PRs (30d)
26

Description

Hello there:

ZeroMQ sockets could be used to facilitate implementing variety of scenarios easily. So for testing purposes, the integration with Photon has been done successfully at first attempt. But for more complex cases, a cascading event io has been used to integrate multiple ZMQ router sockets. The relevant file descriptors also have been registered accordingly. The master engine is uring, cascading is epoll and photon event loop used for notifications. It would be helpful to know that a fd_context has been developed which is a base of NotificationContext to make notifications faster without checking each event data as are out of order. A tiny client has been developed for testing purposes as a dealer which is a good fit for router socket. But the event engine is behaving somehow strange. The read event has been notified successfully but when a single read operation used to receive frames from router socket in none blocking mode, first frame is route id and second frame is actual data, then nothing is received. The event loop also checked for errors and returns used for event loop operation. If read operation has been done twice sequentially then it works. The integration nicely works without cascading.

Any feedback would be welcome.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the tiny ZeroMQ dealer/router case with Photon, including the cascading epoll and uring event engines described in the report. Trace read-event notifications and successive nonblocking receives; done means identifying and fixing the condition that prevents the next frame from being received, then confirming the behavior with and without cascading.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.