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

Expand/fix usage of async for SUMO access #440

Open
sigurdp opened this issue Oct 24, 2023 · 0 comments
Open

Expand/fix usage of async for SUMO access #440

sigurdp opened this issue Oct 24, 2023 · 0 comments

Comments

@sigurdp
Copy link
Collaborator

sigurdp commented Oct 24, 2023

PR #378 incorporates usage of async in many/most of the access layer functions, but we should revisit this to ensure that we use async calls all the way where possible.

Some exampler of functions that should be refactored are:

  • SurfaceAccess.get_realization_surface_data()
  • SurfaceAccess.get_statistical_surface_data()
  • SurfacePolygonsAccess.get_surface_polygons()

Some of these are non-async now, while others are defined as async, but do not actually use underlying async calls to Sumo.

Another related topic is whether we should have dual (both sync and async) functions for all or some of these access functions.
While seeking performance optimizations, we have done several experiments involving Python multiprocessing, and in that case, having async functions quickly becomes a nuisance, since by default there is no event loop running.

In that case, how should we name the functions?
We may for example need both:
SurfaceAccess.get_realization_surface_data_sync() and SurfaceAccess.get_realization_surface_data_async()

as well as both:
SurfaceAccess.from_case_uuid_sync() and SurfaceAccess.from_case_uuid_async()

etc.

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