[deepamehta-devel] Freifunk API Query Client with DeepaMehta?
Malte Reißig
mre at deepamehta.de
Fri Jun 27 16:42:47 CEST 2014
Hi Andreas!
Thank you for introducing this idea, I like it.
I hope you can take something out of my observations (see below) of the
FF API and some of my experiences I made when starting a DM4 plugin.
All the best!
On 23.06.2014 23:59, Andreas BrРїС—Р…u wrote:
> Since then we tried to work with DM and understand it. We identified 3
> main subjects:
> - map our json schema to topic types
> - import data from API files
> - perform a search via web client
I read myself through how the Freifunk API works and yes, these three
steps would be exactly what we would need to do.
>From your repo:
https://github.com/freifunk/directory.api.freifunk.net/blob/master/directory.json
I took out http://paderborn.freifunk.net/ffapi.json and had a closer
look into an exemplary api-file (all what comes is based on just looking
at that file, as it was a bit easier for me to read as the specs, but
thus my tips may be incomplete), and maybe you want to:
1 also map the directory-file (with all entries) to TopicTypes
Advantage 1: Human editable Entries via the DM4 Webclient
Advantage 2: The java-code necessary to import the directly-file
could provide handy for (a) other installations or (b) re-import later
I think this would be a sensible approach and is relatively few
effort (compared to the rest)
2 on each TopicType you have to chose at least one (up to three, four?)
index modes, depending on the value you store in the TopicType and the
queries you want to fire later at it (see also other migrations)
two rules of thumb I use: add "dm4.core.key" index-mode where the
child-type value functions as a key for the parent type, and add
"dm4.core.fulltext" if you want to find the (next parent TopicType
where "searchable_as_unit" is set to "true", in this case probably)
"Freifunk Community" via th "By Text"-Search (== the default Text
Search Mode) in the DeepaMehta 4 Webclient == Standard GUI)
3 probably want to extend the "dm4-contacts"-Address TopicType about
an additional "Address Name"-TopicType (since the "FF Community Name"
and the place where this FF Community has their "base" are different)
4 probably you need an extension in dm-core, the "dm4-geomaps" plugin,
allowing you to store the custom geo-coordinates set by your
community (and not the one, google codes to the given address-
value) - but: Is this very important for your use case, do you know
the data and specifically the community-chosen coordinates well?
5 to model "URLs" in DeepaMehta 4 just re-use "dm4.webbrowser.url" in
your migration
6 to (later) be able to use advance numeric-range queries in DM4 it
probably makes sense to store timestamps as milliseconds directly
(though I guess the necessary index-mode for plugin developers is
missing yet) - but this way, you get range-queries later without any
further data-wrangling work
For now, just looking at one special query use-case one could find in
the blogpost you send around (i got):
- All contact mailinglists for all communities.
- Sum over all node numbers of all communites
- Show the name and webpage of all communities that use OLSR for
routing.
I agree with what the others say, lets save the fun to solve all of them
for later :)
Just a question about the last one: By which value (in the api-file)
could one identify if a community uses OLSR for routing? Is this aready
coded in the "techDetails"-Section / specific by your specs?
If well defined, it would be as simple as setting the index mode of the
resp. TopicType to "dm4.core.key" and just fetch all "Freifunk
community"-Topics with the resp. by the value (e.g "use-olsr-routing")
> Maybe some of you have ideas how or know best practices on our subjects
> and can support us on creating the query client.
>
> There's already a Google Summer of Code project running:
> http://blog.freifunk.net/2014/gsoc-freifunk-api-query-client
How would the GSoC project be related to the efforts creating the
query-client with DeepaMehta? Is there gonna be some manpower to make
things work? Just curious because I read on your blogpost that there is
another client already in development resp. ready? Thanks for the
information.
More information about the devel
mailing list