Blog
All Blog Posts | Next Post | Previous Post
Hello, TMS Sparkle
Monday, April 7, 2014
TMS Sparkle is a brand new product released by TMS Software. It is a Delphi framework for network, Internet programming.As stated in the online documentation, TMS Sparkle is the core building block for several other TMS products and technologies, such as upcoming TMS RemoteDB and TMS XData. Such products needed to be built from scratch, and to rely on a robust framework for which TMS could have 100% control and also responsibility. For such products to work flawlessly, we needed to be sure to build such products in a framework that must be properly tested, and have fast response in performance improvement and bug fixing.
It is trustworthy, fresh, modern, cross-platform (Windows, Mac, iOS, Android) and most of it, as much platform native as it can be.
TMS Sparkle is part of TMS Business Subscription, which contains many other products, like TMS Aurelius and TMS Scripter, and will also receive the mentioned upcoming products TMS RemoteDB and TMS XData.
For detailed information you can refer to TMS Sparkle product page and online documentation. In the meanwhile, to illustrate its usage, here is the full source code for a minimal Http Server using TMS Sparkle:
program HelloWorldServer; {$APPTYPE CONSOLE} uses System.SysUtils, Sparkle.HttpServer.Context, Sparkle.HttpServer.Module, Sparkle.HttpSys.Server; type THelloWorldModule = class(THttpServerModule) public procedure ProcessRequest(const C: THttpServerContext); override; end; procedure THelloWorldModule.ProcessRequest(const C: THttpServerContext); begin C.Response.StatusCode := 200; C.Response.ContentType := 'text/plain'; C.Response.Close(TEncoding.UTF8.GetBytes('Hello, World!')); end; const ServerUrl = 'http://localhost:2001/tms/business/hello'; var Server: THttpSysServer; begin Server := THttpSysServer.Create; try Server.AddModule(THelloWorldModule.Create(ServerUrl)); Server.Start; WriteLn('Hello World Server started at ' + ServerUrl); WriteLn('Press Enter to stop'); ReadLn; finally Server.Free; end; end.
Wagner Landgraf

This blog post has received 6 comments.


Wagner Landgraf

1) Se vocês conhecem a razão pela qual o mORMot framework teve resultados significativamente melhores com testes de 100 threads nestes benchmark ( https://datasnapperformance.wordpress.com/2014/10/15/datasnap-performance-test/ ) mesmo quando ambos, mORMot e Sparkle, utilizam o mesmo motor http (http.sys)?
2) Existe algum planejamento (roadmap) para incluir um motor http alternativo para produção de servidores linux? Algo como “Monkey Http Server” ( https://github.com/monkey/monkey ), uma vez que está no roadmap da embarcadero ( http://edn.embarcadero.com/article/43677 ) o compilador para LINUX servers?
Geziel


1) Nâo considero as diferencas relevantes. Ambos sao muito mais rapidos que plataformas consagradas e muito usadas como Wcf e Node.Js então sinceramente a diferenca entre um e outro eh apenas um número que so importa a obcecados com otimizacao. Pode haver uma serie de fatores, nao sei como foram realizados os testes e nao sei se os mesmos resultados seriam encontrados se forem repetidos diversas vezes. E pra ser honesto, nao estamos preocupados em saber. Tendo uma performance boa para uma aplicacao real (melhor que node.js!) estamos mais preocupados em prover funcionalidade, facilidade de uso, produtividade, robustez, etc.
2) Nossa limitacao eh apenas a capacidade da Embarcadero em prover os compiladores. Quando estiver compilando pra Linux, iremos suporta-lo (mas provavelmente sera o Apache Server). Nao temos por enquanto interesse em usar o Lazarus/FreePascal pois a funcionalidade RTTI é muito rudimentar e isso retiraria uma serie de recursos do Aurelius. Tambem vejo atualmente uma menor necessidade de Linux no servidor visto que eh muito facil e barato fazer deploy de servicos windows na nuvem hoje em dia.
Wagner Landgraf

Antonio Baceiredo


Wagner Landgraf
All Blog Posts | Next Post | Previous Post
Claudio Ferreira