Skip to content

[META] Module API V1 #8157

@yossigo

Description

@yossigo

Module API V1

This is an attempt to scope out all missing or broken Redis Module API capabilities, and create an exahustive list that defines a stable V1 interface.

The Module API was in continuous state of development since Redis 4. Although it maintains ABI backwards compatibility, this does make things more difficult for module developers to mange.

General

Better documentation is desparately needed. Things that come in mind:

  1. A step by step / tutorial-like stuff.
  2. Better organize the growing reference for better navigation, etc.
  3. Some real world examples.

Big Topics

  • New, significant capabilities.
  • Need work to define the concept or reach a solid API design.
  • Potentially have a system-wide effect.

Native Key Access

  • Provide better coverage for accessing native Redis data types.
  • We should not try to cover all commands and just provide the necessary primitives.
  • Streams support as a native type (Stream API in Module #5760)
  • Missing hash functions:
    • RM_HashDel (using RM_HashSet with REDISMODULE_HASH_DELETE).
    • RM_HashLen (using RM_ValueLength).
    • Field iteration API, similar to the one provided by sorted sets.
  • Missing list functions (see Modules: Add remaining list API functions #8439):
    • RM_ListGet
    • RM_ListInsert
    • RM_ListLen (using RM_ValueLength).
    • RM_ListRemove
    • RM_ListSet
    • Iteration API
  • Missing set functions:
    • RM_SetAdd
    • RM_SetCard
    • RM_SetIsMember
    • RM_SetRemove
    • Iteration API
  • Optimize the API to provide zero-copy (but safe) access to elements. see [NEW] Avoid allocations for RedisModuleString #8473

Minor Improvements / Fixes

  • Need some level of API design or decision making.
  • Impact has a limited scope.

Trivial

Module API V2 and beyond

Big things beyond the current Module API V1 effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions