Skip to content
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

update actor #147

Merged
merged 143 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 128 commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
c9f742a
change preimage size to data count
MacOMNI Aug 19, 2024
78c8816
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 20, 2024
b0804b5
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 21, 2024
98897c7
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 22, 2024
f0423dc
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 22, 2024
6315754
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 23, 2024
87acd80
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 26, 2024
c59a82f
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 27, 2024
6d4fd70
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 27, 2024
76984e2
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 28, 2024
d2ebd09
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 29, 2024
15b60fb
update
MacOMNI Aug 29, 2024
7d54e13
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 29, 2024
7e0c3cd
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 30, 2024
1e85be6
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 30, 2024
2b654c4
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Aug 31, 2024
e05af5c
update ignore
MacOMNI Aug 31, 2024
992d120
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 2, 2024
1fffaff
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 2, 2024
31bb085
Merge branches 'master' and 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 3, 2024
9304473
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 4, 2024
cf144ed
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 5, 2024
c5e78a5
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 5, 2024
65486ff
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 6, 2024
b3af474
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 9, 2024
df0a630
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 11, 2024
a59766e
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 13, 2024
5b66d0d
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 17, 2024
4033c58
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 19, 2024
32518e8
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 20, 2024
60862b8
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 23, 2024
3469c60
update msquic
MacOMNI Sep 24, 2024
dec7e6d
update readme
MacOMNI Sep 24, 2024
af53dee
update quic more test
MacOMNI Sep 24, 2024
d73f276
update submodule
MacOMNI Sep 24, 2024
5ba1ab3
update quic
MacOMNI Sep 24, 2024
a727ef3
update submodule
MacOMNI Sep 24, 2024
a80768f
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 24, 2024
5358461
Merge branch 'master' into dev_mackun
MacOMNI Sep 24, 2024
180926c
update msquic
MacOMNI Sep 24, 2024
08588ab
update alpn
MacOMNI Sep 24, 2024
62a5ed3
update alpn
MacOMNI Sep 24, 2024
cfbda13
update alpn
MacOMNI Sep 24, 2024
68c904f
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 24, 2024
d846f2d
Merge branch 'master' into dev_mackun
MacOMNI Sep 24, 2024
724d7d1
update quic client
MacOMNI Sep 25, 2024
b292d81
update atomic
MacOMNI Sep 25, 2024
ae47b0a
update atomic array & dictionary
MacOMNI Sep 25, 2024
9e96332
Update AtomicArray.swift
MacOMNI Sep 25, 2024
aa58e5f
Update AtomicDictionary.swift
MacOMNI Sep 25, 2024
c672c6d
update atomic test
MacOMNI Sep 25, 2024
515e813
update test
MacOMNI Sep 25, 2024
9497f70
update for each test
MacOMNI Sep 25, 2024
b594ae9
Update AtomicDictionaryTests.swift
MacOMNI Sep 25, 2024
b0e16bb
Update Networking/Sources/Networking/msquic/QuicClient.swift
MacOMNI Sep 25, 2024
e54eac4
Update Networking/Sources/Networking/msquic/QuicClient.swift
MacOMNI Sep 25, 2024
b4a4e25
Update NetAddr.swift
MacOMNI Sep 25, 2024
f3a42a0
Update QuicConfig.swift
MacOMNI Sep 25, 2024
cad71d7
update quic
MacOMNI Sep 25, 2024
bd5aaca
Merge branches 'dev_mackun' and 'dev_mackun' of github.com:AcalaNetwo…
MacOMNI Sep 25, 2024
a926289
update quic client
MacOMNI Sep 25, 2024
bd61408
update quicconfig
MacOMNI Sep 25, 2024
9ff28d8
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 25, 2024
ade33db
Merge branch 'master' into dev_mackun
MacOMNI Sep 25, 2024
950ec28
Update Networking/Sources/Networking/msquic/QuicConfig.swift
MacOMNI Sep 25, 2024
59abc54
update quic client
MacOMNI Sep 25, 2024
6fecc3e
Merge branch 'dev_mackun' of github.com:AcalaNetwork/boka into dev_ma…
MacOMNI Sep 25, 2024
4412d30
update quic config
MacOMNI Sep 25, 2024
e7ee0c9
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 25, 2024
bb20033
Merge branch 'master' into dev_mackun
MacOMNI Sep 25, 2024
e7138eb
update peer2peer
MacOMNI Sep 26, 2024
bb7fc62
update quic server & peer
MacOMNI Sep 26, 2024
bb38cdc
Update Networking/Sources/Networking/Peer.swift
MacOMNI Sep 26, 2024
1f11bed
Update Networking/Sources/Networking/Peer.swift
MacOMNI Sep 26, 2024
e717bf4
Update Networking/Sources/Networking/msquic/QuicListener.swift
MacOMNI Sep 26, 2024
846bed0
update peer
MacOMNI Sep 27, 2024
589a1b6
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Sep 27, 2024
d2cb713
Merge branch 'master' into dev_mackun
MacOMNI Sep 27, 2024
d2577ee
update quic listener
MacOMNI Sep 27, 2024
f371892
update sh
MacOMNI Sep 27, 2024
fabd878
dev_actor
MacOMNI Sep 27, 2024
cc7d5d6
update quic server
MacOMNI Sep 29, 2024
b7b5c3e
udpate peer
MacOMNI Sep 29, 2024
a3dbe4e
update peer
MacOMNI Sep 29, 2024
68c2579
update server
MacOMNI Sep 29, 2024
00445d7
update quic client
MacOMNI Sep 29, 2024
cf03d63
update client
MacOMNI Sep 29, 2024
0f31614
update actor
MacOMNI Sep 29, 2024
4b3b4e3
udpate peer & client
MacOMNI Sep 29, 2024
2a69adb
update peer2peer
MacOMNI Sep 30, 2024
47911af
update peer
MacOMNI Sep 30, 2024
8d02528
update peer test
MacOMNI Sep 30, 2024
af7e1b9
update peer
MacOMNI Sep 30, 2024
43eed0f
update quic connection
MacOMNI Sep 30, 2024
7559804
update peer
MacOMNI Sep 30, 2024
231dc46
update peer
MacOMNI Sep 30, 2024
2b67767
update quic client
MacOMNI Sep 30, 2024
4ad83f3
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Oct 4, 2024
7d33357
Merge branch 'master' into dev_actor
MacOMNI Oct 4, 2024
60a2135
update peer
MacOMNI Oct 4, 2024
2f8c4f8
update peer test
MacOMNI Oct 4, 2024
c1da2ff
update peer
MacOMNI Oct 4, 2024
188c6e4
update peer
MacOMNI Oct 4, 2024
07b055b
update peer
MacOMNI Oct 5, 2024
337b799
update peer
MacOMNI Oct 6, 2024
6f91f98
update quic client
MacOMNI Oct 6, 2024
cc2b8b4
update quic
MacOMNI Oct 6, 2024
67b1206
update peer
MacOMNI Oct 6, 2024
4b9acfe
Merge branch 'dev_actor' into dev_mackun
MacOMNI Oct 6, 2024
7debd7d
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Oct 6, 2024
e3fd884
Merge branch 'master' into dev_mackun
MacOMNI Oct 6, 2024
0a8f01e
update peer
MacOMNI Oct 7, 2024
f6168a2
update quicclient
MacOMNI Oct 7, 2024
4ab5628
QuicClient
MacOMNI Oct 7, 2024
b03dc81
update quic
MacOMNI Oct 7, 2024
44688f6
Merge branch 'dev_actor' into dev_mackun
MacOMNI Oct 7, 2024
a163b60
update
MacOMNI Oct 7, 2024
55d5f9e
no message
MacOMNI Oct 7, 2024
837c511
Merge branch 'master' into dev_mackun
MacOMNI Oct 7, 2024
faf4f53
Merge branch 'master' into dev_actor
MacOMNI Oct 7, 2024
fafa8a8
jam test
MacOMNI Oct 7, 2024
886283f
Update Networking/Sources/Networking/msquic/QuicConnection.swift
MacOMNI Oct 7, 2024
fdf0503
Merge branch 'dev_mackun' into dev_actor
MacOMNI Oct 7, 2024
3fff041
update peer
MacOMNI Oct 7, 2024
c6132b9
update peer
MacOMNI Oct 7, 2024
98ddf02
update quic
MacOMNI Oct 7, 2024
bff385d
udpate quic server
MacOMNI Oct 7, 2024
77a94dd
update peer
MacOMNI Oct 7, 2024
ffad634
Update Networking/Tests/NetworkingTests/QuicServerTest.swift
MacOMNI Oct 7, 2024
36b87cc
update test
MacOMNI Oct 7, 2024
c9bc44c
Merge branch 'dev_actor' of github.com:AcalaNetwork/boka into dev_actor
MacOMNI Oct 7, 2024
7f48591
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Oct 7, 2024
dcab9a6
Merge branch 'master' into dev_actor
MacOMNI Oct 7, 2024
897256d
update peer
MacOMNI Oct 7, 2024
e0dfc44
update peer
MacOMNI Oct 7, 2024
456562c
update quic stream
MacOMNI Oct 7, 2024
ce8f542
update peer
MacOMNI Oct 8, 2024
2f1e652
Merge branch 'master' of github.com:AcalaNetwork/boka
MacOMNI Oct 8, 2024
0195852
Merge branch 'master' into dev_actor_adjust
MacOMNI Oct 8, 2024
83f093a
update stream
MacOMNI Oct 8, 2024
5e5bcdc
update test
MacOMNI Oct 8, 2024
50c2bea
update quic client test
MacOMNI Oct 8, 2024
46b5d36
udpate peer test
MacOMNI Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 192 additions & 0 deletions Networking/Sources/Networking/Peer.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
import Foundation
import Logging
import Utils

let peerLogger = Logger(label: "PeerServer")

public enum PeerMessageType: Sendable {
case uniquePersistent // most messages type
case commonEphemeral
}

public protocol PeerMessage: Equatable, Sendable {
func getData() -> Data
func getMessageType() -> PeerMessageType
}

public struct PeerMessageReceived: Event {
public let messageID: Int64
public let message: QuicMessage
}

// TODO: add error or remove it
public struct PeerErrorReceived: Event {
public let messageID: Int64?
public let error: QuicError
}

// Define the Peer actor
public actor Peer {
private let config: QuicConfig
private var quicServer: QuicServer!
private var clients: [NetAddr: QuicClient]
private let eventBus: EventBus

public init(config: QuicConfig, eventBus: EventBus) async throws {
self.config = config
self.eventBus = eventBus
clients = [:]
quicServer = try await QuicServer(config: config, messageHandler: self)
}

deinit {
Task { [weak self] in
guard let self else { return }

var clients = await self.clients
for client in clients.values {
await client.close()
}
clients.removeAll()
await self.quicServer.close()
}
}

// Respond to a message with a specific messageID using Data
func respond(to messageID: Int64, with data: Data) async -> QuicStatus {
await quicServer.respondGetStatus(to: messageID, with: data)
}

// Respond to a message with a specific messageID using PeerMessage
func respond(to messageID: Int64, with message: any PeerMessage) async -> QuicStatus {
let messageType = message.getMessageType()
return
await quicServer
.respondGetStatus(
to: messageID,
with: message.getData(),
kind: (messageType == .uniquePersistent) ? .uniquePersistent : .commonEphemeral
)
}

// Respond to a message with a specific messageID using PeerMessage (async throws)
func respond(to messageID: Int64, with message: any PeerMessage) async throws {
let messageType = message.getMessageType()
let quicMessage = try await quicServer.respondGetMessage(
to: messageID, with: message.getData(),
kind: (messageType == .uniquePersistent) ? .uniquePersistent : .commonEphemeral
)
if quicMessage.type != .received {
throw QuicError.sendFailed
}
}

// Sends a message to another peer asynchronously
func sendMessage(to peer: NetAddr, with message: any PeerMessage) async throws -> QuicMessage {
let buffer = message.getData()
let messageType = message.getMessageType()
return try await sendDataToPeer(buffer, to: peer, messageType: messageType)
}

// Sends a message to another peer and returns the status
func sendMessage(to peer: NetAddr, with message: any PeerMessage) async throws -> QuicStatus {
let buffer = message.getData()
let messageType = message.getMessageType()
return try await sendDataToPeer(buffer, to: peer, messageType: messageType)
}

// send message to other peer wait for response quicMessage
private func sendDataToPeer(_ data: Data, to peerAddr: NetAddr, messageType: PeerMessageType)
async throws -> QuicMessage
{
if let client = clients[peerAddr] {
// Client already exists, use it to send the data
return try await client.send(
message: data,
streamKind: messageType == .uniquePersistent ? .uniquePersistent : .commonEphemeral
)
} else {
let config = QuicConfig(
id: config.id, cert: config.cert, key: config.key, alpn: config.alpn,
ipAddress: peerAddr.ipAddress, port: peerAddr.port
)
// Client does not exist, create a new one
let client = try await QuicClient(config: config, messageHandler: self)
clients[peerAddr] = client
return try await client.send(
message: data,
streamKind: messageType == .uniquePersistent ? .uniquePersistent : .commonEphemeral
)
}
}

private func sendDataToPeer(_ data: Data, to peerAddr: NetAddr, messageType: PeerMessageType)
async throws -> QuicStatus
{
if let client = clients[peerAddr] {
// Client already exists, use it to send the data
return try await client.send(
data: data,
streamKind: messageType == .uniquePersistent ? .uniquePersistent : .commonEphemeral
)
} else {
let config = QuicConfig(
id: config.id, cert: config.cert, key: config.key, alpn: config.alpn,
ipAddress: peerAddr.ipAddress, port: peerAddr.port
)
// Client does not exist, create a new one
let client = try await QuicClient(config: config, messageHandler: self)
clients[peerAddr] = client
return try await client.send(
data: data,
streamKind: messageType == .uniquePersistent ? .uniquePersistent : .commonEphemeral
)
}
}

private func removeClient(client: QuicClient) async {
let peerAddr = await client.getNetAddr()
await client.close()
_ = clients.removeValue(forKey: peerAddr)
}

func getPeerAddr() -> String {
"\(config.ipAddress):\(config.port)"
}
}

// QuicClientMessageHandler methods
extension Peer: QuicClientMessageHandler {
public func didReceiveMessage(quicClient: QuicClient, message: QuicMessage) async {
switch message.type {
case .shutdownComplete:
await removeClient(client: quicClient)
default:
break
}
}

public func didReceiveError(quicClient _: QuicClient, error: QuicError) async {
peerLogger.error("Failed to receive message: \(error)")
await eventBus.publish(PeerErrorReceived(messageID: nil, error: error))
}
}

// QuicServerMessageHandler methods
extension Peer: QuicServerMessageHandler {
public func didReceiveMessage(messageID: Int64, message: QuicMessage) async {
switch message.type {
case .received:
await eventBus.publish(PeerMessageReceived(messageID: messageID, message: message))
case .shutdownComplete:
peerLogger.info("quic server shutdown")
default:
break
}
}

public func didReceiveError(messageID: Int64, error: QuicError) async {
peerLogger.error("Failed to receive message: \(error)")
await eventBus.publish(PeerErrorReceived(messageID: messageID, error: error))
}
}
131 changes: 48 additions & 83 deletions Networking/Sources/Networking/msquic/QuicClient.swift
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
import Atomics
import Foundation
import Logging
import msquic
import NIO

let clientLogger = Logger(label: "QuicClient")

public protocol QuicClientMessageHandler: AnyObject {
func didReceiveMessage(quicClient: QuicClient, message: QuicMessage)
// TODO: add error or remove it
func didReceiveError(quicClient: QuicClient, error: QuicError)
public protocol QuicClientMessageHandler: AnyObject, Sendable {
func didReceiveMessage(quicClient: QuicClient, message: QuicMessage) async
func didReceiveError(quicClient: QuicClient, error: QuicError) async
}

public class QuicClient: @unchecked Sendable {
private var api: UnsafePointer<QuicApiTable>?
public actor QuicClient: Sendable, QuicConnectionMessageHandler {
private var api: UnsafePointer<QuicApiTable>
private var registration: HQuic?
private var configuration: HQuic?
private var connection: QuicConnection?
private let config: QuicConfig
private weak var messageHandler: QuicClientMessageHandler?
private let isClosed: ManagedAtomic<Bool> = .init(false)

init(config: QuicConfig, messageHandler: QuicClientMessageHandler? = nil) throws {
public init(config: QuicConfig, messageHandler: QuicClientMessageHandler? = nil) async throws {
self.config = config
self.messageHandler = messageHandler
var rawPointer: UnsafeRawPointer?
Expand All @@ -47,101 +44,70 @@ public class QuicClient: @unchecked Sendable {

api = boundPointer
registration = registrationHandle
}

deinit {
close()
clientLogger.trace("QuicClient Deinit")
}

func start() throws -> QuicStatus {
let status = QuicStatusCode.success.rawValue
try loadConfiguration()
try config.loadConfiguration(
api: api, registration: registration, configuration: &configuration
)
connection = try QuicConnection(
api: api, registration: registration, configuration: configuration, messageHandler: self
)
try connection?.start(ipAddress: config.ipAddress, port: config.port)
return status
}

// Asynchronous send method that waits for a QuicMessage reply
func send(message: Data) async throws -> QuicMessage {
public func send(message: Data) async throws -> QuicMessage {
try await send(message: message, streamKind: .uniquePersistent)
}

// send method that returns a QuicStatus
func send(message: Data, streamKind: StreamKind) throws -> QuicStatus {
// Send method that returns a QuicStatus
public func send(message: Data, streamKind: StreamKind) async throws -> QuicMessage {
guard let connection else {
throw QuicError.getConnectionFailed
}
let sendStream: QuicStream
// Check if there is an existing stream of the same kind
= if streamKind == .uniquePersistent
{
// If there is, send the message to the existing stream
try connection.createOrGetUniquePersistentStream(kind: streamKind)
} else {
// If there is not, create a new stream
try connection.createCommonEphemeralStream()
}
return sendStream.send(buffer: message, kind: streamKind)
let sendStream: QuicStream =
if streamKind == .uniquePersistent {
try await connection.createOrGetUniquePersistentStream(kind: streamKind)
} else {
try await connection.createCommonEphemeralStream()
}
return try await sendStream.send(data: message, kind: streamKind)
}

// Asynchronous send method that waits for a QuicMessage reply
func send(message: Data, streamKind: StreamKind = .uniquePersistent) async throws -> QuicMessage {
// Send method that returns a QuicStatus
public func send(data: Data, streamKind: StreamKind) async throws -> QuicStatus {
guard let connection else {
throw QuicError.getConnectionFailed
}
let sendStream: QuicStream
// Check if there is an existing stream of the same kind
= if streamKind == .uniquePersistent
{
// If there is, send the message to the existing stream
try connection.createOrGetUniquePersistentStream(kind: streamKind)
} else {
// If there is not, create a new stream
try connection.createCommonEphemeralStream()
}
return try await sendStream.send(buffer: message)
let sendStream: QuicStream =
if streamKind == .uniquePersistent {
try await connection.createOrGetUniquePersistentStream(kind: streamKind)
} else {
try await connection.createCommonEphemeralStream()
}
return sendStream.respond(with: data, kind: streamKind)
}

func getNetAddr() -> NetAddr {
NetAddr(ipAddress: config.ipAddress, port: config.port)
}

func close() {
if isClosed.compareExchange(expected: false, desired: true, ordering: .acquiring).exchanged {
if let connection {
connection.close()
self.connection = nil
}

if let configuration {
api?.pointee.ConfigurationClose(configuration)
self.configuration = nil
}

if let registration {
api?.pointee.RegistrationClose(registration)
self.registration = nil
}
public func close() async {
if let connection {
await connection.close()
self.connection = nil
}

if api != nil {
MsQuicClose(api)
api = nil
}
if let configuration {
api.pointee.ConfigurationClose(configuration)
self.configuration = nil
}

if let messageHandler {
messageHandler.didReceiveMessage(
quicClient: self, message: QuicMessage(type: .close, data: nil)
)
}
clientLogger.debug("QuicClient Close")
if let registration {
api.pointee.RegistrationClose(registration)
self.registration = nil
}
MsQuicClose(api)
}
}

extension QuicClient: QuicConnectionMessageHandler {
public func didReceiveMessage(
connection _: QuicConnection, stream _: QuicStream?, message: QuicMessage
) {
Expand All @@ -153,10 +119,15 @@ extension QuicClient: QuicConnectionMessageHandler {
)

case .shutdownComplete:
// Use [weak self] to avoid strong reference cycle
clientLogger.info(
"Client[\(getNetAddr())] shutdown"
)
// Call messageHandler safely in the actor context
Task { [weak self] in
guard let self else { return }
close()
await messageHandler?.didReceiveMessage(
quicClient: self, message: QuicMessage(type: .shutdownComplete, data: nil)
)
}

default:
Expand All @@ -170,9 +141,3 @@ extension QuicClient: QuicConnectionMessageHandler {
clientLogger.error("Failed to receive message: \(error)")
}
}

extension QuicClient {
private func loadConfiguration() throws {
try config.loadConfiguration(api: api, registration: registration, configuration: &configuration)
}
}
Loading