Janmesh.net > Documentation - Ocsad
Ocsad - Open Cjdns Services Announcement and Discovery
Ocsad is currently in "early design" phase. This page is here to introduce design to be used and to help developpers collaborate.
Ocsad is a cross-platform GUI application written using Python-GTK3 and Glade.
It has the purpose to provide a way to :
- publicly announce which open services are running on the hosting machine and allow other users of the cjdns network to discover and therefore use them.
- discover open services available on other Ocsad-enabled stations or devices of the cjdns network.
The git repo was just created: https://github.com/janmeshnet/ocsad and currently allows to see how the UI of the app may look. It requires GTK3, Python, Python-GTK.
The discovering and announcement features are provided this way :
For the announcement side, the advertizer listens on the 22557 port. Each times a client connects, it delivers a formated response which is a formated list of any open service on this machine that its user wanted to advertise, and that are hopefuly currently running, usable, on it.
For the discovering side, the crawler sends API queries to the cjdroute process running on the same machine, in order to optain ipv6 adresses of closest peers, their closest peers, and so on. Then these hosts at the ipv6 addresses got their 22557 port scanned for a possible reply of an Ocsad advertizer, then the crawler stores the response's data if any.
Main window tabs
The section with emphasis starting below is a bit outdated and keep for reference, but building from git and see the working UI is quite more precise for features and navigation concepts
The main window is made of tabs. The default tab is the "favorite tab". This tab lists the stations currenly marked as "favorite" and allows to see and access their currently live open services. The informations from the "Favorite" tab are build at startup by the crawler querying each favorite. Non responding ones are marked offline.
The next tab is the "search tab". It allows to search in what currently contains the library local storage of gathered information from already crawled peers. The search can by filtered to one or more fields that are made available by the other computer owner's advertizer for each of its entries. Namely "service name", "service description", "service port", "service protocol", "service url prefix" (available only if applicable), "service custom prebuilt url" (available only if applicable).
Once the search starts, the tab display matching peers, allowing to see matching service and to access other service's list.
The next tab is the "publicly listed open services" tab, which allows to edit the following fields (all of them are optionals)
-the free form "station name", meant to be a short and memorable handle to help other people find and find again the profile and who is behind. The field can be up to 140 characters but long name are likely to be displayed truncated by clients.
-the GPS-style decimals indicating the latitude and longitude of real world geographical coordinates of the station, as the user whished to have them set if so.
-an url of a (cjdns networK) live web (http) server-served digital image file that will be used by client sofwares as a personnal avatar to represent the machine or its operator. Of the form http://[<ipv6 address>]:<port>/path/to/image.extension.
-a free form long description of station's services, aims, services-related information. Cannot be more than 5000 words.
-the formated services list, with the following informations indicated, one par line, in this order, with the indicated maximum size : "service name" (30 characters), "service description" (250 words), "service port" (5 digits), "service protocol" (140 characters), "service url prefix" (can be a blank line, 24 characters), "service custom prebuilt url" (can be a blank line, finited values character count only)
The next tab is the "settings" tab, allowing to set parameters like:
Delay between two services query : an arbitrary number expressed in seconds, with microsecond digit precision, indicating how long the crawler should pause each time it finished to crawl a node before it send query to the next one in queue.
The next tab is the Journal tab, which logs events and actions occuring while using the software.
The menu bar presents :
Help : About
Ocsad does not make uses of SQL databases and manages data storage by Collections.OrderedDict serialization. The actual files on disk should be storing the smallest possible information unit each, and general code design should tend to load these units for a small duration only.