(ˢᵒᶜⁱᵉᵗʸlog)
(ˢᵒᶜⁱᵉᵗʸserver)
(ˢᵒᶜⁱᵉᵗʸtask)
Chandler
REST
angular.js
coding-for-fun
cordova
css
hackerspace
installation
javascript
mockups
multi-language
nReduce
pike
publishing
retreat
sTeam
stylesheets
user-interface
virtual hosting
xiamen

The REST API is developed as an application inside the sTeam server. This simplifies development quite a lot, as we don't need to restart the server for every change. Instead the just the API code gets updated and reloaded. It may eventually be integrated into the core, however the longterm plan is actually to move functionality out of the core, to make development easier.

Over the summer, Trilok has been improving the export and import tools, so now we can finally export the whole development history of the REST API to git, and we can import that git history into other servers. Using git, we can also easily merge development done on different servers.

To get the current version of the API clone the repo into your home or to any place where you keep your development repos. Then change to the tools directory of your installation and run import-to-git.

git clone https://github.com/societyserver/steam-rest
cd steam-rest
git checkout origin/rest.pike
export steamrest=`pwd`
cd /usr/local/lib/steam/tools
./import-from-git.pike -u root $steamrest /

It is important that the first import is done as root because the API code needs to run with root privileges and it will only do that if the object that holds the source is created as root.

Once the api code is loaded there are just a few tweaks needed to make it work.

We need to fix the mime-type, as the import script is not doing that yet.

OBJ("/sources/rest.pike")->set_attribute("DOC_MIME_TYPE", "source/pike");

changing the mimetype will change the class of the rest api script from Document to DocLpc.

> OBJ("/sources/rest.pike");                                               
(1) Result: 127.0.0.1:1900/rest.pike(#840,/classes/Document,17,source/pike)
> OBJ("/sources/rest.pike");                                               
(2) Result: 127.0.0.1:1900/rest.pike+(#840,/classes/DocLpc,529,source/pike,0 Instances, ({  }))

this takes a moment, check the type a few times until it's done.

Then instantiate an object from the source, give it a proper name, and move it to the /scripts/ container"

object rest = OBJ("/sources/rest.pike")->provide_instance();
rest->set_attribute("OBJ_NAME", "rest.pike");
rest->move(OBJ("/scripts/"));

Instantiating the object needs to be done as sTeam-root, in order for it to have permissions to run on behalf of other users.

Once this is done you are ready to start using the API.

Author :mbaehr   |   size :2603Bytes   |   Publish Date :Jan/14/16/08:18   |   to Top

After you installed and set up a basic sTeam server, you'll want to update to the latest development state. there are some significant changes in there, some of which are documented in the articles below.

Because we don't have a way to run a development server directly from the source repo, and we don't want to reinstall for every change, we instead track changes in a runtime repo directly from the directory where the server is installed. This will change eventually, but probably not until we have restored the original sTeam development history.

To get this runtime repo, you first clone https://github.com/societyserver/sTeam.git to a temporary directory:

cd /tmp
git clone https://github.com/societyserver/sTeam.git
cd sTeam

and check out the version that matches an initial installation:

git checkout 49a79885aa509427c818f8ecc6bf3c78e056b4be;

the worktree should now match your installation except for a few files. we can now copy the .git directory to our installation:

cp -avi .git /usr/local/lib/steam/;

and verify it:

cd /usr/local/lib/steam/;
git status
# HEAD detached at 49a7988
# Changes not staged for commit:
#   (use "git add/rm ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working directory)
#
#       deleted:    .gitignore
#       modified:   server/libraries/Test.pmod
#       modified:   version
#
# Untracked files:
#   (use "git add ..." to include in what will be committed)
#
#       bin/steam
#       server/libraries/coal.so
#       server/libraries/steamtools.so
#       server/libraries/wiki.so
#       server/libraries/xml.so
#       server/libraries/xslt.so
#       tmp/
no changes added to commit (use "git add" and/or "git commit -a")

you are missing .gitignore, so let's fix that:

git checkout -- .gitignore

run git status; again to see what that did:

# HEAD detached at 49a7988
# Changes not staged for commit:
#   (use "git add ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working directory)
#
#       modified:   server/libraries/Test.pmod
#       modified:   version
#
# Untracked files:
#   (use "git add ..." to include in what will be committed)
#
#       tmp/
no changes added to commit (use "git add" and/or "git commit -a")

most of the untracked files are gone, because they are listed in the .gitignore.

you may or may not see

#       modified:   server/libraries/Test.pmod
#       modified:   version

it depends on how you patched Test.pmod, and on your pike version:
git diff; will show you:

diff --git a/server/libraries/Test.pmod b/server/libraries/Test.pmod
index 4378768..aea5e3a 100644
--- a/server/libraries/Test.pmod
+++ b/server/libraries/Test.pmod
@@ -98,7 +98,7 @@ int start_test ( object|void obj ) {
   if ( suite["started"] == 0 )
     suite["started"] = time();
 
-  object first_test = TestCard( obj, obj->test, 0, 0);
+  object first_test = TestCard( obj, obj->test, 0, 0 );
   suite["pending_calls"] += ({ first_test });
   first_test->enqueue();
   return 1;
diff --git a/version b/version
index 7944427..b32c4b6 100755
--- a/version
+++ b/version
@@ -1 +1 @@
-Pike v7.8 release 700
+Pike v7.8 release 866

i have a newer pike version, and i added an extra space in the patch for Test.pmod

we can fix Test.pmod:

git checkout -- server/libraries/Test.pmod

we'll ignore version for now.

now that we are confident that the installation matches the repository, we can update to the latest development state:

git checkout origin/societyserver-devel -b `hostname`-devel;
git status;
# On branch -devel
# Changes not staged for commit:
#   (use "git add ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working directory)
#
#       modified:   version
#
# Untracked files:
#   (use "git add ..." to include in what will be committed)
#
#       tmp/
no changes added to commit (use "git add" and/or "git commit -a")

there! your server is now up-to-date. you can now track your changes, and send us patches. don't forget to restart.

and we can now use the updated tools to import the REST API.

Author :mbaehr   |   size :4610Bytes   |   Publish Date :Sep/5/15/08:08   |   to Top

these are the commands needed to install sTeam from source on CentOS 6.5

Pike

  yum install mysql-server mysql-devel bzip2-devel libjpeg-devel  libpng-devel zlib-devel pcre-devel freetype-devel gmp-devel make nettle-devel gcc tar
  # in centos 7 install mariadb-server instead
  get the pike source from http://pike.lysator.liu.se
  unpack...
  make
  make install

sTeam

  # get steam 2.9 from git repo
  git clone http://github.com/societyserver/sTeam.git
  cd sTeam
  git checkout steam-2.9-source
  # get webinterface
    https://raw.githubusercontent.com/societyserver/sTeam/steam-packages/web-2_2_17.spm
  # patch line 101 in server/libraries/Test.pmod
  # line should be "object first_test = TestCard( obj, obj->test, 0, 0);"
  yum install libxml2-devel libxslt-devel automake flex
  /etc/init.d/mysqld start
  # centos 7: systemctl enable mariadb; systemctl start mariadb
  # centos 7: patch xslt.c following these instructions
  ./build
  ./install
  # start the server:
  cd /usr/local/lib/steam/
  ./start

  # install the webinterface with the spm tool:
  /usr/local/lib/steam/bin/spm -i web-2_2_17.spm
  
  # login at https://localhost/ (username "root", password "steam")

  # optional: set up your system to start sTeam automatically
  chkconfig --add steam
  chkconfig steam on

at this point you should have a running server

for other linux distributions you may need to adapt the package names, and you may also run into versioning issues with regards to libxml and libxslt. in future versions i intend to remove the libxml/libxslt support. (pike itself has xml support for your development needs. libxml is only needed for libxslt, and i want to remove the latter.)

Author :mbaehr   |   size :2043Bytes   |   Publish Date :Aug/31/15/15:16   |   to Top

(ˢᵒᶜⁱᵉᵗʸserver) aims to be a platform for developing collaborative applications.

What are the elements of collaboration?

  • People
  • Documents
  • Communication

In a collaboration platform we need features to manage these elements.

One way to manage them is to organize and structure them.

People are organized in groups. Groups are structured into hierarchies. Documents are structured into topics, areas or containers. Communication is structured into topics, threads.

In this article we'll focus on documents and how to structure them.

The primary concept to structure documents in sTeam is a Room. Rooms can be nested, and they can have Doors or Gates to connect them. Doors can be one-way or bidirectional.

Imagine a library, each room is designated to a topic. The room is divided up by shelves, each about a different subtopic. There are doors that lead from one room to the next. Or visit an art-gallery. Again each room is designated to pictures of a certain topic. A guided tour lets you follow a path in one direction from one room to the next.

Now picture yourself as the librarian, or the gallery-curator. Not only will you want to read the books, or look at the pictures, but you are the one to decide on the structure, so you will want to layout the rooms and connect them according to the topics that you cover, and the order in which the gallery should be explored.

We need to find a way to model this kind of structure in a two-dimensional web-interface. The navigation between Rooms, the ability to create and move rooms, creating one-way or bidirectional Doors.

Now we need to look at the documents: There are many kinds of documents:

    markup-text (markdown, html, others)
  • xml, json, csv
  • source-code
  • image
  • audio
  • video
  • binary
  • object (instance of a script)

Some documents consist of different parts:

  • archive (zip, tar.gz)
  • multipart document
  • multilanguage document

We probably want to somehow distinguish those visually.

Again, you are the librarian or gallery-curator and you want to move books and pictures around to their topics. You will add new books, or update them with new editions. You will remove books that are obsolete, or move them into an attic. You may feature some books on a display table, and store others in the shelves.

You may arrange them by title, or by author, or maybe by date.

From this mental model we can extract a few actions that are common to all documents:

  • move
  • rename
  • copy
  • link
  • sort

You have a whole team of librarians, and each one is responsible for a specific area. Your librarians are working together to decide how the books should be structured. They add comments, descriptions, keywords and other attributes. They also decide who should be able to read a book. Is it suitable for children?

  • access control
  • annotations
  • keywords
  • attributes

Lets take a more concrete example: A group of academics working on a research project.

There is code, papers, reports, data, references to other work and to external resources. They will need to be organized in topics according to the different aspects of the research project. As the research progresses, and new things are learned, topics will need to be adjusted, papers rearranged, reports updated, references and connections between topics changed.

The structure lives and evolves. and so do the documents.

In conclusion, there is a lot of activity around document management, and there are many different scenarios possible.

Author :mbaehr   |   size :4081Bytes   |   Publish Date :Feb/7/15/05:49   |   to Top

(ˢᵒᶜⁱᵉᵗʸserver) is a platform for the collaborative building of websites.

(ˢᵒᶜⁱᵉᵗʸserver) is not a webserver but also integrates with a number of other protocols. it features integration with communication services like email, chat and supports a programming API for rich client development.

You can use (ˢᵒᶜⁱᵉᵗʸserver) to build your own sites or ask us to build them for you.

(ˢᵒᶜⁱᵉᵗʸserver) is built with ᵒᵖᵉⁿsTeam(pdf), a project by the University of Paderborn in Germany, lead by Prof. Dr. rer. nat. Thorsten Hampel. (Obituary)

Our current focus is the development of the REST API and frontend applications using that API.

If you are interested to know more about (ˢᵒᶜⁱᵉᵗʸserver) or even want to contribute (we are looking for javascript developers and non-technical contributors (marketing, business development, etc)) please contact Martin Bähr at martin(at)realss(dot)com

Author :mbaehr   |   size :1456Bytes   |   Publish Date :Apr/29/17/10:54   |   to Top