-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add references to arguments and result mappers to signatures
There was a problem with the previous approach if we were going to call a polymorphic remote function that will return results with different schema depending on the argument. That is the case for calling the tarantool/crud functions for example - the schema depends on the space metadata. But if we supply a result mapper for each call, for each result schema it will be different. So the hashcode of the result mapper supplier is now included in the request signature, as well as the hashcode of the arguments mapper supplier. Here we assume that if we have identical mappers for two calls, their suppliers must be also identical. Therefore we can have two possible problems: - cash pollution if a mapper supplier for the same mapper is created for each call, - mapping errors if the supplier is polymorphic and the same supplier instance is used for calls with different result schema. Both problems actually relate to a somehow bad written code, so they does not look like showstoppers. The second problem also looks like a rare one, but to avoid sudden user application crash in case of the first one we need perhaps to define the maximum cache size and establish eviction for the cash entries.
- Loading branch information
Showing
6 changed files
with
113 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.