You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by GitBox <gi...@apache.org> on 2020/11/06 10:03:30 UTC

[GitHub] [celix] Oipo opened a new pull request #292: zmq admin serializer change

Oipo opened a new pull request #292:
URL: https://github.com/apache/celix/pull/292


   This work includes https://github.com/apache/celix/pull/291 but is split because it's a pretty big PR.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] Oipo merged pull request #292: zmq admin serializer change

Posted by GitBox <gi...@apache.org>.
Oipo merged pull request #292:
URL: https://github.com/apache/celix/pull/292


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] pnoltes commented on a change in pull request #292: zmq admin serializer change

Posted by GitBox <gi...@apache.org>.
pnoltes commented on a change in pull request #292:
URL: https://github.com/apache/celix/pull/292#discussion_r520038937



##########
File path: bundles/pubsub/test/test/serializer_activator.cc
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "celix_constants.h"
+#include <unistd.h>
+
+#include "celix_api.h"
+#include "../../pubsub_spi/include/pubsub_message_serialization_service.h"

Review comment:
       includes should not use .., maybe a linking to Celix::pubsub_spi is missing

##########
File path: bundles/pubsub/test/test/serializer_activator.cc
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "celix_constants.h"
+#include <unistd.h>
+
+#include "celix_api.h"
+#include "../../pubsub_spi/include/pubsub_message_serialization_service.h"
+#include "../../pubsub_spi/include/pubsub_constants.h"
+#include "msg.h"
+
+struct activator {
+    long serId;
+    pubsub_message_serialization_service_t svc;
+};
+
+celix_status_t bnd_start(struct activator *act, celix_bundle_context_t *ctx) {
+
+#pragma GCC diagnostic ignored "-Wunused-parameter"

Review comment:
       is this needed or can be parameters with names (c++) be used?

##########
File path: bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c
##########
@@ -62,7 +62,7 @@ int psa_zmq_start(psa_zmq_activator_t *act, celix_bundle_context_t *ctx) {
     //track serializers
     if (status == CELIX_SUCCESS) {
         celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
-        opts.filter.serviceName = PUBSUB_SERIALIZER_SERVICE_NAME;
+        opts.filter.serviceName = PUBSUB_MESSAGE_SERIALIZATION_SERVICE_NAME;

Review comment:
       The marker service can be used here so service name
   PUBSUB_MESSAGE_SERIALIZATION_MARKER_NAME
   
   note that the pubsub_serializer_handler_t can be used to actual use the services (and reuse the tracking of services)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] Oipo commented on a change in pull request #292: zmq admin serializer change

Posted by GitBox <gi...@apache.org>.
Oipo commented on a change in pull request #292:
URL: https://github.com/apache/celix/pull/292#discussion_r521331375



##########
File path: bundles/pubsub/test/test/serializer_activator.cc
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "celix_constants.h"
+#include <unistd.h>
+
+#include "celix_api.h"
+#include "../../pubsub_spi/include/pubsub_message_serialization_service.h"
+#include "../../pubsub_spi/include/pubsub_constants.h"
+#include "msg.h"
+
+struct activator {
+    long serId;
+    pubsub_message_serialization_service_t svc;
+};
+
+celix_status_t bnd_start(struct activator *act, celix_bundle_context_t *ctx) {
+
+#pragma GCC diagnostic ignored "-Wunused-parameter"

Review comment:
       This is needed because the lambdas ignore parameters. Even when simply removing the names, I kept getting errors. Since this is just a test file, I opted for ignoring the warnings (which get turned into errors due to `-Werrors`).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] pnoltes commented on a change in pull request #292: zmq admin serializer change

Posted by GitBox <gi...@apache.org>.
pnoltes commented on a change in pull request #292:
URL: https://github.com/apache/celix/pull/292#discussion_r523746033



##########
File path: bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c
##########
@@ -62,7 +62,7 @@ int psa_zmq_start(psa_zmq_activator_t *act, celix_bundle_context_t *ctx) {
     //track serializers
     if (status == CELIX_SUCCESS) {
         celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
-        opts.filter.serviceName = PUBSUB_SERIALIZER_SERVICE_NAME;
+        opts.filter.serviceName = PUBSUB_MESSAGE_SERIALIZATION_SERVICE_NAME;

Review comment:
       The marker interface was not intended for performance issues, but intended to prevent no available serialiser issues.
   
   So if json serializing is supported, but at the moment no actual serialiser is available, the marker interface is present to indicate json serialization is supported.
   
   But maybe this is over designed ... so yeah let's discuss this.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] Oipo commented on a change in pull request #292: zmq admin serializer change

Posted by GitBox <gi...@apache.org>.
Oipo commented on a change in pull request #292:
URL: https://github.com/apache/celix/pull/292#discussion_r521331936



##########
File path: bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c
##########
@@ -62,7 +62,7 @@ int psa_zmq_start(psa_zmq_activator_t *act, celix_bundle_context_t *ctx) {
     //track serializers
     if (status == CELIX_SUCCESS) {
         celix_service_tracking_options_t opts = CELIX_EMPTY_SERVICE_TRACKING_OPTIONS;
-        opts.filter.serviceName = PUBSUB_SERIALIZER_SERVICE_NAME;
+        opts.filter.serviceName = PUBSUB_MESSAGE_SERIALIZATION_SERVICE_NAME;

Review comment:
       I think the marker interfaces complicate things more than what they intend to do. Performance-wise, I don't see any issues with iterating over a couple hundred serializers during setup/teardown. But let's have a call on this.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] Oipo commented on a change in pull request #292: zmq admin serializer change

Posted by GitBox <gi...@apache.org>.
Oipo commented on a change in pull request #292:
URL: https://github.com/apache/celix/pull/292#discussion_r521332446



##########
File path: bundles/pubsub/test/test/serializer_activator.cc
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "celix_constants.h"
+#include <unistd.h>
+
+#include "celix_api.h"
+#include "../../pubsub_spi/include/pubsub_message_serialization_service.h"

Review comment:
       Fixed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [celix] codecov-io commented on pull request #292: zmq admin serializer change

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #292:
URL: https://github.com/apache/celix/pull/292#issuecomment-725405282


   # [Codecov](https://codecov.io/gh/apache/celix/pull/292?src=pr&el=h1) Report
   > Merging [#292](https://codecov.io/gh/apache/celix/pull/292?src=pr&el=desc) (2459ee9) into [master](https://codecov.io/gh/apache/celix/commit/4ebde14e5cd089223339f5a21c07c0cea9ab34f8?el=desc) (4ebde14) will **decrease** coverage by `1.53%`.
   > The diff coverage is `68.63%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/celix/pull/292/graphs/tree.svg?width=650&height=150&src=pr&token=JdsiThga8P)](https://codecov.io/gh/apache/celix/pull/292?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #292      +/-   ##
   ==========================================
   - Coverage   68.29%   66.75%   -1.54%     
   ==========================================
     Files         136      147      +11     
     Lines       27379    29957    +2578     
   ==========================================
   + Hits        18698    19998    +1300     
   - Misses       8681     9959    +1278     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/celix/pull/292?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...les/pubsub/pubsub\_admin\_zmq/v1/src/psa\_activator.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS92MS9zcmMvcHNhX2FjdGl2YXRvci5j) | `100.00% <ø> (ø)` | |
   | [.../pubsub/pubsub\_admin\_zmq/v1/src/pubsub\_zmq\_admin.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS92MS9zcmMvcHVic3ViX3ptcV9hZG1pbi5j) | `50.40% <ø> (ø)` | |
   | [...ubsub\_admin\_zmq/v1/src/pubsub\_zmq\_topic\_receiver.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS92MS9zcmMvcHVic3ViX3ptcV90b3BpY19yZWNlaXZlci5j) | `65.59% <ø> (ø)` | |
   | [.../pubsub\_admin\_zmq/v1/src/pubsub\_zmq\_topic\_sender.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS92MS9zcmMvcHVic3ViX3ptcV90b3BpY19zZW5kZXIuYw==) | `73.71% <ø> (ø)` | |
   | [.../pubsub/pubsub\_admin\_zmq/v2/src/pubsub\_zmq\_admin.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS92Mi9zcmMvcHVic3ViX3ptcV9hZG1pbi5j) | `55.97% <55.97%> (ø)` | |
   | [...ubsub\_admin\_zmq/v2/src/pubsub\_zmq\_topic\_receiver.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS92Mi9zcmMvcHVic3ViX3ptcV90b3BpY19yZWNlaXZlci5j) | `73.38% <73.38%> (ø)` | |
   | [.../pubsub\_admin\_zmq/v2/src/pubsub\_zmq\_topic\_sender.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS92Mi9zcmMvcHVic3ViX3ptcV90b3BpY19zZW5kZXIuYw==) | `74.05% <74.05%> (ø)` | |
   | [bundles/pubsub/pubsub\_utils/src/pubsub\_matching.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX3V0aWxzL3NyYy9wdWJzdWJfbWF0Y2hpbmcuYw==) | `75.33% <75.33%> (ø)` | |
   | [...les/pubsub/pubsub\_admin\_zmq/v2/src/psa\_activator.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX2FkbWluX3ptcS92Mi9zcmMvcHNhX2FjdGl2YXRvci5j) | `100.00% <100.00%> (ø)` | |
   | [bundles/pubsub/pubsub\_spi/src/pubsub\_endpoint.c](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree#diff-YnVuZGxlcy9wdWJzdWIvcHVic3ViX3NwaS9zcmMvcHVic3ViX2VuZHBvaW50LmM=) | `77.14% <100.00%> (+1.90%)` | :arrow_up: |
   | ... and [19 more](https://codecov.io/gh/apache/celix/pull/292/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/celix/pull/292?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/celix/pull/292?src=pr&el=footer). Last update [4ebde14...2459ee9](https://codecov.io/gh/apache/celix/pull/292?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org