Bug 403956 - [new] Submission of Mosquitto Python MQTT client to Eclipse Paho
Summary: [new] Submission of Mosquitto Python MQTT client to Eclipse Paho
Status: RESOLVED FIXED
Alias: None
Product: Paho
Classification: IoT
Component: MQTT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Andy Piper CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2013-03-20 19:57 EDT by Roger Light CLA
Modified: 2014-02-04 05:05 EST (History)
3 users (show)

See Also:


Attachments
Current code, as in mosquitto repository. (96.70 KB, application/zip)
2013-03-22 19:27 EDT, Roger Light CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Light CLA 2013-03-20 19:57:36 EDT
I will attach a zip of the code for CQ review once I have compiled it.

I have authored all of the code and will be able to produce a repository that contains the full history of only the relevant files, rather than the whole mosquitto repository.

I undertook this work in my own time outside my place of work, but have searched through HR documentation anyway. I see no indication that they would attempt to claim any rights on work done outside so believe I have the right to transfer it to Eclipse.

It needs some work to remove the mosquitto branding, suggestions as what to use instead would be appreciated. paho? mqttv3?
Comment 1 Andy Piper CLA 2013-03-20 20:53:52 EDT
Thanks Roger - a pure Python MQTT client is appreciated!
Comment 2 Roger Light CLA 2013-03-22 19:27:38 EDT
Created attachment 228949 [details]
Current code, as in mosquitto repository.
Comment 3 Andy Piper CLA 2013-04-12 10:50:45 EDT
CQ #7814
Comment 4 Andy Piper CLA 2013-04-15 06:08:23 EDT
Comment from CQ -

"The attachment contains a license relating to other third party libs see
"library-3rd-party.txt".  I'm assuming it was included in error?  For
completeness, it is being excluded from forming part of this review and does
not apply to checkin.

On that note, you are clear for checkin based on Parallel IP, minus the third
party license file, and subject to the source headers being amended to contain
the default Eclipse copyright and license headers [1] which are currently not in
place.  

We will perform a comprehensive analysis in due course."
Comment 5 Roger Light CLA 2013-04-18 16:49:51 EDT
The LICENSE-3rd-party.txt file includes all licenses used by the whole of the mosquitto project. Of the licenses listed, only the OpenSSL one is relevant to the Python code, the others should definitely be removed.

Including the OpenSSL license is possibly overkill. I think to comply with the OpenSSL licenses the lines below must be included in the mosquitto.py source file:

"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)
This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)
This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
Comment 6 Andy Piper CLA 2013-04-19 11:52:57 EDT
Discussion of the naming convention used by this code on the paho-dev list:
http://dev.eclipse.org/mhonarc/lists/paho-dev/msg00511.html

The existing Eclipse naming conventions are strongly tailored to Java and are primarily from the Sun naming guidelines. http://wiki.eclipse.org/Naming_Conventions

We want to choose a meaningful noun for the class name - Paho is not necessarily just MQTT so we might want to use either PahoMQTT or MQTT to be specific to the protocol. Would that fit with Pythonic conventions though? Is there anything else to consider beyond the existing Mosquitto class name / namespace?
Comment 7 Roger Light CLA 2013-04-19 16:46:34 EDT
I sent this by email but I'm not sure whether it worked, so here it is again with a bit more commentary. 

> Is there anything else to consider beyond the existing Mosquitto class name /
> namespace?

Error numbers (MOSQ_ERR_*)
Log levels (MOSQ_LOG_*)
Automatic client id generation ("mosq/.....")
Callback first parameter is documented as "mosq".

I think that's about all that is outward facing.

We could possibly make a paho module that has mqtt as a submodule. You could then do "from paho import mqtt" and so on. It's a bit over complicated if mqtt is the only submodule, but allows for expansion for other protocols. I'm not sure how this would work if we have separate repositories like org.eclipse.paho.mqtt.python and org.eclipse.paho.<something else>.python.
Comment 8 Ian Craggs CLA 2013-04-30 05:29:30 EDT
We can always refactor the source repositories later if by the addition of more components a new structure becomes needed.

I like the idea of having an mqtt submodule of a paho module, although, yes it could be viewed as overkill.  On the other hand, it is just as easy to import:

"import paho.mqtt"

"from paho.mqtt import *"

So, I'm inclined to go with that.

We don't have to clean everything up before submitting the code.  Do you want me to create a new Python repository?
Comment 9 Roger Light CLA 2014-02-04 05:05:54 EST
The code has been committed for a while now.