-
Notifications
You must be signed in to change notification settings - Fork 19
Implement core functionalities of the IO component in scaler - YMQ #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 48 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
8d073fd
Update to use g++-14 to compile instead of the defaulted g++-13 etc.
gxuu 12e938c
Use CMAKE_BUILD_TYPE as the source of truth for what build we are on
gxuu 6ade637
Update TODOs and DONEs in readme
gxuu 20ad885
Implement C++ core of YMQ network library
gxuu f22c87e
Update pymod io_context to make sure the code compiles (TMP FIX!)
gxuu af10dcb
Provide basic examples on how to use YMQ in C++
gxuu d543515
Bump version number
gxuu 9d2c2cd
Add qualifiers and attributes to functions (noexcept, nodiscard, etc.)
gxuu 2e17a4e
Change calls to move_only_functions so functions are not copied
gxuu 0623285
Extract TCP Operations to their own header
gxuu f3eeb9f
Implement IOSocketType behavior in YMQ
gxuu b5395d8
Even Unicast and Multicast needs to handle reconnect
gxuu c114aad
Add pub-sub examples to demonstrate socket types
gxuu 5ed6284
upd readme (need rebase later)
gxuu d96e506
Improve the examples
gxuu fa51f60
Change to new socket types Binder and Connector
gxuu d9dcb9b
Refactor: MessageConnectionTCP is easier to construct correctly
gxuu 734cc7b
upd readme (need rebase later)
gxuu 5c48a19
Implement ISO 8601 conforming timestamp output
gxuu aab4c0f
Reference implementation of the error type
gxuu d12def6
Example usage to the error type
gxuu 4ca3b66
upd readme (need rebase later)
gxuu a1b8926
Make comments better looking
gxuu 83cb911
fixup! Reference implementation of the error type
gxuu 849b952
fixup! Example usage to the error type
gxuu 413673b
Merge branch 'main' into ymq
gxuu 37206f8
Use switch on enum to handle error->explanation translation
gxuu c8c51cb
Merge branch 'ymq' of github.com:gxuu/scaler into ymq
gxuu 5488320
use std::string_view instead of const char*
gxuu 5226fd6
Fix off by one error when getting format string
gxuu b13ce76
Refinements on Error implementation
gxuu 168e1b2
Refactor: Put network utils in their own file
gxuu c956839
Refactor: createIOSocket takes a callback and returns nothing
gxuu 155aef1
Remove unneeded comments
gxuu fb2d15d
Fix pymod ymq build due to namespace change
gxuu 97c6291
Add namespace scaler::ymq for every file
gxuu 9145405
Refactor: Extract common part of examples to header file
gxuu 2f5e94a
check epoll_wait calls return value
gxuu e658389
Update automated examples
gxuu e32ac2a
Fixup typo found in logging.h
gxuu b009c17
Fix: send/recv were implemented incorrectly but not shows up in low tp.
gxuu ceecfc2
Fix bugs for not adding the correct offset (Thanks magniloquency!)
gxuu adb685c
Update the exmaple to mimic high throughput scenario
gxuu fd33915
Make sure onRead returns early when socket is closed and set to 0
gxuu 18f6cf3
Update automated example to not use hard coded address in syncBindTo
gxuu bc4f33f
Update error's implementation
gxuu dc7ecad
Implement error abort for syscalls
gxuu cc483a6
Fix: Did not return when receiving EAGAIN
gxuu 75e7938
Add notice with respect to thread safety of methods
gxuu 8c4f494
Remove unneeded IOSocketType(s)
gxuu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,29 @@ | ||
| #pragma once | ||
|
|
||
| // C++ | ||
| #include <functional> | ||
| #include <memory> | ||
| #include <string> | ||
|
|
||
| namespace scaler { | ||
| namespace ymq { | ||
|
|
||
| class EpollContext; | ||
| class Message; | ||
| class IOSocket; | ||
|
|
||
| struct Configuration { | ||
| using PollingContext = EpollContext; | ||
| using Identity = std::string; | ||
| using PollingContext = EpollContext; | ||
| using IOSocketIdentity = std::string; | ||
| using SendMessageCallback = std::move_only_function<void(int)>; | ||
| using RecvMessageCallback = std::move_only_function<void(Message)>; | ||
| using ConnectReturnCallback = std::move_only_function<void(int)>; | ||
| using BindReturnCallback = std::move_only_function<void(int)>; | ||
| using CreateIOSocketCallback = std::move_only_function<void(std::shared_ptr<IOSocket>)>; | ||
| using TimedQueueCallback = std::move_only_function<void()>; | ||
| using ExecutionFunction = std::move_only_function<void()>; | ||
| using ExecutionCancellationIdentifier = size_t; | ||
| }; | ||
|
|
||
| } // namespace ymq | ||
| } // namespace scaler |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.