-
Notifications
You must be signed in to change notification settings - Fork 44
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
Comm #907
Comm #907
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
Didn't even know when I made this mistake
@cobycloud please review my PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small changes requested. good work overall
def multicast(self, sender: str, recipients: List[str], message: Any) -> None: | ||
raise NotImplementedError("Subclasses must implement multicast method") | ||
|
||
def subscribe(self, topic: str, subscriber: str) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we had an HTTPTransport base that has no inherent publish and subscribe methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a transport is going to offer its own external methods for subscribe and publish, then it's likely doing so via a mixin.
As such, that would require a swarmauri_core/transport/IPubSub and a swarmauri/transport/base/PubSubMixin class.
then at the concrete-level, if a transport is going to implement the IPubSub interface, it can do so via PubSubMixin,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh, now I see
Great, I understand this
from typing import Any, List | ||
|
||
|
||
class ITransportComm(ABC): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll drop the comm part and only refer to as Transport
import datetime | ||
from swarmauri_core.transport.ITransport import ITransport | ||
|
||
class TransportationProtocol(Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might come in handy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
include test methods to test:
- resource kind
- type
- serialization
Returns: | ||
str: Unique subscriber ID | ||
""" | ||
subscriber_id = str(uuid4()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TransportBase inherits ComponentBase. All subclasses of ComponentBase automatically have an internal id accessible at
self.id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @cobycloud
@cobycloud
I have implemented the
base class
andcore abstract
class fortransport
Please give it a look and let me know if I should proceed with
concrete implementations
andtest cases