[Spaceapi-devel] 0.13 suggestions
slopjong
slopjong at syn2cat.lu
Sun Apr 7 22:41:22 CEST 2013
On 2013-04-06 11:03, Andrew Elwell wrote:
> Hi there,
>
>> I'm not sure if this is really wanted by the community. Dynamic
>> versioning
>> means that the directory _must_ poll every spaceapi json every XX
>> seconds in
>> order to get the 'open' state.
>
> eh? I think we've mis-understand each other - having a specific
> version in the path related to the URL means that an app for version
> 1
> won't break when we start testing new features and apps with version
> 2
> as they have a slightly different endpoint.
Do you mean something like
http://openspace.slopjong.de/directory.json?api=0.12 where the directory
delivers a list with all the endpoints which support this version?
If so, that's on the roadmap.
>
>> At the moment I cache the JSONs once a day except the space defines
>> explicitly a cache schedule.
>
> ah OK - but do you need to cache the JSON itself (OK much of the
> metadata is static and doesn't change frequently - how often do
> spaces
> change address) as the status open/closed is pointless being cached
> for 24h
The directory revalidates the JSONs. If an endpoint is not accessible
which happens more often than I thought, the cached version will be
returned. And some spaces use the cache as a proxy to reduce their own
web server traffic since a couple of web apps poll quite a lot.
>> Now and then new spaceapi web apps are developped which poll the
>> spaces, we
>> ask if the directory is allowed to poll every 30 seconds.
>
> in which case why not make the 'directory' just that - a list of
> endpoints for apps to go and choose from - I may be interested in the
> open closed status of those in my city but not others
The directory is not just a directory but an in-built (re)validator
with a notification mechanism. It's also offering filters in order to
grab only those endpoints which have certain JSON fields defined. Go to
http://openspace.slopjong.de and click on Directory right below the
editor. There are a few examples of how to use these filters.
> I have a feeling we're mis understanding each others goals here.
> sketch time?
Maybe, I'm not sure. But for outsiders (non-developers) the directory
looks "simple" but it isn't. It has a couple of features ;-)
Slopjong
More information about the Spaceapi-devel
mailing list