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

move transaction handling into framer socket. #2254

Open
janiversen opened this issue Jul 22, 2024 · 4 comments
Open

move transaction handling into framer socket. #2254

janiversen opened this issue Jul 22, 2024 · 4 comments

Comments

@janiversen
Copy link
Collaborator

janiversen commented Jul 22, 2024

Transactions at device level is only supported by the socket framer, therefore it is logical to remove the general transaction handling, and make a specific transaction handling directly in the framer.

Seen from the APP POW, the library offers a request/response API, meaning there are never more than 1 transaction outstanding, so need for a app level transaction handling.

The request/response API is partly not protected by a lock, making it difficult for multitask application to secure serialization.

  • for sync clients, no further lock is needed (apps using threads and sync calls, need to manage this themself)
  • for async clients an asyncio.lock needs to be added to all calls (centrally in the execute), important the lock needs to be reset in case of exceptions.

This should only be implemented in the new framers, and the old_framers kept unchanged.

@janiversen
Copy link
Collaborator Author

Correction the server still needs to know the transaction id, but since the server handles the requests one by one. the socket framer can keep the tid from the request and automatically add it to the response.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
@janiversen janiversen reopened this Aug 28, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant