Re: Deprecating and removing net-app based APIs


Paul Sokolovsky
 

Hello,

On Wed, 16 Jan 2019 18:45:34 +0200
"Jukka Rissanen" <jukka.rissanen@linux.intel.com> wrote:

Hi all,

I sent a PR#12506 [1] that marks these APIs as deprecated:
* net-app
* HTTP server / client
* Websocket
* SNTP

The idea is that these APIs would eventually be removed from 1.14
release.
+1 for deprecation, -1 for removal in 1.14. 1.14 is supposed to be LTS
release, and we shouldn't leave users who used prior versions of Zephyr
in the cold with the first LTS which removes a lot of familiar APIs
(even without providing replacements, as discussed below).

Over a year ago, it was agreed among network API users, that
the API to user applications would be BSD socket API interface.
Because of this various networking APIs like MQTT, CoAP and LWM2M
have been converted to use BSD socket APIs instead of net-app API.
Good. But one year isn't that big a timeframe. Some higher-level
network libs were converted to sockets, some not.

I sent a mail in the beginning of December 2018 [2] about HTTP
client/server APIs, if there would be anyone willing to maintain and
convert HTTP APIs to use BSD socket API. So far no volunteers have
been found.
Well, I responded to it with some proposals, and that's were it stands.
There should be discussion on the way to approach. It's a bit of
wishful thinking that someone will pop up at them moment that we
asked. Likewise, I'd call it a leap of faith that someone will start
to work on it just to not lose HTTP libs from Zephyr - this doesn't
guarantee quality of implementation, nor even that it'll be merged (we
had cases like "oh, you wrote something? but that's not what we
need"). Again, discussion and sustainable approach.

This removal of these APIs also means that there would
not be replacement BSD socket based APIs for HTTP, Websocket and SNTP
in 1.14.
That would be the reason to not remove them, and definitely not for
the LTS.

It is important that we do not have multiple implementations for the
same features so the old net-app based APIs need to be removed. We
will remove the duplicate (old) CoAP and MQTT API implementations as
there exists BSD socket versions for CoAP and MQTT.


Links:
[1] https://github.com/zephyrproject-rtos/zephyr/pull/12506
[2] https://lists.zephyrproject.org/g/devel/message/5537


Cheers,
Jukka
--
Best Regards,
Paul

Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Join devel@lists.zephyrproject.org to automatically receive all group messages.