Skip to content

Phase 3: Slice 2 — Put / Get round-trip #4

Description

@TomiCheng

Goal

Second walking-skeleton slice: round-trip a byte[] through Geode. PutAsync(key, bytes) followed by GetAsync(key) returns equal bytes.

Done when

  • PutOperation encodes a Put (7) message with key + value parts and parses the Reply (6) for success/exception.
  • GetOperation encodes a Request (0) message and parses Response (1).
  • Both operations handle the Exception (2) message type — wrap as a typed .NET exception.
  • Integration test: against the Testcontainers Geode + test REPLICATE region, Put("k", new byte[]{1,2,3}) then Get("k") returns [1,2,3].

Tasks

  • src/Geode.Client/Operations/PutOperation.cs
  • src/Geode.Client/Operations/GetOperation.cs
  • src/Geode.Client/Operations/GeodeServerException.cs
  • src/Geode.Client/Operations/MessageDispatcher.cs — routes server replies to the right operation by TransactionId.
  • tests/Geode.Client.Tests/Operations/PutGetEncodingTests.cs (byte fixtures)
  • tests/Geode.Client.IntegrationTests/PutGetTests.cs

References

  • cppcache/src/TcrMessage.cppaddStringPart, addBytesPart, addObjPart, readObjectPart
  • cppcache/src/ThinClientRegion.cppputNoThrow, getNoThrow

Out of scope

  • Typed values (Phase 4) — byte[] only here.
  • Bulk operations (PutAll / GetAll) — Phase 4 or later.
  • Region creation — DBA pre-creates test via gfsh.

Branch

feat/phase-3-put-get

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions