Separating LoLo and SpaceApi

7 views
Skip to first unread message

Padraic Harley

unread,
Nov 16, 2012, 6:27:06 AM11/16/12
to 091lab...@googlegroups.com
LoLo is strictly thought of as 'Labs On; Labs Off' and only deals with a small piece of what the SpaceApi can be used for. Over the next while I intend to make it so that any changes to the json file are coming from one place and it's just being called from LoLo as opposed to being a part of it. The same goes for being able to change the rest of the fields in the file.

Does anyone have any advice on a good way to go about it or any decent links?

Cheers,
Padraic

Richard Conroy

unread,
Nov 16, 2012, 8:00:28 AM11/16/12
to 091lab...@googlegroups.com
So you actually want 2 applications now ...
   the LoLo app itself, 
   and something that is a service endpoint for the SpaceApi ?

there are actually quite a few ways to do the second point, roughly equivalent to the number of cats to be skinned.

It might be worth seeing how SpaceApi is hosted elsewhere. There might be a deployable project that works out of the box, or may be readily adapted.

Padraic Harley

unread,
Nov 16, 2012, 8:55:13 AM11/16/12
to 091lab...@googlegroups.com
Aye, I should explain it a bit better.

LoLo specifically deals with the open/closed status of the 091 Labs building.

SpaceApi deals with the general public information for a hackerspace of which open/closed (LoLo) is a single part.

LoLo code on the server should be completely separated from the SpaceApi code and instead be making a call to it.

This will allow SpaceApi more freedom to be accessed by other upcoming Labs projects (like Project F5) and releases LoLo from dealing with updating the json file.

==

We have
  1. LoLo: the Android app
  2. lolo-server : The part that listens for the button, changes the SpaceApi json file, and changes the image on the site

SpaceApi is the general spec for the json file - https://hackerspaces.nl/spaceapi/ - that many hackerspaces around the world now use for showing the status of their space. As you can see in the link is have many available fields that wouldn't suit LoLo to look after and is also extendible for our own custom things,

e.g. { membership : { fees : { student : "€20", unemployed : "€20", employed : "€30", } form : { url : "https://stack.091labs.com/form " } types : { student : "details", unemployed : "details", employed : "details" } } }

I'd like lolo-server to make a call on a SpaceApi-focused app that deals with editing the json file. That SpaceApi app should be able to be called by various other apps like the Access Control one.

-- 
Padraic Harley

Phone: +353 (0)85 213 8803
Email: pad...@091labs.com
Tweet: @pauricthelodger

Richard Conroy

unread,
Nov 16, 2012, 10:15:17 AM11/16/12
to 091lab...@googlegroups.com
This is a very clear separation of concerns, I like the thinking behind the structure, and in particular how bite sized the work is.

I think I will have a look at what is involved in making a basic SpaceApi server and getting it published somewhere. There is some good documentation on it, and even a validator.

Aaron Hastings

unread,
Nov 16, 2012, 10:52:19 AM11/16/12
to 091lab...@googlegroups.com
I've installed Git on my machine and have cloned the repo. I've also branched the project into my own private view.

Right, I have no idea what any of that means... woo coding!

Richard Conroy

unread,
Nov 16, 2012, 11:16:42 AM11/16/12
to 091lab...@googlegroups.com
The joy of code.

FYI, never push directly to master.

Always branch off of an up to date local copy of master:
git checkout master
git fetch
git merge origin/master
git checkout -b my-new-branch
<change stuff>
git add <files, or top level directories>
git commit -m "Yay new changes"
git push origin head

Then go to github.com and issue a pull request for my-new-branch to pull it into master


Padraic Harley

unread,
Nov 16, 2012, 12:14:29 PM11/16/12
to 091lab...@googlegroups.com
For me, I've forked the repo from the 091labs org to my pauricthelodger account.

I was planning using the org as the official upstream with each person having a personal fork to then make pull requests from?

If that's not the best way I'm cool with that!

Padraic Harley

unread,
Nov 16, 2012, 12:18:42 PM11/16/12
to 091lab...@googlegroups.com
The validator is absolutely powerful, I love it =)

spaceap...@lists.hackerspaces.com is the global list for it as well if you want to take a look!


On 16/11/12 15:15, Richard Conroy wrote:
This is a very clear separation of concerns, I like the thinking behind the structure, and in particular how bite sized the work is.

I think I will have a look at what is involved in making a basic SpaceApi server and getting it published somewhere. There is some good documentation on it, and even a validator.
On Fri, Nov 16, 2012 at 1:55 PM, Padraic Harley <pad...@091labs.com> wrote:
Aye, I should explain it a bit better.

LoLo specifically deals with the open/closed status of the 091 Labs building.

SpaceApi deals with the general public information for a hackerspace of which open/closed (LoLo) is a single part.

LoLo code on the server should be completely separated from the SpaceApi code and instead be making a call to it.

This will allow SpaceApi more freedom to be accessed by other upcoming Labs projects (like Project F5) and releases LoLo from dealing with updating the json file.

==

We have
  1. LoLo: the Android app
  2. lolo-server : The part that listens for the button, changes the SpaceApi json file, and changes the image on the site

SpaceApi is the general spec for the json file - https://hackerspaces.nl/spaceapi/ - that many hackerspaces around the world now use for showing the status of their space. As you can see in the link is have many available fields that wouldn't suit LoLo to look after and is also extendible for our own custom things,

e.g. { membership : { fees : { student : "�20", unemployed : "�20", employed : "�30", } form : { url : "https://stack.091labs.com/form " } types : { student : "details", unemployed : "details", employed : "details" } } }

I'd like lolo-server to make a call on a SpaceApi-focused app that deals with editing the json file. That SpaceApi app should be able to be called by various other apps like the Access Control one.

On 16/11/12 13:00, Richard Conroy wrote:
So you actually want 2 applications now ...
� �the LoLo app itself,�
� �and something that is a service endpoint for the SpaceApi ?

there are actually quite a few ways to do the second point, roughly equivalent to the number of cats to be skinned.

It might be worth seeing how SpaceApi is hosted elsewhere. There might be a deployable project that works out of the box, or may be readily adapted.
-- 
Padraic Harley

Phone: +353 (0)85 213 8803
Email: pad...@091labs.com
Tweet: @pauricthelodger

Richard Conroy

unread,
Nov 16, 2012, 12:25:29 PM11/16/12
to 091lab...@googlegroups.com
It is generally more work than necessary to do a complete fork.

Most forks stay forked and dont get pulled back into the origin.

If you dont have PUSH -> Master rights its the only way to do it, but for an internal team it can be a hassle, especially if people are just getting their feet wet with Git

Padraic Harley

unread,
Nov 16, 2012, 12:28:06 PM11/16/12
to 091lab...@googlegroups.com
Fair enough so, it makes is easier on myself too that way =)

Padraic Harley

unread,
Nov 16, 2012, 12:47:19 PM11/16/12
to 091lab...@googlegroups.com
Okay, I've put a branch named 'dev' up there for people to push stuff that is almost ready for master to.

Right now, I'm working out how to use hooks with git for Scruffy (the labs server) so that it can automatically update the live LoLo stuff from master.

Richard Conroy

unread,
Nov 26, 2012, 6:09:49 AM11/26/12
to 091lab...@googlegroups.com
Just to let you guys know, I have been working on creating a SpaceApi server in ruby.

It is coming together pretty well (the JSON is validating), and it should be hostable on a free service like Heroku without any major effort.
I am focusing on making it work well for lolo first, but long term all fields should be editable and persistable.

I am doing this in a test driven way, and its taking a while to make json output testable.

Android Stream

unread,
Nov 26, 2012, 8:05:01 AM11/26/12
to 091lab...@googlegroups.com

Great.. let us know when is ready

Send from a portable device

Reply all
Reply to author
Forward
0 new messages