Friday, April 30, 2010

More optimizations

I've optimized the memory fragmentation (far less memory allocations/deallocations in Concept Core). GyroGears now generates smart update functions reducing the amount of data sent to the database server (reducing the load in high-concurrency). These are the final steps to the first release. Also, a bug in Concept Client regarding a desynchronization between the server and the client treeview reference was fixed.

Wednesday, April 21, 2010

Purple supported in Concept

I've just finished testing the basic functionality for libpurlpe (the IM library behind Pidgin). It now has a wrapper in the standard Concept Application Server distribution. It's a nice library supporting most common IM protocols like AIM, Yahoo, MSN, ICQ, IRC, MySpaceIM and many more. Also, lots of custom plug-ins available on the web, like microblog. It has a really complex interface with almost 0 documentation, but after spending almost 3 days I've managed to write a basic wrapper for it.

So, just include BasicPurpleIO.con in your project, and you can work with something like this:

P=new BasicPurpleIO();
echo P.Protocols;
P.OnSignedOn=OnSignedOn;
P.OnMessage=OnMessage;
P.OnFileTransfer=OnFileTransfer;
P.OnFinishTransfer=OnFinishTransfer;
P.Login("prpl-yahoo", "your_id", "your_password");
P.Go();

the Protocols property will list all the supported properties, anything else is really straightforward. See the Samples/Net directory for an working example (test-IM.con).

On Debian, there is a catch. You must run it with a LD_PRELOAD option (not really sure why, but I've seen the same problem in Python). For example, if your script is called test-IM.con, you should run it:
$ LD_PRELOAD=/usr/lib/libpurple.so conceptcli test-IM.con

I hope to solve this problem soon (or at least somebody does).

You just have to write a pretty colors user interface, and you'll have your own IM client.

By the way, while writing the wrapper, I've noticed some APIs that could be used to write software to identify your invisible buddies on Yahoo. Did you noticed the number of users of scanner websites? Now multiply with 0.1c ... One more reason to learn Concept.

Sunday, April 18, 2010

CAS and GyroGears stress-test

I've tested at www.rackspacecloud.com cheapest 64-bit, Debian Linux virtual server with 256 MB of memory (1.5c/hour) with the new Concept Application Server running a real-world medium CRM application generated by GyroGears used by telephony-services reseller, application developed by a friend (a non-programmer). I've managed to squeeze about 75 connection with the server still standing up. I wanted to go for 100, but I had no memory on my desktop to open client connections to the server and I was to lazy to go for the laptop. I believe that it could support 100 simultaneous connections. Keep in mind that the test was made on a 64-bit server with minimum amount of RAM. Using a 64-bit system will cause a significant increase in memory usage (about 20%). I'm sure that on a 32-bit server, 100 CRM instances will easily be supported.
In conclusion, I could say that concept:// application have now no significant disadvantages to http://. Peak memory usage was the last major one, but now it's a clear advantage. Peak-memory-usage for server-side processing is incredibly low due its shared-memory pool.

Tuesday, April 13, 2010

Keep playing

I'm switching my posts to English. I've debugged a lot, especially the compiler and parse. Some crashes related to unclosed arrays expressions, eg: [1,2; (missing ']') that in some particular cases caused crashes in the parser were fixed. In GyroGears I've added two new features:
  • multi-select when searching that will allow to select multiple items when advanced searching
  • read-only fields - fields that cannot be edited by the user
I'm often asked why I do Concept Application Server and GyroGears for free, and I'm not sure I have an answer for that. Apparently is a non-purpose action... but not for me. Is fun, and I'm playing !
I was just thinking the other day about what "being a man" is supposed to be. Is maybe a standard imposed by women in order to gain something in return ? Maybe the "being a boy" is incompatible with the woman's essence.
Playing, seen as activities with no monetary value:
  • whistling just for fun
  • climbing a mountain or even a hill just for the view
  • coding software just for fun
  • walking, running just for the fun of it
  • singing with no audience
  • playing hide and seek with your cat
  • being happy when you're broke
  • playing with toy-boats in the bathtub
  • dreaming
Manhood as defined by average woman:
  • being a provider
  • worrying
  • stop dreaming, stop playing
So, let's play!
Today I'm getting older - I'm 33 (3 x 3 x 3 = 27 not yet 33 !) years now, and I continue playing.

Friday, April 9, 2010

Reducerea finala - 40% + cele anterioare = ~60%

... am reusit sa reduc cu inca 40% consumul de memorie, in total in ultimele zece zile reducand cu 60% ... eu personal sunt impresionat, dar asta e doar pentru ca sunt prea plin de mine. Am mutat vectorii de relocare (numiti in termeni populari "niste chestii") in zona de memorie partajata obtinand o economie serioasa, suprinzatoare si pentru mine de altfel. Fata de acum un an, memoria folosita de CAS a scazut cu 90%... nici macar un octet nu mai ramane nefolosit. O alta varianta de a reduce, ar fi un procesor care sa stie sa lucreze pe 24 de biti, pentru ca de multe ori, 16 biti e prea putin iar 32 prea mult.

Oricum, sa-ti arat modelul shared - e colorat.

Toata zona de "code" ramane incarca o singura data indiferent de numarul de utilizatori, consumul de memorie fiind redus asa cu peste 67%.

Cateva aplicatii si consumul lor actual:
  • Concept IDE - 7.8 MB ram/user pe server
  • GyroGears - 7.5 MB ram/user pe server
  • Concept WKB (web browser-ul) - 2.8 MB ram/user pe server
  • HR Companion 2.4 - 18 MB ram/user pe server (are spre 1 milion de linii de cod)

Monday, April 5, 2010

Redus cu inca 11.5%

Am redus cu inca 11.5% ... nu e chiar "inca 15%" dar e destul de aproape ... Nu stiu de unde mai pot reduce dar probabil ca-mi va veni o idee.

Concept IDE consuma acum 8.6 MB ram/user pe server ... Concept ruleaza ! (varianta romaneasca la "Concept rules !")

Thursday, April 1, 2010

Cu 11.3% mai multi useri

Am redus consumul de memorie cu inca 11.3% ... asta inseamna ca pe resursele hardware pe care puteam tine 100 de useri, ducem acum 111. O reducere de memorie de inca 15% m-ar multumi pentru moment, dar nu am nici cea mai mica idee de unde.

Ca sa-ti faci o idee, Concept IDE consuma acum pe server (fara proiect deschis) 9.5 MB RAM.

Am testat foarte mult cu Memory Validator - o unealta excelenta - din toate uneltele de memory analysis pe care le-am testat, acceasta mi s-a parut cea mai utila. Probleme mari nu au fost gasite (eu fiind mandru de asta).

Am filtrat si warning-urile (fiind excesiv de multe). Acum, pe o aplicatie de test pe care se generau aproximativ 5800 de warning-uri, se genereaza acum 235 relevante. Iti dai seama ca la 5800 nu le-ar fi luat nimeni in serios ...

Pe GyroGears - multe lucruri noi si mult debugging - au fost corectate niste bug-uri legate de butonul ce apare pe formurile child pentru referire la parinti (daca se apasa pe acel buton, din copil, se mergea pe parinte si se faceau operatiuni de add/modify pe relatii se ajungea la invalidarea tranzactiei).

S-au adaugat membri "read-only". Acum orice membru poate fi definit ca read-only, indiferent de tipul lor.

Am inceput lucrul la noul site (sper sa si reusesc sa-l si termin).