Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Oct 14, 2021

Objective

  • SmartPeakServer App
  • Offload computational workloads to a dedicated entity running on HPCs as a microservice.
  • Modifications to SmartPeakGUI with enabled communications to the SmartPeakServer via HTTP2 to ensure lightweight operation on the client side.

@ghost ghost changed the title [Feat/aut951] - SmartPeakServer v1.0.0 [Feat/aut951] - Distributed Mode Dec 10, 2021
@ghost ghost requested review from bertrandboudaud and dmccloskey December 16, 2021 10:29
Copy link
Collaborator

@bertrandboudaud bertrandboudaud left a comment

Choose a reason for hiding this comment

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

Niced work, please see my comments.

cmake_minimum_required(VERSION 3.8.2 FATAL_ERROR)
project("SmartPeak_class_examples_smartpeak")

#cmake_policy(SET CMP0115 OLD)
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it still needed? if yes, can you add some comment on that

Copy link
Author

Choose a reason for hiding this comment

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

No, it was a reminder to append source code suffixes to file name, recent versions of CMake (>3.19) will produce lots of warnings when that's not the case which is annoying when debugging.

target_link_libraries(${_examples} PUBLIC ${SmartPeak_LIBRARIES} OpenMS)
target_link_libraries(${_examples} PUBLIC ${SmartPeak_LIBRARIES} OpenMS
PRIVATE
${grpc_required_libs})
Copy link
Collaborator

Choose a reason for hiding this comment

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

do the examples need grpc dependency?

Copy link
Author

Choose a reason for hiding this comment

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

Yes they do.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This concerns me a bit. Can you elaborate on why the examples would need GRPC dependencies? From my understanding, none of the examples use GRPC?

// ======================================
// Server-Side Execution
// ======================================
if (run_workflow_widget_->server_fields_set)
Copy link
Collaborator

Choose a reason for hiding this comment

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

would it be possible to put that block of code in a dedicated (several?) class?

Copy link
Author

Choose a reason for hiding this comment

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

I have packed some of the lines into separate functions, it's not possible to do that for the whole block since we don't want to have the gRPC library as part of the libSmartPeak or libSmartPeakWidgets.

@@ -0,0 +1,490 @@
// --------------------------------------------------------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have a header and cpp file?

Copy link
Author

Choose a reason for hiding this comment

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

This file binds directly to the SmartPeakServer executable, making a library out of it is not necessary and it's not a good idea to have it as part of the main SmartPeak library.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would also recommend a header/cpp file. If for some reason that is not possible, I would recommend using the same convention but placing what would be the .cpp contents after the .h contents.

namespace SmartPeak {
namespace serv {

bool contains_option(
Copy link
Collaborator

Choose a reason for hiding this comment

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

the 3 methods contains_option, extract_report_sampletypes and extract_report_metadata should follow the global coding standard that is start with non capital leter, then no underscore but capital letter as a separator

rpc runWorkflow (WorkflowParameters) returns (WorkflowResult) {}
rpc getLogStream (InquireLogs) returns (stream LogStream) {}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need all this below? report, graph data .. all this should be local there should not be any message about this, as i understood.

Copy link
Author

Choose a reason for hiding this comment

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

They will be needed later when the other approaches for transmitting the visualisation data that we have discussed is implemented.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you elaborate on the need for this here?

@@ -0,0 +1,247 @@
// Generated by the gRPC C++ plugin.
Copy link
Collaborator

Choose a reason for hiding this comment

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

As these files are generated, is it worth putting them in the repository? at first, I would say no, but I don't have a strict opinion on this. But if we put them in our repository, how is it generated? if it's generated by hand, would be nice to document in an appropriate place (maybe inline documentation in the .proto file would be a convenient location)

Copy link
Author

Choose a reason for hiding this comment

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

A short notice on how to generate them is now included in the proto file.

Copy link
Author

Choose a reason for hiding this comment

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

These files are need for the SmartPeakServer and SmartPeakGUI.

rpc runWorkflow (WorkflowParameters) returns (WorkflowResult) {}
rpc getLogStream (InquireLogs) returns (stream LogStream) {}
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you elaborate on the need for this here?

target_link_libraries(${_examples} PUBLIC ${SmartPeak_LIBRARIES} OpenMS)
target_link_libraries(${_examples} PUBLIC ${SmartPeak_LIBRARIES} OpenMS
PRIVATE
${grpc_required_libs})
Copy link
Collaborator

Choose a reason for hiding this comment

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

This concerns me a bit. Can you elaborate on why the examples would need GRPC dependencies? From my understanding, none of the examples use GRPC?

@@ -0,0 +1,490 @@
// --------------------------------------------------------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would also recommend a header/cpp file. If for some reason that is not possible, I would recommend using the same convention but placing what would be the .cpp contents after the .h contents.

Copy link
Collaborator

@dmccloskey dmccloskey left a comment

Choose a reason for hiding this comment

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

The updates look really nice. In addition, looks like the unit tests for the new Utility methods are missing? If so can you add them as well.

@ghost
Copy link
Author

ghost commented Dec 30, 2021

The updates look really nice. In addition, looks like the unit tests for the new Utility methods are missing? If so can you add them as well.

Thanks for reminding, I have added the unittests for the new utility methods.

Copy link
Collaborator

@dmccloskey dmccloskey left a comment

Choose a reason for hiding this comment

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

Thanks for adding in the unit tests. This is looking good from my end. Let's wait on Bertrands feedback and then go from there.

Copy link
Collaborator

@bertrandboudaud bertrandboudaud left a comment

Choose a reason for hiding this comment

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

ok for me

@bertrandboudaud bertrandboudaud merged commit c0507d4 into develop Jan 6, 2022
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.

2 participants