Why REST API and what qualifies as a REST API (load balancing + whois)


Well as REST API (Application programmable interfaces) go they are one that are mainly URL or form method POST directive only, part of the reason they are like this for example say you have a whois intensive application and for some reason some of the domain nics are rejecting your IP cause of two main lookup what you do is for example you made http://whois.snails.email you would then make on independant IP addresses the following for example remember whois api is not a heavy load so it can sit on multiple of your IP addresses without a question what you do is have the following where each of these are in an independant IP address:

Where you then make whois.snails.email redirect to a selection based and shuffled on their query source referee URL IP Address or $_SERVER[‘REMOTE_ADDR’] which has a cache that redirect each to each one once dropping that from the list to do until the listing refreshes, to bounce the queries around coming from different IP addresses this would be done in the whois.snails.email with:

 <?php header('Location: http://1.whois.snails.email/v2/bluehost.com/json.api'); ?>

where cURL and the rest will redirect to this and get the query result.

Advertisements

CSS + Soda-pop Backgrounds not Starch Colours – Stop Doing me in Blind Physics please for SEO, etc…


The following examples you will have to write code to generate the CSS you would normally for example set this to a css like #white, .white { … }; which would randomly interpolate, the colour we will be discussing is the commonly used starch white for the background colour, I am finding this is bring me back here to this result as a functional non-diversity of taking a channel of blind user physics with this not implemented which is centroidal in the business structure of the website implementing starch colours like starch white rgba(255, 255, 255, 1.0);

In this you have to generate a changing gradient that randomly changes in the background of the website that is exact to slight so the bands in the gradient in starch white would change from range of 251 – 255 for example so there is no distortion this change you only do within a range that the colour change is not immediate evident for example some CSS3 Gradient code example for a soda white is as follows (you will find a run of gradient css example here – http://css.snails.email/3/gradientee/stylesheet.css) :-

html  {
    background: -moz-linear-gradient(45deg, rgba(251, 251, 251, 1.0) 72.233846153846%, rgba(253, 253, 253, 1.0) 5.1034782608696%, rgba(255, 255, 255, 1.0) 10.942203389831%, rgba(252, 252, 252, 1.0) 51.197659574468%, rgba(255, 255, 255, 1.0) 13.766790123457%, rgba(251, 251, 251, 1.0) 34.8471875%, rgba(254, 254, 254, 1.0) 21.193611111111%) !important; /* FF3.6+ */
    background: -webkit-gradient(linear, left bottom, right top, color-stop(72.233846153846%, rgba(251, 251, 251, 1.0)), color-stop(5.1034782608696%, rgba(253, 253, 253, 1.0)), color-stop(10.942203389831%, rgba(255, 255, 255, 1.0)), color-stop(51.197659574468%, rgba(252, 252, 252, 1.0)), color-stop(13.766790123457%, rgba(255, 255, 255, 1.0)), color-stop(34.8471875%, rgba(251, 251, 251, 1.0)), color-stop(21.193611111111%, rgba(254, 254, 254, 1.0))) !important; /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(45deg, rgba(251, 251, 251, 1.0) 72.233846153846%, rgba(253, 253, 253, 1.0) 5.1034782608696%, rgba(255, 255, 255, 1.0) 10.942203389831%, rgba(252, 252, 252, 1.0) 51.197659574468%, rgba(255, 255, 255, 1.0) 13.766790123457%, rgba(251, 251, 251, 1.0) 34.8471875%, rgba(254, 254, 254, 1.0) 21.193611111111%) !important;  /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(45deg, rgba(251, 251, 251, 1.0) 72.233846153846%, rgba(253, 253, 253, 1.0) 5.1034782608696%, rgba(255, 255, 255, 1.0) 10.942203389831%, rgba(252, 252, 252, 1.0) 51.197659574468%, rgba(255, 255, 255, 1.0) 13.766790123457%, rgba(251, 251, 251, 1.0) 34.8471875%, rgba(254, 254, 254, 1.0) 21.193611111111%) !important; /* Opera 11.10+ */
    background: -ms-linear-gradient(45deg, rgba(251, 251, 251, 1.0) 72.233846153846%, rgba(253, 253, 253, 1.0) 5.1034782608696%, rgba(255, 255, 255, 1.0) 10.942203389831%, rgba(252, 252, 252, 1.0) 51.197659574468%, rgba(255, 255, 255, 1.0) 13.766790123457%, rgba(251, 251, 251, 1.0) 34.8471875%, rgba(254, 254, 254, 1.0) 21.193611111111%) !important; /* IE10+ */
    background: linear-gradient(45deg, rgba(251, 251, 251, 1.0) 72.233846153846%, rgba(253, 253, 253, 1.0) 5.1034782608696%, rgba(255, 255, 255, 1.0) 10.942203389831%, rgba(252, 252, 252, 1.0) 51.197659574468%, rgba(255, 255, 255, 1.0) 13.766790123457%, rgba(251, 251, 251, 1.0) 34.8471875%, rgba(254, 254, 254, 1.0) 21.193611111111%) !important; /* W3C */
}

Rebuild of the font resources svn for font.labs.coop!!


image

I have been rebuilding the font resources for the font API I have been building for the last couple of months.. After only processing over 2600 fonts, I realise I am going to be able to operate most of the site but due to the size of large font uploads the /fonts folder will be WebDAV from the vps I have been trialling, as I have enough saved to pay for maybe 36/48 months of runtime at the moment…

It take on average to have all the font files per font in a zip around 2-4Mb zipped but some of the font files have reached 20Mb even 120Mb when large amount of glyph are present in the font… So the svn on what I have so far managed too collect which is around 500k fonts to crash with font forge, I hope too see a large svn at some point with this odd 1000 it is already 6.6Gbs…

I am going to be making an app at first which is the on-screen browser on au.syd.labs.coop where ppl can preuse fonts downloadable, I haven’t used my web crawler yet which is in it – it could take a week or so of constant website crawling looking for more fonts..

So that’s what I have been upto :-//

Door of the Hinge to you Dela? Little trick to hit-the-door here!


You know my dela; since bumping into you at centerlink and comparing a crystal pyrex funnel which as I said was brand new outside the office but had residue around us on the inside, I know you have been attempting to hit the door at http://whois.domaintools.com/labs.coop so here is how to unlock the stairwell in bullet point form for you:-

  1. Register at http://au.syd.labs.coop – This is running from within the premise
  2. Do a couple of forum posts on – http://au.syd.labs.coop
  3. Door should be accessible by the next sunrise!

Basically there is a newly fitted brass lock on our front door, which looking at the commodity prices; is around 9 times more expensive than gold, so it has to be a brassed off or brassed on type post to envalue the door!

Clean Carèt (Cursor/Kerser) with fonts.labs.coop – Fonting Repository API!!


Around 3 years ago I wrote the original fonting API version 1.x – you can see it still running at https://fonts.ringwould.com.au; I have been working on a new version, currently 2.2.6 is the version number running on http://fonts.labs.coop at the moment.
You can see for example the image that I have used in the header is generated by the API, the URI for it is as follows: http://fonts.labs.coop/v2/font/dad0c93e29abefe525fb28a48f6971b1/preview/png.api. A glyph, unicode п preview is the following URI: http://fonts.labs.coop/v2/font/dad0c93e29abefe525fb28a48f6971b1/glyph/1087/png.api; which if you wanted the data on the font would be the following URI: http://fonts.labs.coop/v2/data/dad0c93e29abefe525fb28a48f6971b1/json.api.
Just say you wanted to download the font in nearly every format ever needed even *.ik for mobile phones you can download a 7zip pack for this font from the following URI: http://fonts.labs.coop/v2/data/dad0c93e29abefe525fb28a48f6971b1/7z/download.api or what about it in an rar, the URI will do that: http://fonts.labs.coop/v2/data/dad0c93e29abefe525fb28a48f6971b1/rar/download.api or even a zip file if you want it would be the URI: http://fonts.labs.coop/v2/data/dad0c93e29abefe525fb28a48f6971b1/zip/download.api.
It has a git repository you can pair with that the API uses as an offline cache for less than popular fonts so the server doesn’t fill up with endless amounts of fonts that are never used you can find this here on this URI: https://sourceforge.net/p/chronolabsapis/fonting/ci/master/tree/ (which is automated with the server). So if you wanted to download all the fonts you would get a copy of the git, when I last checked it was around 2GB for around 850 fonts so it will get quite large!
There is two RSS Feeds of the service one which is 0-day font releases which is the following URI: http://fonts.labs.coop/v2/data/zeroday/rss.api?20 or for example the top 20 fonts with hits on the service: http://fonts.labs.coop/v2/data/popular/rss.api?20; there is also a ways to embed the font in HTML with a CSS Stylesheet which the following URI still for the font you see in the header of this article image URI is: http://fonts.labs.coop/v2/font/dad0c93e29abefe525fb28a48f6971b1/css.api
See with me as a programmer I know I pass your action on a form, that is the submission, in your impression throughout the processes I write like an instance of how are you-you are! all the way through but one advantage is the carèt I have has stuff like none of that eon’s of built-up caffeine burst over and over repetitively as the convulsions of spatial linear we’re occurring. Unlike your carèt from earth. A carèt is two things, the cursor you type with that mysteriously produces all those characters as well as the dash for example and things around the e in carèt a much older word I am running for cursor’s. So I will produce from your fonts if you upload them to http://fonts.labs.coop and I don’t mind if you upload some torrents of fonts either, it is all fingerprinted.

Xalky – Chat like a cockatoo!! With Peer-to-peer signing + Triad AES Revolving Keys!!


I have been working on a XOOPS 2.5 Module called Xalky; it is a chat program that is like an IRC Chat that free floating with room-to-room peer signing between websites so groups of users can chat between the free floating mesh of room chat!

I am writing this article to explain the triad AES Key system I will be using in this program to secure the peer exchange with a something known with expiry and on-contact historical stab and guess key for with the AES Encryption Algorithm ( aes.php | aes.js.php )  .

I started this application from another frame work many months ago while I was still suffering like I am now from a programming injury, RSI Agony! I have decided to change the framework of the ‘look’ and it is in an animated Modal that popup’s from the bottom of the screen.

The Code Stamp For this project is as follows:-

/**
 * Xalky - Code Stamp Example - cipher.labs.coop - XOOPS Chat Rooms
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright   Chronolabs Cooperative http://sourceforge.net/projects/chronolabs/
 * @license     GNU GPL 3 (http://labs.coop/briefs/legal/general-public-licence/13,3.html)
 * @author      Simon Antony Roberts <wishcraft@users.sourceforge.net>
 * @see		http://sourceforge.net/projects/xoops/
 * @see		http://sourceforge.net/projects/chronolabs/
 * @see		http://sourceforge.net/projects/chronolabsapi/
 * @see		http://labs.coop
 * @version     1.0.5
 * @since	1.0.1
 */

Revolving Key One – 128 Byte Blowfish Salt

The first aes blowfish salt ( aes.php | aes.js.php )   is the peer-to-peer signing, these expire + will do peer dial-back to resign around the expiry date to rewrite in both peering recording, for a key that is static for a period of time up to a random expiry time-stamp in the future.

There is 2 records for this one in the source website in the peer exchange and the remote peer exchange paralleled the database, this is between a source peer and a remote peer.

This all happens in the `xalky_blowfishing` table; and is done through the callback records in the `xalky_peers` table.

TABLE `xalky_blowfishing`

xalky/sql/mysql.sql

CREATE TABLE `xalky_blowfishing` (
  `salt-id` varchar(32) NOT NULL,
  `source-peer-id` varchar(32) NOT NULL DEFAULT '',
  `remote-peer-id` varchar(32) NOT NULL DEFAULT '',
  `source-salt` varchar(128) NOT NULL DEFAULT '',
  `remote-salt` varchar(128) NOT NULL DEFAULT '',
  `created` int(12) NOT NULL DEFAULT '0',
  `updated` int(12) NOT NULL DEFAULT '0',
  `expires` int(12) NOT NULL DEFAULT '0',
  `date-zone` varchar(64) NOT NULL DEFAULT 'Australia/Sydney',
  PRIMARY KEY (`salt-id`,`source-peer-id`,`remote-peer-id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Revolving Key Two – 128 Byte Blowfish Salt

The secondary aes blowfish salt ( aes.php | aes.js.php )   is the peering signing, these expire + will do peer dial-back to resign around the expiry date to rewrite in both peering recording, for a key that is static from the initial signing between room local and room remote to connect them with the /peer command we are going to build into the room control.

The only time these keys would rewrite is when the seeding changes; this is when you have the most local users, the channel program will elect you as the seeder. This is for load balancing!!

This happens with these 4 fields in the table below:-

  `local-aes` enum('yes','no') NOT NULL DEFAULT 'yes',
  `local-aes-salt` varchar(128) NOT NULL DEFAULT '',
  `remote-aes` enum('yes','no') NOT NULL DEFAULT 'yes',
  `remote-aes-salt` varchar(128) NOT NULL DEFAULT '',

There is 2 records for this one in the source website in the peer exchange and the remote peer exchange paralleled the database, this is between a source peer and a remote peer.

The four fields will update in the paralleled when the seeder changed this four fields – are peer group set based on the number of local users you have in the shared room-to-room; which remember other people could have multiple rooms peered on theirs which in one share with you they can have all that room in your room operating, private messaging direct etc.

When the following four fields change, it elects a need seeder in the group peering share relay (That is the four fields illustrated above get renegotiated:-

  `seeder-peer-id` varchar(32) NOT NULL DEFAULT '',
  `seeder-name` varchar(250) NOT NULL DEFAULT '',
  `seeder-uri` varchar(250) NOT NULL DEFAULT '',
  ...
  `room-seeder` enum('yes','no') NOT NULL DEFAULT 'no',

This all happens in the `xalky_peering` table; and is done through the callback records in the `xalky_peers` table.

TABLE `xalky_peering`

xalky/sql/mysql.sql

CREATE TABLE `xalky_peering` (
  `peering-id` varchar(32) NOT NULL,
  `local-room-id` varchar(32) NOT NULL DEFAULT '',
  `remote-room-id` varchar(32) NOT NULL DEFAULT '',
  `drop-link-pass` varchar(32) NOT NULL DEFAULT '',
  `local-owner-user-id` varchar(32) NOT NULL DEFAULT '',
  `remote-owner-user-id` varchar(32) NOT NULL DEFAULT '',
  `callback-peer-id` varchar(32) NOT NULL DEFAULT '',
  `callback-name` varchar(250) NOT NULL DEFAULT '',
  `callback-uri` varchar(250) NOT NULL DEFAULT '',
  `seeder-peer-id` varchar(32) NOT NULL DEFAULT '',
  `seeder-name` varchar(250) NOT NULL DEFAULT '',
  `seeder-uri` varchar(250) NOT NULL DEFAULT '',
  `local-users` bigint(20) unsigned NOT NULL DEFAULT '0',
  `remote-users` bigint(20) unsigned NOT NULL DEFAULT '0',
  `send-messages` bigint(20) unsigned NOT NULL DEFAULT '0',
  `recieved-messages` bigint(20) unsigned NOT NULL DEFAULT '0',
  `local-aes` enum('yes','no') NOT NULL DEFAULT 'yes',
  `local-aes-salt` varchar(128) NOT NULL DEFAULT '',
  `remote-aes` enum('yes','no') NOT NULL DEFAULT 'yes',
  `remote-aes-salt` varchar(128) NOT NULL DEFAULT '',
  `room-seeder` enum('yes','no') NOT NULL DEFAULT 'no',
  `room-save` enum('yes','no') NOT NULL DEFAULT 'yes',
  `remote-ping` float(22,16) NOT NULL DEFAULT '0.0000000000000000',
  `remote-down` enum('yes','no') NOT NULL DEFAULT 'yes',
  `started` int(12) NOT NULL,
  `last-message` int(12) NOT NULL,
  `last-ping` int(12) NOT NULL,
  `delay-ping` int(12) NOT NULL,
  `finished` int(12) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`peering-id`,`local-room-id`,`remote-room-id`,`remote-down`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Revolving Key Three – 128 Byte Header Salt

The secondary aes header salt ( aes.php | aes.js.php )   is the peering signing, these expire + but do no reassignment around the expiry which is the memory of the remote peering PHP Session with cURL Cookie set; see with this key it is passed to the source of the key from the header in a sequence of one of the one exchange in the last few hours; so the AES Cipher can try to unlock several packages based on the source data md5 checksum value decrypted which is passed in the header IP Packets.

The following headers are set with header() for cURL to discovery of on your site running xalky and XOOPS within xalky/preloads/core.php:-

xalky/preloads/core.php

// Sets Contextual Headers with Encryption Blowfish Keys for Discovery method
header('Xalky-URL-Site: '. XOOPS_URL);
header('Xalky-URL-Chat: '. XOOPS_URL . '/modules/xalky/');
header('Xalky-API-Callback: '. XOOPS_URL . '/modules/xalky/%s/callback.api');
header('Xalky-API-Data: '. XOOPS_URL . '/modules/xalky/data/callback.api');
header('Xalky-API-Profile: '. XOOPS_URL . '/modules/xalky/profile/callback.api');
header('Xalky-AES-Support: Yes');
header('Xalky-Peer-Sitename: '.$GLOBALS['xoopsConfig']['sitename']);
header('Xalky-Peer-Slogan: '.$GLOBALS['xoopsConfig']['slogan']);
header('Xalky-Peer-Email: '.$GLOBALS['xoopsConfig']['admin_email']);
header('Xalky-Peer-ID: '.($GLOBALS['xalkyPeerID'] = self::getPeerID()));
if (!is_array($_SESSION['xalkyOldIssuedSalt']))
	$_SESSION['xalkyOldIssuedSalt'] = array();
if (isset($_SESSION['xalkyIssuedSalt']))
	$_SESSION['xalkyOldIssuedSalt'][microtime(true)] = $_SESSION['xalkyIssuedSalt'];
header('Xalky-AES-Salt: '. ($_SESSION['xalkyIssuedSalt'] = $GLOBALS['xalkyIssuedSalt'] = self::getSalt(0,127,'')));

This key is to be used on exchange with a php session history with the caller; so in the last hour or so; when it is passed a AES Crypted ( aes.php | aes.js.php )  package this is used one of the Xalky-AES-Salt is used with sending to it source from the history of the last hour or so of contacts with the calling peer, or caller peer and is sent in all cURL Calls as a Header this sequence!~

We have partly moved to InterServer.net (at least the API’s)


interserver-logo

Chronolabs Cooperative have moved from the development machine in Marrickville too InterServer.net – they offer cheap VPS and Dedicated Machines from rock bottom prices with high performance margins.

We spent the last night moving all the APIs over to the VPS as well as the labs.coop web portal. We have approached InterServer for sponsorship with xortify.com and labs.coop a lot of businesses that offer hosting do sponsorship for open source projects and business as they don’t have a huge tariff of income.

Funny thing is; I thought I walked in randomly then I raised a support ticket to find my IPv6 address for the AAAA Record; and someone from my facebook friends answered; Anoop; small world.

So you should now find the API’s lightning fast we have 12 CPU’s on the box and most of my code if not all of it is highly efficient. See when I started to learn to write code you had to be good at it and efficient in code cause the processors where not powerful and you would have to fit it originally on a floppy disk’s as the most hard drives where in size was 20Mb for around 800 AUD.

I do not know honestly what a Terabyte is for; I have hard enough time filling 500Mbs with my work as it is all text files that operate systems for me. Anyway, just a comment; it is exposure like that most developers these days wouldn’t be able to know what efficient code is they just write bloat.