Bas Geertsema.net

A developers’ perspective on SaaS

by Bas 12. June 2009 11:03

A contemporary buzz word in software development circles is without a doubt ‘SaaS’ or Software as a Service. The dust that twirled by the introduction of ‘SOA’ (Service Oriented Architecture) has just settled down a bit and yet here comes another windstorm. What SaaS precisely entails is certainly not definite, and maybe never will before it’s outdated by yet another acronym, but I will leave that aside for a moment. A lot of people consider a pure SaaS as a software system that can be scaled enormously with high efficiency and low costs. Archetypical SaaS software products are GMail and Salesforce.com. The services that GMail offers, managing your e-mail, is a fairly standard one. Everybody more or less uses e-mail the same way. That makes it an ideal domain for a single-instance, scalable SaaS solution. But how can this be done for, let’s say, a typical ERP implementation? Surely, ERP products are often highly customized towards their users. This customization can provide that competitive advantage for businesses. Forcing every organization into a single ERP implementation is a no-go.

The benefits of economies of scale and scope, in this view, can only be achieved by having a single instance of your software that houses all of your ‘tentants’. Depending on the context, tenants are customers, clients or users. This is in contrast with a typical ASP that may have a single instance for each and every client, thereby having to deal with a lot of costly overhead for managing all these instances.

To still reap the benefits of economies of scale and scope in a single-instance, multi-tenant, SaaS application the software itself is required to offer this customization to their tenants. And this is in fact what Salesforce.com or any other more complex SaaS solution offers. They provide the tenant tools and techniques to add extra data fields to entities, provide custom business workflows, etc. The result is that a SaaS solution can no longer be seen as a single software application, but is also a (high-level) business platform on which their users can ‘build’ their businesses.

And that is where model-driven development might play an important role. Let the business user construct their model, and your application is the runtime machine on which these models are executed. This requires a paradigm shift for most software developers that consider their constructed software as an end-of-the-line shrink-wrapped application. Instead, a SaaS developer will construct the runtime-machine on which businesses (tenants) can develop their own solutions. Your software will become just another layer in the stack.

image

For the typical SaaS programmer this means a shift in focus on not delivering end-products, but rather on creating a more or less generic application platform on which business can build their own applications. Ofcourse, how generic exactly is dependent on the goal of your business. Typically, the more specific your application platform will be, the easier it will be to construct it, but the more constrained the applications will be that can be build on top of your application platform. This is as much a business decision as it is a technical one.

I am currently researching the use of model-driven development and generative programming for a paper. I plan on writing more on these techniques related to the thoughts behind SaaS on my blog as well. As I am at the moment in the middle of re-engineering an existing web-application to be in the spirit of SaaS, I will also be writing about the technical challenges and hurdles that one has to take.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Computer | Professional | English

.. why your earphones always end up in a mess ..

by bas 17. January 2009 14:09
earphones  

(een hersenkronkel in de trein terug naar huis.. ok hoog geek-gehalte, mag het?)

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

English | Dutch | Personal

Muziek in 2008

by bas 23. December 2008 14:57

Another year over … and a new one just begun. De kerstliederen knallen weer door de winkelstraten, de appie en op tv. Het einde van een jaar nadert en dus tijd voor een terugblik. Wat bracht 2008 voor mij op muzikaal gebied? Er is maar een eerlijke manier om daarover te oordelen, en dat is last.fm. Al ruim een jaar houd dat bij welke nummers ik draai. De teller staat op 28.612 stuks. Aangezien ik heel weinig radio luister en vrijwel al mijn muziek download en zelf afspeel is het een redelijk betrouwbare lijst. Redelijk betrouwbaar, want ik zet nogal eens het volume op 0, maar laat winamp vrolijk doorspelen. Het gevolg is dat ik volgens last.fm opeens 3 cd’s lang Tchaikovski heb ‘beluisterd’, of de cd van the best of Gigi d’Agostino daadwerkelijk van begin tot eind heb gehoord. Niet echt, dus. Maar toch ontkom ik er niet aan mezelf te confronteren met de meest afgespeelde nummers in 2008.

 image

Eigenlijk niks verassends hier (voor mij). Radiohead is al jarenlang mijn #1 artiest en ik zal daar keer op keer naar terugkeren. De meeste pianomuziek van Chopin heb ik ondertussen al voorbij horen komen en daar blijf ik van genieten. Coldplay blijft gewoon steengoed, en met hun bijzondere 2008 Viva La Vida album zullen ze in dit lijstje voorlopig ook thuisblijven. Dé nieuwkomer van 2008 is Franz Schubert. Waar ik vroeger gecharmeerd was van het drukke en snelle piano werk van Liszt en Chopin ben ik steeds meer de zeer romantische muziek van Schubert gaan waarderen. Met name de piano trio’s zijn een lust voor het oor. Voor mij persoonlijk de ontdekking van 2008.

Daarom, voor de luie internet klik-en-gaan generatie, hier een van zijn mooiste werken. Schubert trio no. 2 (op. 100). Interessant: nu ook gebruikt in de Diesel reclame. Schoonheid in acht maten.

Ook in de top 10: Sigur Rós. Deze band geniet steeds meer populariteit. En met recht, de liedjes die zij schrijven zijn muzikaal briljant en laten je niet los. Dat je de teksten niet kan verstaan is niet van belang, de emoties die zij communiceren zijn ongeevenaard en ik denk dat Sigur Rós enkel een nog grotere toekomst te wachten staat. Het concert in HMH dit jaar was zelfs met een spartaanse bezetting een van de mooiste momenten van 2008. Dat gezegd hebben zijn er heel wat mensen die het verschrikkelijk vinden, en vreemd genoeg kan ik dat ook wel begrijpen. Laat het groeien. Luister er af en toe naar.. misschien één keer per twee maanden. Misschien één keer per maand. En geloof me, dan komt vanzelf dat moment waarop alles samenvalt en dan is het puur genieten.

Sigur Ros - Glósóli

Kings of Leon hebben ook een goed jaar gedraaid. Hun album Only By The Night heeft heel wat uurtjes gedraaid. Gewoon lekker meeschreeuwen. Luisteren naar Kings of Leon geeft het gevoel dat je ergens vol spanning en vol verwachting naartoe gaat. Maar er eigenlijk nooit komt. Sex On Fire is één van de meest gedraaide nummers voor mij van dit jaar.

Michael Jackson, Simon & Garfunkel en Snow Patrol hebben tijdloze muziek. Al vermoed ik dat Snow Patrol er in 2009 wat bekaaider vanaf gaat komen. Het blijft toch een beetje wegwerp-pop.

En Kanye West? Wellicht een vreemde eend in dit rijtje, maar de productie van zijn albums knallen altijd heerlijk je speakers uit. Ook zijn laatste album ‘808-s' And Heartbreaks’ heeft weer die goede productie. Goede beats, mooie samples. Maar die stem.. tja Kanye heeft maakt daan ook geen hip-hop maar hip-pop. Maar dat hoeft nog niet te betekenen dat zijn stemgeluid in élk nummer door een computer vervormd moet worden. Wellicht moet het nog groeien, maar het is nog een tegenvaller, zeker in vergelijking met zijn voorgaande albums. Ik vermoed dat deze ook in 2009 de top 10 zal verlaten.

En de meest gedraaide tracks van 2008?

image

Duidelijk is te zien dat Coldplay gewoon heerscht in 2008 met vijf posities. Yann Tiersen sluit de lijst af met een van mijn favorieten: Comptine d’un Autre Été. Gemaakt voor de film Amelie uiteraard. Maar met al ruim 2 miljoen views, is het volgende filmpje ook zeer waardig om dit nummer visueel bij te staan.

 

Radiohead met Videotape.. 108 keer! Wow. Direct mijn favoriet op het album ‘In Rainbows’ en dat is zo gebleven. Een van de meeste eerlijke nummers die ik in lange tijd heb gehoord. Simpele en doorsnijdende muziek. En een even-zo-eerlijke tekst. Briljant. En de live versie is wellicht nog beter.

Radiohead – Videotape (live at the basement)

 

Coldplay - Death and All His Friends komt op een goede tweede plaats. Hoewel Violet Hill en Viva la Vida ook heerlijk zijn, vind ik dit afsluitende nummer op het album de beste. De hele opbouw en afbouw van het nummer, het album thema dat terugkomt, harmonisch gezang en ritmische truukjes maken het geheel tot een muzikaal wonderstuk. Vereist wel op hoog volume gespeeld te worden.

Tot slot een nummer dat ik pas zeer recent heb ontdekt, en door gebrek van een goede mp3 tag niet goed wordt meegenomen in de last.fm statistieken, maar vermoedelijk nu al in de top 10 thuis zou horen. Een van de leukste verassingen van 2008 voor mij, de Fleet Foxes. Het hele album is leuk, maar één nummer springt er tussenuit: White winter hymnal. Muziek, zoals het óók kan, maar al lang niet meer gehoord. Stiekem vinden we de beach boys toch ook best leuk? Een ruime 2 minuten even weg van de werkelijkheid. Simpele schoonheid. Kijk niet naar het filmpje zelf, maar druk op play en doe even je ogen dicht..

Fleet Foxes - White Winter Hymnal

 

Ik wens iedereen

hele gezellige feestdagen en

                een muzikaal 2009!!

 

Ok dan, als afsluiter…

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Personal | Music | Dutch

Application tiers as a supply chain; empower the interface tier!

by bas 28. February 2008 11:42

I have been playing around with LINQ the last couple of weeks. Really nice stuff to work with, it changes the way you work with sets of data and the process of transforming them into other sets of data. But I don't want to focus on the utility of LINQ here, but on the underlying paradigm shift that we might encounter and that I have been thinking about lately: drawing the analogy between application tiers and a supply chain, and giving the power back to the interface tier.

Typically it is considered good practice to split up your application in multiple tiers. This will enhance your reusability, flexibility and scalability. All good qualities to strive for obviously. But it comes at a cost: all tiers combined will be larger in code size and more complex to enable strict seperation of concerns. For example, we all have created applications in which in the eventhandler of a button you directly prepared a SQL statement query string and sended it directly to the database server at hand. Not a good practice in many ways, but very straightforward and effective. Now consider you introduce a method where the SQL preparation and subsequent database fetching takes place. This method will be more flexible and can be used from multiple locations (maybe two or three other button click eventhandlers) in your application code. The multi purpose versatility of the method is reflected in the method itself by adding some if or switch statements. A bit more complex, but no real problem here.

We take the next step and really seperate the interface and the data access layer. So we setup a seperate project which only concerns itself with fetching and updating the data in the database. It is unaware of the front-end and therefore creates many abstractions that will be used by the front-end. This might lead to some redundancy. For example, it might check data that is already checked in the front-end, or it might make calls to the database to retrieve data that was already retrieved before, but of which the data layer was unaware. This might be a slightly bigger problem, the performance hit here to re-fetch data from the database can be considerable. But, CPU and memory is cheap, so you don't really need to worry about it these days.

The applications grows bigger and bigger, the decision is made to implement some kind of middleware, or a business layer at the boundary between your interface tier and your data tier. This middle tier must be quite flexible, because it abstracts away both the data retrieval and the interface functionality. Since there is little knowledge of this available, the middle tier can do nothing else than just work at the level of the lowest common denominator: whole business entities, perform all validations, all authentication, authorization, etc. Good practice in itself because it is the only way you can reliably say that your business logic and integrity will be executed. But again you might face the problem of even more redundancy of functionality in the interface tier, the business logic tier and your data access tier.

But is this really necessary?! The data access layers and business layers are often designed with this question in mind: 'which information do we supply?'. But should the emphasis instead not be on the question 'what information does the interface want?'. Do we push the data? Or do we explicitly pull the data?

For example, in our original application we decided to fetch the name field of an entity (e.g. a user) using in-line sql code. We ask for the name, and that is what we get. Nothing more, nothing less. Now consider the 3-tier application. We ask for the name, but there is no such method in the middleware so we retrieve the whole entity instead. The middleware decides to check whether we have the proper authorization to fetch the entity. And then whether we have the authoriziation to read the name field. The data access layer is unaware of these validity checks and, just to make sure, performs this validity again. The middle tier is also aware of the whole entity hierarchy so for convenience it implicitly figures out the exact (derived) type of the entity, even thought the name field we are interested in is only specified in the root entity. Maybe a bit exagerated, but I hope you get my point: there is a lot of unnecessary overhead involved. Surely we needed all this functionality when we wanted to retrieve the whole entity, using polymorphic fetches, etc. But we do not need it in this case. We just want the name of the entity. Ofcourse proper validation and authorization is needed, but only the kind that is directly related to the data we want. We don't want any data we don't need, and surely no functionality acting upon that unrequired data.

Now consider the three tiers working together as a typical supply chain seen in the retail industry. Within the field of operations research, the effect of unnecessary provided resources compared to the original demand is well-known as the bullwhip effect. This effect occurs when every manufacturer in the supply chain adds a 'safety' margin to the original amount of requested products. This accumulates up the chain and ends up in supply orders that overestimate the original demand. So even though the end customer maybe only have requested ten products, by the time the order reaches the raw materials manufacturer the order has grown to create a potential of twenty products. You can clearly see the problem here in the waste of resources due to the mismatch between supply and actual demand. The solution in this field of research has been the focus on demand-driven supply, or to put it different, the original demand by the customer must stay intact as long as possible upstream in the supply chain. This makes sure the supply is most likely to be equal to the actual demand.

I see analogies in the software systems we are building. But we may even have a bigger problem. Whereas in the retail industry the focus has been on the customer instead of the supplier for a while now, the software industry still considers the 'customer' (in this case the interface tier or the actual user) as just an executor of supplied services and information. Not as the creator of demand of specific services and information. Who is in charge of your information retrieval?!  Is is truly the business layer that can decide which information to supply? Does the interface tier merely makes convenient use of all the entities the middle ware provides? Or is it the interface tier that specifies exactly which data it is interested in? I believe it should be the latter.

There might be some improvements to be made on this topic. Yes, it is bad practice to directly access the database from your button click eventhandler. But this does not mean it is equally wrong to specify what you want in a query format and hand it over the other tiers. E.g. if I would write this in my eventhandler, would it be really wrong?

SELECT Name FROM User where User.Id=123

Is this not exactly what it needs?! How can it be more terse and self-explaning? Still, most programmers would shrug at just the sight of seeing code like this in interface code. But what if I could just hand this query over the middle tier for further processing. The middle tier would then add some business logic and validation logic in this query definition and hand it over to the data tier. This tier would in turn add some database specific filters to the query and execute it. The resultant data (a single string representing the name of the entity) would be returned to the middle tier and back to the interface tier. The amount of overhead is minimal, since the original request of information stays intact all the way up to the data tier. There is nothing more and nothing less we need.

To come back to the technology I started with, I believe LINQ is a path to enable a strategy like this. The deferred execution makes is possible to adjust the query definition in all the tiers before it is being executed. Thereby making it possible to inject the query with validation logic and authorization logic. Or to inspect the query just before executing it, instead of making assumptions about the final use of the supplied data.

Empower your interface, it knows best, but make sure your data and business layers are your law-enforcement troops.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Professional

Social Graphs and the semantic web

by bas 5. February 2008 14:27

At Google they have created an API to look up a social graph. I found it particularly interesting to come across this, since I had been thinking about the same concept for some while. I even wrote something about it a while ago. The driving idea behind it is that we have many fragmented online identities. But, ofcourse, there is only one real identity, that is the body you're carrying around all the time with you. It makes sense to somehow connect these online identities and identify the only single real identity. Now with the immense information base available at google it should be possible to create some smart page indexing and extract these information. But this is not what the social graph does: it makes use of the XFN standard to extract high-quality and consistent information. An example of an XFN compatible tag would be:

<a href="http://tanya.example.org" rel="friend met colleague">...

In this example you do not only specify the url to which the hyperlink points, but also the relation. It drives the forming of a semantic web, where not only pages and resources are linked together, but also their relations are described. Very nice stuff, but at the same time also vulnerable for abuse and privacy infringement. Use it wisely.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Professional

Het eenzame internet

by bas 30. January 2008 18:18

Zonder twijfel is de grootste mysteries van deze tijd de mens zelf. Of eerder, het bewustzijn. We zijn bewust, zeker, maar niemand weet hoe. Het is verleidelijk om in te beelden dat er in ons hoofd een klein mannetje zit die alles ziet en regelt (een zgn. Homunculus), maar daarmee verplaats je het probleem alleen maar. Dusver weten we niet welk gedeelte van onze hersenen zich bezighoudt met zelfbewustzijn, laat staan dat we weten hoe ons bewustzijn fysiek in elkaar zit. Misschien komen we er wel nooit precies achter, maar ik heb er hoop in dat we achter de onderliggende principes kunnen komen. Een fascinerende tak van sport in de wetenschap is de bestudering van complexe systemen en emergence. Hierin worden vragen bestudeerd als 'hoe kunnen simpele insecten gezamenlijk grootse dingen doen (mierennesten, groeperende vogels)?' tot 'hoe werkt een wereldwijde economie?'. Het idee is dat de som van simpele acties kan leiden tot complex en zelfs intelligent gedrag dat boven het individu uitstijgt. Zo werkt een mier enkel reactief op basis van geursporen van andere mieren, maar gezamenlijk hebben mieren een complexe samenleving en zijn ze samen in staat grote vijandigheden (dieren, veranderingen in de omgeving) te lijf te gaan.

In dit perspectief kan ook ons bewustzijn worden gezien als een 'emergence' van onderliggende simpele acties. Op een laag fysisch niveau is ons brein niks meer dan een enorme verzameling van neuronen die hun directe buren continu activeren of deactiveren. Zeer simpel en lokaal gedrag dus. Net als een mier. Toch zorgt de samenwerking van miljarden en miljarden van deze neuronen tot intelligent gedrag; een wezen dat kan communiceren, creatief is en zelfs zelfbewust is: een behoorlijke prestatie!

Waar wil ik nu heen met dit verhaal? Blijf nog even bij me, want ik ga nu een behoorlijke gedachtensprong maken. Als het brein een netwerk is van simpele neuronen die actief zijn, en het internet is een netwerk van computers en mensen die actief zijn met elkaar. En een enorme combinatie van al deze activiteiten vormt intelligent gedrag.. is het internet dan ook intelligent? Kan het internet ook creatief zijn? Of nog belangrijker, is het internet ook bewust? Wellicht is het dat al, maar zijn wij, net als de neuron en de mier, niet in staat om dit te begrijpen. We staan immers lager in de hierarchie dan het internet zelf. Het internet zien als een levend organisme is trouwens minder vreemd dan je op het eerste gezicht zou zeggen, door het als een metafoor te gebruiken wordt het duidelijker. Een hype op het internet kan je zien als de huidige (bewuste) gedachte van het internet. De grootste firewall in China is als een ziekte. Online nieuwsberichten kan je zien als de ogen en oren van het internet. Er zijn veel paralellen te trekken tussen de mens en het internet. En als het internet een beetje menselijk is, en we hebben maar één internet, wat zal het dan eenzaam zijn ..

 

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Personal

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

Search


Feed

RSS comment feed Subscribe to RSS feed (informs you when there is a new writing)

Recent posts

Recent comments

Tags

None