Does Seaside scale?
Asked Answered
L

8

23

Seaside is known as "the heretical web framework". One of the points that make it heretical is that it has much shared state. That however is something which, in my current understanding, hinders easy scaling.

Ruby on rails on the other hand shares as less state as possible. It has been known to scale pretty well, even if it is dog slow compared to modern smalltalk vms. flickr uses php and has scaled to an extremly big infrastructure...

So has anybody some experience in the scaling of Seaside?

Leavening answered 20/9, 2009 at 20:55 Comment(4)
I'm surprised by your comment that rails is known to scale pretty well. Twitter mostly works at this point but I get the impression that they've divered pretty far from standard rails. I tend to think of rails as the quintessential epic fail to scale framework.Doyon
Twitter uses a Database as a Backend for something that is essentially message broadcasting. Scaling –as I understand it– means how easy it is to satisfy more demand by using more hardware. I suggest that Rails scales well to this definition because DHH, one of the original authors of Rails says »[...] you can add almost any number of web and app servers without changing a thing.«, in his [Blog][1] Which fits my understanding. [1]: loudthinking.com/arc/000479.htmlLeavening
As I understand it, Twitter is moving towards using Scala instead of Rails.Vituperate
@Steven Noble: Saying Rails is an epic fail at scaling is like saying Java is an epic win. Architecture wins at the end of the day. Not language. But then again, your comment is over a year old so maybe you changed your mind? :-)Dortch
K
14

Short answer: you can scale Seaside applications like hell yah

Long answer: In the IT domain, scaling is one thing but it has two dimensions:

  1. horozontal
  2. vertical

Almost everybody thought about scaling in the vertical dimension. That was until intel and friends reached some physical barriers and started to add cores to compensate the current impossibility of adding MHz.

That's when all we started to be more aware of scaling horizontally as the way to go.

Why am I telling you this?

Because Seaside is a smalltalk image running in a VM and that is roughly the same situation of a system in a server of a monocore processor.

Taking that as foundation, you scale web apps by making a cluster of servers. It's the natural thing to do, it's the fault tolerant thing to do, is the topologically intelligent thing to do, is the flexible thing to do, I guess you get the idea...

So, if for scaling, you do the same as intel & friends, you embrace the horizontal way. And it's even cheaper that the vertical way (that will lead you to IBM and Sun servers that are as good as expensive).

RoR applications are typically scaled horizontally. Google has countless cheap servers to do their thing. It works perfectly fine no matter how dramatized people want's to impress you throwing at you a bunch of forgettable twitter whales.

If they talk to you about that, you just be polite and hear what they say but remember this:

  1. perfect is the enemy of the good
  2. the unfinished perfect will never be as value as the good thing done

BTW, Amazon does something like that too (and it kind of couple geolocation so they enhance the chances of attending your requests with the cluster that is closest to your location).

On the other hand, the way Avi scaled dabbledb (Seaside based web application company bought by twitter) was using one vm per customer account (starting up and shutting down those on demand).

Having a lot of state in an image doesn't make scaling impossible nor complicated.

Just different.

The way to go is with a load balancer that uses sticky sessions so you can have one image attenting all the requests of an user session. You make things so any worker-image behind the load balancer can attend any user of a given app. And that's pretty much it.

To be able to do that you need to share the persistent objects among workers. All the users databases needs to be accessible by the workers at anytime and need to deal well with concurrency.

We designed airflowing scalable in that way.

It's economically convenient too because you can start with N very small (depending on the RAM of your first server) and increase it on demand until you reach the hardware limit.

Once you reach the hardware limit, you just add another host to the cluster and recofigure the balancer (and the access to the databases).

Simple, economic and elegant.

Kimberliekimberlin answered 17/1, 2011 at 19:53 Comment(0)
A
16

Ramon Leon shares some of his experience on upscaling seaside on his (excellent) blog. You can read very concrete ideas with sample code about configuring and tuning seaside.

Enjoy :-)

http://onsmalltalk.com/scaling-seaside-more-advanced-load-balancing-and-publishing http://onsmalltalk.com/scaling-seaside-redux-enter-the-penguin http://onsmalltalk.com/stateless-sitemap-in-seaside

Astral answered 21/9, 2009 at 6:33 Comment(0)
K
14

Short answer: you can scale Seaside applications like hell yah

Long answer: In the IT domain, scaling is one thing but it has two dimensions:

  1. horozontal
  2. vertical

Almost everybody thought about scaling in the vertical dimension. That was until intel and friends reached some physical barriers and started to add cores to compensate the current impossibility of adding MHz.

That's when all we started to be more aware of scaling horizontally as the way to go.

Why am I telling you this?

Because Seaside is a smalltalk image running in a VM and that is roughly the same situation of a system in a server of a monocore processor.

Taking that as foundation, you scale web apps by making a cluster of servers. It's the natural thing to do, it's the fault tolerant thing to do, is the topologically intelligent thing to do, is the flexible thing to do, I guess you get the idea...

So, if for scaling, you do the same as intel & friends, you embrace the horizontal way. And it's even cheaper that the vertical way (that will lead you to IBM and Sun servers that are as good as expensive).

RoR applications are typically scaled horizontally. Google has countless cheap servers to do their thing. It works perfectly fine no matter how dramatized people want's to impress you throwing at you a bunch of forgettable twitter whales.

If they talk to you about that, you just be polite and hear what they say but remember this:

  1. perfect is the enemy of the good
  2. the unfinished perfect will never be as value as the good thing done

BTW, Amazon does something like that too (and it kind of couple geolocation so they enhance the chances of attending your requests with the cluster that is closest to your location).

On the other hand, the way Avi scaled dabbledb (Seaside based web application company bought by twitter) was using one vm per customer account (starting up and shutting down those on demand).

Having a lot of state in an image doesn't make scaling impossible nor complicated.

Just different.

The way to go is with a load balancer that uses sticky sessions so you can have one image attenting all the requests of an user session. You make things so any worker-image behind the load balancer can attend any user of a given app. And that's pretty much it.

To be able to do that you need to share the persistent objects among workers. All the users databases needs to be accessible by the workers at anytime and need to deal well with concurrency.

We designed airflowing scalable in that way.

It's economically convenient too because you can start with N very small (depending on the RAM of your first server) and increase it on demand until you reach the hardware limit.

Once you reach the hardware limit, you just add another host to the cluster and recofigure the balancer (and the access to the databases).

Simple, economic and elegant.

Kimberliekimberlin answered 17/1, 2011 at 19:53 Comment(0)
P
10

http://dabbledb.com/ seems to scale quite well. Moreover, one can use GemStone GLASS to run Seaside.

Philoprogenitive answered 21/9, 2009 at 7:48 Comment(1)
Well … dabbledb is somehow special, for it runs a separate VM for each customer. I don't think that's the ordinary meaning of "scale." And for GLASS, well, it scales like LAMP, not like google.Tele
M
8

On this interview Avi Bryant the creator of Seaside and Co founder DabbleDB Explains how they make it scale.

From what I understand:

  • each customer has it's own Squeak Image.

  • When a customer comes Apache decides based on the user name which port to send it to.

  • Based on the port it starts the customer's Squeak Image.

  • That way it can grow to an infinite number of servers.

I think this solution works for them based on the specifics of their application each customer doesn't need to share info between them. So no need for o centralized DB.

Anyway it is better to watch the interview rather than my half-made summary.

Misvalue answered 21/9, 2009 at 23:16 Comment(0)
E
7

Yes, Seaside scales down fantastically. A single developer can create and maintain complex applications for small groups very well.

[coming back to this after a few years] This actually is much more important than scaling up. Computer speed still grows a lot, and 99% of all applications can now run on one machine. Speed of development, and especially maintenance now totally dominates TCO.

Exobiology answered 28/4, 2010 at 19:41 Comment(0)
D
5

I would rephrase your question slightly to: does Seaside prevent/discourage you from creating applications that scale? I would say usually no. Seaside doesn't have a default way to store your data (just like php on its doesn't, though Seaside gives you a few extra options) and my impression is interacting with your data tends to be the biggest hurdle when it comes to scaling.

If you want to store your data in a monolithic SQL db, like with rails, you can do that. Or you can use an object database. Or you can use a separate object database for each user, or separate db for each project, or a separate db for each user and project. Or you can store everything in a series of flat files or you can just store your data as objects in your VM's memory.

And because of continuations you don't need re-fetch your data out of your datastore on every webpage call. As when you are using a desktop application you can pull data out of your datastore when your user begins interacting with it, set the appropriate variables, and then use those variables between webcalls until the user is done with the data at which point you can update the datastore. When you don't share state you have to hit the datastore on every single webcall.

Of course this doens't mean scaling is free, it just means you have a larger domain in which to search for scaling solutions.

All that said, for many applications rails will scale much easier simply because there exist large hosting solutions for rails (and php for that matter) that will offer you a huge amount of resources without having to rent and setup a custom box.

These are just my impressions from reading and talking to people.

Doyon answered 21/9, 2009 at 17:40 Comment(2)
The price for continuations and sessions can be paid by not having to restore state on every request, you suggest? Interesting.Leavening
That's a good way to put it, and I think it is worth noting where it is repaid. It lifts load off of the central datastore and transfers the load to an application server - of which you can add more. These are the sorts of transfers that you want to make when you are thinking about scaling since you can always add additional application servers. So even if continuations cost more than hitting the db on every webpage call it is still a scaling win if you are transfering that hit away from a central point of failure.Doyon
P
3

I just reminded that there is link on Pharo's success stories : a Seaside Web application with up to 1000 concurrent users for a large health insurance in Argentina .

Pharo success stories

Issys Tracking:

  • Load balancing: Apache as a proxy/balancer (round robin with session affinity)
  • Server setup: 5 Pharo images on 3 different servers (Linux and Windows 2003)
  • GUI: Heavily AJAX-based. All code written in Smalltak: Seaside 3.0, Seaside JQuery integration and JQWidgetBox.
  • Persistency: Glorp (OR mapper) and OpenDBX (DB client)
  • Databases: large PostgreSQL and MS SQL Server DBs
Politician answered 29/10, 2012 at 17:2 Comment(0)
H
-9

From the Wikipedia article, it's a total pig. Prior to that, it hadn't scaled to the point where I'd heard of it. :)

Hypersensitive answered 20/9, 2009 at 21:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.