Fraunhofer-IIS / libjapi

libjapi is a universal JSON to C API library. It receives newline-delimited JSON (NDJSON) messages via TCP and calls registered C functions. A JSON response is returned for each request. Furthermore, it is also possible to create push services, which asynchronously push JSON messages to the clients subscribed to them.
MIT License
3 stars 1 forks source link

Add request number to resolve "Support unambiguous request-response matching" - [merged] #92

Closed fraunhofer-iis-bot closed 1 year ago

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 13:47

Merges 25-support-unambiguous-request-response-matching -> dev

Closes #25

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 14:33

added 1 commit

Compare with previous version

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 14:34

unmarked as a Work In Progress

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 14:35

added 15m of time spent at 2020-02-25

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 15:28

added 1 commit

Compare with previous version

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 25, 2020, 15:51

Thank you for the MR. It should be mentioned in the documentation before the MR can be closed. Please also add a one-liner to the ChangeLog file.

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 15:59

Is the doxydir/main.md the right place to document this? Or should I rather extend the doxygen header of the respective japi method?

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 25, 2020, 16:03

Yes, main.md is probably the best place. Maybe we can create another subsection called features to add this kind of functions.

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 25, 2020, 16:04

marked as a Work In Progress

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 25, 2020, 16:04

changed target branch from master to dev

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 16:24

added 1 commit

Compare with previous version

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 16:24

unmarked as a Work In Progress

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 25, 2020, 16:25

added 15m of time spent at 2020-02-25

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 25, 2020, 17:06

I'm asking myself if we should force the developer to use strings for the request no. Maybe it's better to support any kind of json object. What do you think?

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 26, 2020, 09:20

I don't think array, object or bool make sense as japi_message_no values... But I see why number (integer, floats) might be nice, as the name implies one could use a number, whereas he has to use a string as of now...

Does json-c support some form of type-agnostic assignment or does libjapi have to do the type inference?

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 26, 2020, 09:45

You can just get the value field of key "japi_message_no" with json_object_object_get_ex and simply add it to the response again. So you do not need to take care which type of object it is.

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 26, 2020, 09:54

added 1 commit

Compare with previous version

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 26, 2020, 09:55

I have added support for arbitrary JSON values :)

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 26, 2020, 09:55

added 10m of time spent at 2020-02-26

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 26, 2020, 12:28

Commented on src/japi.c line 102

Ich denke hier erzeugst du einen Memory Leak, weil du den Ref-Count für den kompletten JSON-Request erhöhst. Es müsste reichen, hier jreq_no zu erhöhen.

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 26, 2020, 12:32

Commented on doxydir/main.md line 148

Die Doku muss noch angepasst werden, sofern das andere Problem behoben ist.

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 26, 2020, 14:17

Commented on src/japi.c line 102

changed this line in version 6 of the diff

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 26, 2020, 14:17

Commented on doxydir/main.md line 148

changed this line in version 6 of the diff

fraunhofer-iis-bot commented 4 years ago

In GitLab by @jannismain on Feb 26, 2020, 14:17

added 1 commit

Compare with previous version

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 26, 2020, 15:30

merged

fraunhofer-iis-bot commented 4 years ago

In GitLab by @cstender on Feb 26, 2020, 15:30

mentioned in commit 80113507c4830c759871c2f940c9bd779daa4a9b