This is from a discussion on the #cms channel, New Year's Eve, 2007 :)

11:10 <@ryan> <?php
11:10 <@ryan> Ice_loadProfile();
11:10 <@ryan> $quoter = $ICE->stringToProxy("QuoterObject");
11:11 <@ryan> $quoter = $quoter->ice_checkedCast("::Demo::Quoter");
11:11 <@ryan> $price = $quoter->getQuote($_POST["symbol"]);
11:11 <@ryan> printf("<B>Current price:</B> $%.3f\n", $price);
11:11 <@ryan> ?>
11:12 <@ryan> once ICE is set up, it's just that easy
11:12 -!- simon [simon@d553d1.15b6ed.3c984f.9fc8c1] has quit [Ping timeout: 121 seconds]
11:13 <@occam> it is not i am afraid
11:13 <@ryan> why not?
11:13 <@occam> php can only work as a ice client and on the server side you have to do some more stuff
11:13 <@occam> i will send you kids a zip very soon
11:13 <@ryan> yes, of course you need code on the server side
11:14 <@ryan> we wouldnt want php running on the server side anyway
11:14 <@ryan> i vote for Python
11:14 <@ryan> in which case,
11:14 -!- simon [simon@d553d1.15b6ed.3c984f.9fc8c1] has joined #cms
11:15 <@ryan> hang on, wait for it..
11:18 <@ryan> $blah = new Python('blah', 'BlahClass', array('Blah Array'));
11:18 <@ryan> you would have to put that in there somewhere
11:18 <@ryan> so you can supply python with a native data structure
11:21 <@occam> http://cyberpunk.cl/indycms_ice_01.tar.gz
11:21 <@occam> ^^^^^ thats the server side and some client side example with cherrypy
11:21 <@occam> ofcause you can do the client side with php too
11:22 <@occam> there is a README in it
11:22 <@ryan> hmm
11:23 <@ryan> so one thing is that i think you would take advantage of PHP side's MVC framework
11:23 <@ryan> so a lot of the logic happens on that side of things
11:24 <@ryan> like PublisherFrontend definitely would go on the web server tier
11:25 <@occam> http://cyberpunk.cl/indycms_ice0.1.jpg
11:25 <@ryan> at least, in how i had envisioned it
11:25 <@occam> thats my current brainfuck
11:25 <@occam> still not soo sure about it
11:25 <@ryan> http://linefeed.org/~ryan/ice/indycms/indycms_ice0.1.jpg
11:26 <@ryan> :)
11:26 <@occam> yeah
11:26 <@ryan> What is the Application tier?
11:26 <@ryan> with "Core" there ?
11:26 <@ryan> what is that going to be?
11:26 <@occam> just plain db abstraction
11:27 <@occam> i think
11:27 <@ryan> ok hang on one second, ok?
11:27 <@occam> someone has to make sure stuff gets actualy saved into the db, and is not just flowing 
around between the servers
11:27 <@occam> sure
11:28 <@occam> also, my exmaple code shit there is not using the "Publisher/Subscriber" mechanism 
called IceStorm, i still try to figure that out.. 
11:32 <@ryan> alsmost there
11:40 <@ryan> ok
11:41 <@occam> yo
11:44 <@ryan> http://linefeed.org/~ryan/ice/indyarch.jpg
11:45 <@ryan> nothing more complicated than that
11:46 <@ryan> it's a simple solution, i think that's the best kind
11:46 <@occam> hehehe
11:46 <@ryan> on the web tier would be a configuration of various PEAR + CakePHP plugins/helpers/etc
11:47 <@ryan> which all tie into traditional "indypages"
11:47 <@ryan> the middle tier interacts with the DB tier for the web tier. it also serves as 
an Article Store (in RAM), Session Store, User Store to make things faster for the web tier
11:48 <@ryan> the web tier just asks for a User object, with a $user_id
11:48 <@ryan> the middle tier figures out the fastest way to give that back to the web tier and does it
11:48 <@ryan> database tier is run however we think is the fastest, best way to do distributed mysql
11:48 <@ryan> i dont know if their clustering is sophisticated enough to do efficient, geographically 
remote clustering
11:49 <@ryan> but i know it is good enough to do geographically-distributed replication
11:49 <@ryan> because that's what yahoo does
11:49 <@ryan> and thats it!
11:49 <@ryan> ICE is widely developed and i bet there's even some middlescripts or add-on's for 
ICE that do what we need
11:50 <@ryan> looking at some of the other stuff on the ICE page, i think it might even be some of 
that stuff, that can optionally come with ICE
11:50 <@ryan> the front-end is widely developed and we get a huge userbase of programmers with tier, as well
11:50 <@ryan> and, of course, the mysql tier has a huge userbase
11:50 <@occam> i did not found that many stuff around ice... besides the manual and there website
11:51 <@ryan> you saw this, right? -> http://www.thinkingphp.org/tutorials/view/rest-api-in-cakephp-and-google-calendar/
11:52 <@ryan> well, thats not so useful, really
11:52 <@ryan> but this is ->
11:53 <@ryan> http://zeroc.com/icegrid/index.html
11:53 <@ryan> the Freeze part of ICE is what we would use to make the cached Article/Session/User stores
11:54 <@ryan> Freeze = With just a few lines of code, an application can incorporate a highly-
scalable evictor that efficiently manages persistent objects.
11:55 <@ryan> evictor = it automatically removes out-dated objects
11:55 <@ryan> but see how this is really perfect for indy?
11:55 <@ryan> *anyone* can help by running a node on any one of these tiers
11:56 <@ryan> even existing boxes, like blackcat for instance, could become a middle tier.. just by 
running ICE + deploying our package
11:56 <@ryan> even someone's home DSL, if it had a static IP, could become like a middle tier
11:57 <@ryan> i could run one here
11:57 <@ryan> and suddenly, any indymedia site that gets into this grid is forever protected
11:57 <@ryan> against data loss
11:57 <@ryan> against server seizures
11:57 <@ryan> because it's all spread out allllllll over the place
11:58 <@ryan> this architecture permanently solves our problems with data loss & server seizures
11:58 <@ryan> unless they can come up with a massive, international "server snatch day"
11:58 <@ryan> but i think that's a problem we'll start to have around 2040 or so ;)
11:59 <@ryan> unless we've won by then, of course
11:59 <@ryan> also, to set up a web server is very easay
12:00 <@ryan> you download the indycms-web package
12:00 <@ryan> its just an MVC app you can run with any php install
12:00 <@occam> right....
12:01 <@occam> i still wanne see how i mix the static and dynamic sites together
12:01 <@occam> also, it would be good if we reuse existing search index etc...
12:01 <@occam> not re-coding that part again
12:01 <@occam> there are some nice google-fakes out there
12:01 <@occam> i had a closer look into them once
12:02 <@ryan> there is certainly numerous options available to you within the PEAR/PECL/CakePHP libraries
12:02 <@ryan> for almost everything
12:04 <@ryan> just like any other software we would adapt, we have to configure PEAR/PECL/Cake and 
make pages which are the "traditional" IMC pages
12:04 <@ryan> front-end coding is a snap
12:04 <@ryan> we already have an indymedia version up and running, simon did it by himself in a few days
12:04 <@ryan> after not even knowing cake
12:05 <@ryan> http://indy.anarcho.dk/
12:06 <@ryan> bakery will be quite helpful -> http://bakery.cakephp.org/categories/view/3
12:08 <@ryan> and all of pear is available to us as well -> http://pear.php.net/
12:08 <@ryan> and pecl -> http://pecl.php.net/
12:08 <@ryan> an army of developers out there
12:09 <@ryan> we can piggy-back on
12:09 <@ryan> we can use
12:10 <@ryan> as for static stuff, i don't even know how important that is anymore
12:10 <@ryan> certainly, having cached rendered articles is VERY important
12:10 <@ryan> and those can go in the Article Store on the middle tier
12:10 <@ryan> the web tier has no idea what's going on
12:11 <@ryan> it just asks for a particular article's rendered HTML
12:11 <@ryan> and the middle tier gives it back
12:11 <@ryan> could be from the object store in RAM
12:11 <@ryan> could be from the DB
12:12 <@ryan> we could even have upgraded webservers, running APC
12:12 <@ryan> so it could even come from the local memory cache
12:12 <@ryan> the methods to interact with ICE will figure that all out
12:12 <@ryan> the front-end is ignorant of where it's stuff is coming from
12:12 <@ryan> it just knows that it asks for an Article and it gets it back super-fast
12:13 <@ryan> ARE YOU FEELING ME YET?
12:13 <@ryan> plus everyone can have a role
12:13 <@ryan> if you are more a front-end person, you can help on that project
12:13 <@ryan> if you wanna write some kick-ass python shit, you can help on that project
12:13 <@ryan> if you just are a sysadmin, like micah, you can help get the db tier together
12:14 <@ryan> the era of "indymedia machines" like stray and hugo will be replaced by 
an army of indymedia machines
12:14 <@ryan> all of which just serve as nodes in a big, distributed application
12:14 <@ryan> i dont know ... i think it's a work of art !

Attachments