Mobil Mewah

Salah satu sumber Inspirasi.

Saturday, 12 November 2016

CouchDB test performance using httperf

After test an erlang framework to serve JSON API from a postgreSQL database, i remember that had installed CouchDB in my laptop, and why not use it with same data and try the performance load using the same httperf command. The result of json from couchdb : {   "total_rows": 2,   "offset": 0,   "rows": [     {       "id": "2f9bc9fb62f3e8fa19ace932b9000d9f",       "key": "2f9bc9fb62f3e8fa19ace932b9000d9f",       "value": {         "_id": "2f9bc9fb62f3e8fa19ace932b9000d9f",         "_rev": "1-0a77ba71f874dc7ca2b7d22893cf4882",  ...

Erlang Chicago Boss JSON API test performance

I am documenting my test on erlang web framework, Chicago Boss and use it for backend API. My setting for the database using Postgresql 9.2 using 1 table with 2 rows and 4 fields only and return the request using JSON. I test the performance load using httperf on my debian 8 laptop. # httperf --server 127.0.0.1 --port 8001 --uri /todo/list --rate 150 --num-conn 27000 --num-call 1 In this simple test, the same page is retrieved repeatedly. The rate at which requests are issued is 150 per second. The test involves initiating a total of 27,000 TCP connections and on each connection one HTTP call is performed (a call consists of sending a request...

Sunday, 21 August 2016

Creating a base view in backbone marianotte js the good way

Marionette JS is based on Backbone JS and a lot of the module extend from basic backbone modules. Here i learn when i extend a module whether it was a view or model or anything you will do like this : var BaseForm = Marionette.ItemView.extend({           initialize: function(){            this.title = "title"       }, }); and to use it on a custom page view base on the BaseForm you will do this : var contactForm = BaseForm.extend({           initialize: function(){             this.rows = 2;    ...

Saturday, 20 August 2016

GlusterFS for scalable storage

When look for a storage, a simple thing for system admin was a NAS. With a NAS appliance, your life is easier. Plug and forget, if ever happend to the harddisk, just replace it as already have RAID system. But still, the storage size is limited to the disk bay provided and a disk size available, also with RAID, disk size is limited to the smallest disk available. So when we need a future expanding of the storage size, NAS is not an easy way to do...

Wednesday, 17 August 2016

Marionette JS the basic of javascript Front End

When talk about Front End development, developers will look how to build fast and update fast. With basic javascript, you can build a frond end app, but will have a boiler plate code. So people look for frameworks and library. As my journey on developing Front End web apps, first look to using plain HTML + CSS + Javascript , which will use Jquery of course. Move on to the next level, developer tends will use a framework. There are plenty of frameworks, like AngularJS, EmberJS, BackboneJS. Each have their own benefits. I have try angularJS, and with current angularJS status, i don't fell like it. It breaks everything, and you will have...

Sunday, 26 June 2016

Restrict user command using SUDO in Linux

Linux Security Police : Sudo In Linux world we can restrict a user to run a specific command that need to be root privileges. Just use sudo and give sudo permission to user. But wait, that will give a super user privileges to the given user. They can do any Root user do, reboot, shutdown, rm -Rf /*  . Oh my, so what can we do. In sudo still we can permit a user to run a specific command as a root level user, without giving all the root access...

Thursday, 9 June 2016

Rest API with Django REST framework

When working with REST Api in your own application, you want to create a REST api which is follow the web standard of REST. In python , especially Django Worl, you can use Django REST framework. It support the REST Method , GET, POST, PUT, DELETE and handle it for you in the back ground. So with this blog post, i want to have a post about my experience on working with Django REST framework. I never use it until my requirement for application goes...

Tuesday, 7 June 2016

updgrade Django-1.7.11 to 1.8.13

After upgrade my django to 1.7.11 , now the next version is 1.8.13. So as usual i create a new virtualenv, with django-1.8.13 as the requirement, install the env with pip install. The application affected which i use some are documented here. Error on django-compressor-1.6 library.I try upgrade to django-compressor-2.0 and it fixed. Django complain about south database module 'south.db.postgresql_psycopg2'. The warning tell to just remove south or using other supported database in south on SOUTH_DATABASE_ADAPTER settings.As Django have the build in migration, i will remove south package from my installation settings, and also remove the...

Sunday, 29 May 2016

Django Test Improvement Speed

Testing in software development is a tedious task, and some programmers skip it. But many start to do the right thing from the beginning, Test Driven Development (TDD) movement make software developer more aware on delivering properly tested battle proven software. I also using TDD with my Django development. One of factor when your test getting more and more in quantity, the test running slow as the test increased as your software getting more...

Saturday, 28 May 2016

Upgrading Django-1-6 to 1-7 part 2

This is part 2 of upgrading Django-1.6 to Django-1.7 journey. For part 1 you can go Here. First error was my application using a module that was deprecated since Django-1.6 which already give me warning to fix it, but i ignore it. And i remember that, so i remove it and update with other lib. The lib i use was django.utils.simplejson. from django.utils import simplejson  I change it to using json lib. import json Next is the...

Upgrading Django-1-6 to 1-7 part 1

Currently Django already in version 1.9 the latest. And my Django app developed on Django version 1.6 since my last update. As the support and update will not delivered to version 1.6, better to upgrade it to the next version, which is 1.7 . In upgrading a Python web framework like Django, the path not easy especially if you already build and using many library. Some will support the new version, some just not available for the new version of...

Wednesday, 18 May 2016

Postgresql Database basic Tune up

Postgresql is a robust database. it can server thousand of request per minute, if tune properly. Some basic config you can do for tune the database are documented below. Memory use : shared_buffers = 2GB # RAM/4 up to 8 GB work_mem = 32MB #Non shared memory use for sort , etc # 8 MB to 32 Mb: web # 128MB to 1 GB: reporting # limit : Ram/(max_connection/2) effetive_cache_sie = 6GB # 3/4 of RAM wal_buffers = 64Mb # just set it maintenance_work_mem...

Monday, 22 February 2016

Microsoft Exchange 2007 Logging

With Microsoft Exchange 2007 everything should be running smooth after first install and for new administrator with Exchange this is great. But when you need to get the logs of the server transaction, the default settings was not enough. Let say the log retention, size of the logs, and other things will be need to adjusted according your organization requirements. This will also affect the server sizing and performance. Thats why sometimes click...

Saturday, 20 February 2016

Running CGI script on Nginx Web Server on FreeBSD

Yes CGI is an old technology. I encounter to be able run an old CGI script for testing on my development project. And i am using Nginx stack rather than install apache. So we can run CGI script with Nginx web server. Here how i do it and documenting it here. on FreeBSD 9.0 server, we using fcgiwrap application. #cd /usr/ports/www/fcgiwrap/ #make install clean Then enable it to run in /etc/rc.conf  : #echo "fcgiwrap_enable='YES'" >> /etc/rc.conf Then start the fcgiwrap. it will be available in /var/run/fcgiwrap/fcgiwrap.sock To use it, just redirect the script to be run with fcgiwrap.sock. Here the nginx setup. server {  ...

Page 1 of 2512345Next
Twitter Delicious Facebook Digg Stumbleupon Favorites More