Skip to content

Conversation

@cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Jul 12, 2023

This is a first pass at creating the server-side Client object / facade. It is based on the client-side object of the same name.

I've commented out some parts to get it building and market them with TODOs.

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #206678: Server-side client object.

data_sources/streaming_data_source.hpp
event_processor/event_processor.hpp
event_processor/null_event_processor.hpp
flag_manager/flag_store.hpp
Copy link
Contributor Author

@cwaldren-ld cwaldren-ld Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These event processor files live in internal now, so they can be shared with the server-side SDK.

event_processor_ =
std::make_unique<events::AsioEventProcessor<ClientSDK>>(
ioc_.get_executor(), config.ServiceEndpoints(), config.Events(),
http_properties_, logger_);
Copy link
Contributor Author

@cwaldren-ld cwaldren-ld Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before, EventProcessor was a very thin wrapper that forwarded its arguments to AsioEventProcessor. This worked fine when only the client SDK existed. Ideally, we'd like to share that interface with the server.

Now, I've moved the event processor interface to internal (IEventProcessor). I've also made AsioEventProcessor implement IEventProcessor directly.

Through this combination, both the server and client can now directly instantiate either AsioEventProcessor or NullEventProcessor as needed.

(this could be better with a picture, I'll work on a mermaid.)

@@ -1,50 +0,0 @@
#pragma once

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are no longer client-specific, so I've moved them to a common_events.hpp.

Value default_value,
bool check_type,
bool detailed) {
// auto desc = memory_store_.GetFlag(key);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Evaluator PR isn't merged yet.

@cwaldren-ld cwaldren-ld force-pushed the cw/sc-206678/server-side-client branch from 700cfab to 34bcd43 Compare July 18, 2023 01:44
/**
* Interface for the standard SDK client methods and properties.
*/
class IClient {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole interface is copied from the client, so adjustments will need to be made in subsequent PRs.

@cwaldren-ld cwaldren-ld marked this pull request as ready for review July 18, 2023 21:02
@cwaldren-ld cwaldren-ld requested review from a team and kinyoklion July 18, 2023 21:02
@cwaldren-ld cwaldren-ld changed the title feat: initial pass at creating a server-side client object feat: initial pass of server-side Client object Jul 18, 2023
@kinyoklion kinyoklion self-requested a review July 18, 2023 22:32
Copy link
Member

@kinyoklion kinyoklion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misclick. Meant to request changes for the data source state.

@cwaldren-ld cwaldren-ld merged commit bb75d4b into server-side Jul 19, 2023
@cwaldren-ld cwaldren-ld deleted the cw/sc-206678/server-side-client branch July 19, 2023 00:45
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

Successfully merging this pull request may close these issues.

3 participants