Skip to content

Commit f45c8b8

Browse files
authored
Merge pull request #33 from VigneshVSV/main
2 line minor bug fix for IPC
2 parents 344199f + 811dbab commit f45c8b8

File tree

8 files changed

+20
-13
lines changed

8 files changed

+20
-13
lines changed

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Security
11-
- cookie auth & its specification in TD
10+
✓ means ready to try
11+
12+
- cookie auth & its specification in TD (cookie auth branch)
13+
- image event handlers (develop branch) for streaming live video as JPEG and PNG ✓
14+
- pydantic support for property models (develop branch) ✓
15+
16+
## [v0.2.3] - 2024-08-11
17+
18+
- HTTP SSE minor bug-fix/optimization - no difference to the user
1219

1320
## [v0.2.2] - 2024-08-09
1421

1522
- thing control panel works better with the server side and support observable properties
16-
- `ObjectProxy` client API has been improved to resemble WoT operations better, for examplem `get_property` is now
23+
- `ObjectProxy` client API has been improved to resemble WoT operations better, for example `get_property` is now
1724
called `read_property`, `set_properties` is now called `write_multiple_properties`.
1825
- `ObjectProxy` client reliability for poorly written server side actions improved
1926

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Description
44

5-
`hololinked` is a server side pythonic tool suited for instrumentation control and data acquisition over network, especially with HTTP. If you have a requirement to control and capture data from your hardware/instrumentation, show the data in a browser/dashboard, provide a GUI or run automated scripts, `hololinked` can help. Even for isolated applications or a small lab setup without networking concepts, one can still separate the concerns of the tools that interact with the hardware & the hardware itself.
5+
`hololinked` is a beginner-friendly server side pythonic tool suited for instrumentation control and data acquisition over network, especially with HTTP. If you have a requirement to control and capture data from your hardware/instrumentation, show the data in a browser/dashboard, provide a GUI or run automated scripts, `hololinked` can help. Even for isolated applications or a small lab setup without networking concepts, one can still separate the concerns of the tools that interact with the hardware & the hardware itself.
66

77
[![Documentation Status](https://readthedocs.org/projects/hololinked/badge/?version=latest)](https://hololinked.readthedocs.io/en/latest/?badge=latest) [![PyPI](https://img.shields.io/pypi/v/hololinked?label=pypi%20package)](https://pypi.org/project/hololinked/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/hololinked)](https://pypistats.org/packages/hololinked) [![codecov](https://codecov.io/gh/VigneshVSV/hololinked/graph/badge.svg?token=JF1928KTFE)](https://codecov.io/gh/VigneshVSV/hololinked)
88
<br>

doc

Submodule doc updated from a064864 to 84450d0

examples

hololinked/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.2"
1+
__version__ = "0.2.3"

hololinked/server/HTTPServer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def __init__(self, things : typing.List[str], *, port : int = 8080, address : st
136136
self._type = HTTPServerTypes.THING_SERVER
137137
self._lost_things = dict() # see update_router_with_thing
138138
self._zmq_protocol = ZMQ_PROTOCOLS.IPC
139-
self._zmq_socket_context = None
140-
self._zmq_event_context = None
139+
self._zmq_inproc_socket_context = None
140+
self._zmq_inproc_event_context = None
141141

142142
@property
143143
def all_ok(self) -> bool:
@@ -156,7 +156,7 @@ def all_ok(self) -> bool:
156156
self.zmq_client_pool = MessageMappedZMQClientPool(self.things, identity=self._IP,
157157
deserialize_server_messages=False, handshake=False,
158158
http_serializer=self.serializer,
159-
context=self._zmq_socket_context,
159+
context=self._zmq_inproc_socket_context,
160160
protocol=self._zmq_protocol,
161161
logger=self.logger
162162
)

hololinked/server/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ async def handle_datastream(self) -> None:
265265
called by GET method and handles the event.
266266
"""
267267
try:
268-
event_consumer_cls = EventConsumer if hasattr(self.owner, '_zmq_event_context') else AsyncEventConsumer
268+
event_consumer_cls = EventConsumer if self.owner._zmq_inproc_event_context else AsyncEventConsumer
269269
# synchronous context with INPROC pub or asynchronous context with IPC or TCP pub, we handle both in async
270270
# fashion as HTTP server should be running purely sync(or normal) python method.
271271
event_consumer = event_consumer_cls(self.resource.unique_identifier, self.resource.socket_address,
@@ -301,7 +301,7 @@ async def handle_datastream(self) -> None:
301301
self.write(data_header % self.serializer.dumps(
302302
{"exception" : format_exception_as_json(ex)}))
303303
try:
304-
if isinstance(self.owner._zmq_event_context, zmq.asyncio.Context):
304+
if isinstance(self.owner._zmq_inproc_event_context, zmq.asyncio.Context):
305305
event_consumer.exit()
306306
except Exception as ex:
307307
self.logger.error(f"error while closing event consumer - {str(ex)}" )

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setuptools.setup(
99
name="hololinked",
10-
version="0.2.2",
10+
version="0.2.3",
1111
author="Vigneh Vaidyanathan",
1212
author_email="vignesh.vaidyanathan@hololinked.dev",
1313
description="A ZMQ-based Object Oriented RPC tool-kit with HTTP support for instrument control/data acquisition or controlling generic python objects.",

0 commit comments

Comments
 (0)