Hi all,
One of my side projects for the last few years has been to experiment with new ways of writing web applications, learning from our experience with Seaside, but moving beyond it and trying to keep pace with the state of the art in web application design. This hasn't been a big secret—I've talked about the project and given demos in various places—but I've been holding off on open-sourcing it until I had something that I felt was ready for public scrutiny. Well, recently Chris Cunnington would have none of that and challenged me to release it already or shut up about it. So, here it is. ;-) The framework is called Altitude, and released under the MIT license. It's a brand-new, from-scratch HTTP server and application framework written on top of Xtreams. It's still pretty raw. There's lots of features missing and some functionality is present but completely untested, as I've implemented things as I need them for my application. There's no documentation and very few comments. If you want to play around with it, execute the attached load script in an up-to-date 4.4 image. The project repository is here: http://source.wiresong.ca/al Colin al-load-bleading-edge.st (3K) Download Attachment |
Can you describe how it compares (or doesn't) to Seaside or other web technologies?
Rado
On Tue, Jul 17, 2012 at 10:45 PM, Colin Putney <[hidden email]> wrote: Hi all, |
On Tue, Jul 17, 2012 at 3:30 PM, radoslav hodnicak <[hidden email]> wrote:
> Can you describe how it compares (or doesn't) to Seaside or other web > technologies? Sure. Seaside is probably the best comparison. I cut my Smalltalk teeth writing a Seaside app, so it's had a huge influence on Altitude. Altitude will feel familiar to those who've used Seaside before. It has Component trees that render themselves using a canvas-style protocol, and uses blocks as callbacks. Like Seaside, Altitude takes care of generating urls and form-field names, so application developers don't have to write a lot of code to route requests or marshal server state into strings. The main difference between Altitude and Seaside is that Seaside is session-oriented, Altitude is resource-oriented. Seaside generates unique urls for every interaction with the user, while Altitude generates RESTful urls. The upside of that is that Altitude is more cacheable than Seaside and has (potentially) more scalable memory usage than Seaside. The downside is that it lacks Seaside's inherent security. (Implementation note: Altitude doesn't use continuations. An early prototype did have an implementation of call/answer based on partial continuations, mostly to prove it would work, but I haven't needed that in practice, so I took it out.) Another difference comes from Xtreams. Seaside implements several server-adaptors that allow it to work with various HTTP implementations, like Kom, Zinc, Swazoo etc. Altitude implements its own web server on top of Xtreams and takes full advantage of the flexibility that Xtreams offers. Altiude uses Xtreams pervasively and it's a huge improvement over the classical ST-80 stream protocol, both in terms of design flexibility and performance. Finally, Altitude provides less insulation form HTTP than Seaside does. Seaside was designed to handle the details of HTTP so that the developer can focus on his application. Modern web applications, however, make more use of the features and details of HTTP (via AJAX, for example), than in the past, and so Altitude exposes HTTP to the application more than Seaside does. This may be because of Altitude's relative immaturity; we'll see how it develops. It would probably be good to implement some example applications in Altitude, so people can see how the compare to the Seaside versions. Colin |
Thanks. I find Seaside's security features very valuable for what I do but I also have parts of my applications that (should) behave more REST-like, so perhaps I'll take a look at Altitude for that eventually. Have you measured the performance advantages of using xtreams and if so, how?
Rado
On Wed, Jul 18, 2012 at 2:11 AM, Colin Putney <[hidden email]> wrote:
|
On Tue, Jul 17, 2012 at 6:30 PM, radoslav hodnicak <[hidden email]> wrote:
> Thanks. I find Seaside's security features very valuable for what I do but I > also have parts of my applications that (should) behave more REST-like, so > perhaps I'll take a look at Altitude for that eventually. Have you measured > the performance advantages of using xtreams and if so, how? I haven't compared Altitude against any other framework, but I have done some comparisons of different implementations within Altitude. One example is XTChunkedWriteStream, which implements an optimized version of the chunked transfer encoding. When streaming a large JSON payload it was (IIRC) 5x or 10x better than the naive implementation I threw together. It might be interesting to create a Seaside app and an Altitude app the render the same test page and time them. Colin |
On Wed, Jul 18, 2012 at 7:50 AM, Colin Putney <[hidden email]> wrote:
One example is XTChunkedWriteStream, which implements an optimized Excellent. Streaming large json payloads is exactly what I'm interested in. Rado |
In reply to this post by Colin Putney-3
On 17 July 2012 21:45, Colin Putney <[hidden email]> wrote:
> Hi all, > > One of my side projects for the last few years has been to experiment > with new ways of writing web applications, learning from our > experience with Seaside, but moving beyond it and trying to keep pace > with the state of the art in web application design. This hasn't been > a big secret—I've talked about the project and given demos in various > places—but I've been holding off on open-sourcing it until I had > something that I felt was ready for public scrutiny. Well, recently > Chris Cunnington would have none of that and challenged me to release > it already or shut up about it. So, here it is. ;-) > > The framework is called Altitude, and released under the MIT license. > It's a brand-new, from-scratch HTTP server and application framework > written on top of Xtreams. It's still pretty raw. There's lots of > features missing and some functionality is present but completely > untested, as I've implemented things as I need them for my > application. There's no documentation and very few comments. Ah, I see a JSON parser lurking in there. Oddly enough, I needed a JSON parser the other week and changed Tony Garnock-Jones' JSON parser to work off Xtreams. It was a pretty easy port, actually. I haven't bothered to make it public because I've only just started playing around with some ideas, but I can if there's any interest. Ah, and I see that you can parse not just objects or arrays as top level objects. Nice! (I say that because the JSON syntax has as its top level rule something like "Start ::= object | array", so technically, "1" is not well-formed JSON (even though I imagine most people just ignore that, and permit atoms as top level entities).) frank |
On Thu, Jul 19, 2012 at 1:21 PM, Frank Shearar <[hidden email]> wrote:
> Ah, I see a JSON parser lurking in there. Oddly enough, I needed a > JSON parser the other week and changed Tony Garnock-Jones' JSON parser > to work off Xtreams. It was a pretty easy port, actually. I haven't > bothered to make it public because I've only just started playing > around with some ideas, but I can if there's any interest. Yes. SAX-style, rather than producing a tree of Dictionaries and Arrays. The JSON support in Altitude is actually more stable and mature than the HTML-oriented stuff. The app I'm building uses Ajax a lot, and for a while I was just serving static HTML and Javascript off the disk, which would then call into an API built from ALJsonResources. See also ALJsonRenderer, which provides a protocol for rendering JSON with callbacks. Colin |
Free forum by Nabble | Edit this page |