11
16 October 2002 ROOT 2002, CERN 1 Progress with Carrot Valeriy Onuchin

16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Embed Size (px)

Citation preview

Page 1: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

16 October 2002 ROOT 2002, CERN 1

Progress with Carrot

Valeriy Onuchin

Page 2: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 2

Plan of the talk

What is Carrot? What’s new in the coming release? The future of the project

Page 3: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 3

What is Carrot?

Carrot is a module for Apache web server which enables the use of C++ as an HTML-embedded scripting language as well as executing C++ macros. It is similar to PHP, in functionality:http://carrot.cern.ch/index_C.so?about

Page 4: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 4

What’s new in the coming release?

File uploads Improved TApacheBrowser SVG graphics and animation New configuration options Code correction and optimization Automated Garbage Collection More examples

Page 5: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 5

File uploads

Carrot is capable of receiving file uploads from browser the code was mainly “borrowed” from

PHP and follows their “ideology”<form enctype="multipart/form-data“ action="resp.C" “ method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="1000"> Send this file: <input name="userfile" type="file"> <input type="submit" value="Send File"> </form>

calling gSystem->Getenv(“userfile”) in resp.C macro will returns a name of uploaded file

Page 6: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 6

Improved TApacheBrowser

Possibility to make a query on a TTree and “scan” the result of query

Possibility of file download while browsing Possibility to switch on/off popup canvas Browsing other types of TFile (TNetFile, TRFIOFile,

TDCacheFile )

Page 7: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 7

SVG graphics and animation

An example added how to save TPad in SVG format and display it on the web

An example how to create SVG file with frame based animation added similar to animated GIF example

Page 8: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 8

New configuration options

$ROOTSYS/etc/system.rootrc Carrot.CanvasPopup: on/off Carrot.TmpDir: path to TMP directory Carrot.CacheSize: size in Mbytes Carrot.UploadFiles: on/off Carrot.DefaultImageProgram: program

name …

Page 9: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 9

Code correction and optimization

Processing cookies now follows RFC2965, RFC2109 standard

Speed optimization of the code was done

Separate GET,POST,Cookies,FILES lists were introduced

Page 10: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 10

Automated Garbage Collection

While processing client request server allocates memory (pool) which is freed when request is over. Overloading “new” operator which allocates memory in request’s memory pool enables to have “Automated Garbage Collection”.

Page 11: 16 October 2002ROOT 2002, CERN1 Progress with Carrot Valeriy Onuchin

Progress with Carrot Valeriy Onuchin, CERN 11

The future of the project

Testing on different platforms Creation Apache-2 module Improving TApacheBrowser

add possibility to browse relational databases

What else?