Сообщения

Сообщения за ноябрь, 2017

Connection pooling to the database — and why

Изображение
When Your project begins popular and every millisecond of processing the request from the user is critical, it is necessary to search for bottlenecks in the system. Often the time it takes to execute SQL query from the application to the database. Try to understand that it is possible to optimize the program when working with the database. the Theory For better understanding let us consider what steps are performed when an application makes a request to the database, such as request sample: the Opening connection to the database and send the request to the server. the Server parses the SQL query. the the Server optimizes the query based on rules and statistics tables. The result is a query execution plan. the the server executes the query in accordance with a previously built plan and sends the results to the user. On what can you do to save time? First step open the connection with the server is quite long and we can exclude in advance by preparing a pool of

Ruby Open Air (16.06.2012) Minsk

Изображение
June 16, with the support of Belarus Ruby on Rails User Group will be held the first in Belarus Open-Air Ruby – informal conference (unconference), which will meet Ruby and Ruby on Rails developers from Belarus, near and far abroad. The headliners will perform Lee Hambley (maintainer of Capistrano, Germany), Denis Gorin (netzke.org, the Netherlands), Vladislav Gorodetsky (polyglot programming evangelist, RubyShift, Ukraine). Ruby Open Air will be a platform to discuss the latest trends and directions of development of Ruby and Ruby on Rails, modern solutions, current issues and exchange of experience. To obtain maximum benefit to help different formats of presentations: technical presentations and mini-lectures, discussions, and networking. Venue Ruby Open Air – estate " Terraces ". Participants enjoy a full program of both the unconference and after, including Beer & BBQ Party, bath concert band Open Space, and extreme entertainment for serious Ruby devel

Comparing the performance of MongoDB vs. PostgreSQL. Part I: No index

Изображение
Not long ago, faced with the need to independently evaluate the performance and resource consumption increasingly gaining popularity noSQL database MongoDB . For clarity, decided to compare it with the performance of PostgreSQL, which is also notorious and widely used. Environment Tests were performed on a virtual server with the following characteristics: cpu: 4 cores at 2GHz RAM: 2GB OS: Centos 6.4 mongoDB Version: 2.4.3 Configuration: the logpath=/xxx/mongod.log logappend=true fork = true dbpath=/xxx/mongo pidfilepath = /xxx/mongod.pid Settings when starting mongod: the OPTIONS=" -f $CONFIGFILE" PostgreSQL: Version: 8.4.13 Configuration: the shared_buffers = 1GB max_prepared_transactions = 0 work_mem = 64MB maintenance_work_mem = 512MB effective_cache_size = 512MB Subjects It was decided to create and add to the test collection (a PostreSQL table) exactly 1 000 000 records. The algorithm of generation of t

Principles of DBMS. MVCC

Изображение
Many of us have faced in their work with the DBMS. At the moment the database in one form or another all around us, from mobile phones to social networks, including and beloved Habr. Relational DBMS are the most common representatives of the family of the DBMS, and most of them are transactional. We were forced to learn the definition of ACID and its properties, but somehow the party managed the implementation details of this paradigm. In this article I will try to partially fill this gap, describing MVCC, which is used in such DBMS as Oracle, Postgres, MySQL, etc. and is very simple and clear. So, you should start with the definition of ACID: the A tomicity transactions are atomic, i.e. either all changes of a transaction are recorded (commit) or are all rolled back (rollback); C onsistency — a transaction do not violate consistency of the data, that is, they transferred the database from one valid state to another. You can mention a valid field values, foreign keys and

Code authors Habrahabr

Изображение
Paraphrase the words of Tim O'reilly : we like..., because here we are free to write and communicate with smart people. But frankness does not mean lack of civility. We bring you this "code of the authors Habrahabr" in the hope that it will help to create a culture that encourages personal attitude and a constructive dialogue. It is not a document, which must be strictly adhered to. This is not a document. These are the rules that keep some authors in the resource. I Agree with these rules and act in accordance with them following the authors Habrahabr: ManPavel , NaFigator , norguhtar , vpol , rosnovsky , 2Bad , DileSoft , alammi , Uznick , Miker , mmost , hedin , p1uton , lovermann , Severus , Karlsson , bobuk , rossomachin , @MrProRunner, powerman , Mio , julia , PAD , Synth , masterbo , CurlyBrace , Nicholass , Cosss , oleg_bunin , unno , eXtractor , zemlanin , blockdog , snoopy , drhyperkalich , pozitivevil . (if you add yourself SDAs ) To support,

This year Google has already removed 100 million "pirate" links from the issuance

Изображение
The number of requests to delete links to pirate resources, the displayed search Google, grows like an avalanche. More recently, the expense of such removal requests was in the thousands. Now in the millions. So, in 2013, the Corporation had to remove over 100 million links, but the year is not over. This is more than twice the amount of material removed last year. On average, Google has to remove 15 million "pirate" links per month. Information on the number removed from the issuance of links the Corporation began to publish in his Transparency Report in the last year. Since then, the number of DMCA requests from copyright holders has grown very fast, we can say, like an avalanche. Of course, manually millions of requests one process can not, even if it is to recruit an army of people. Therefore, the vast majority of links that the franchisor requires to remove from the output of the still is removed. For example, request removal, if you take the exact numbe

Selling photos from Instagram

Изображение
They say that Instagram is a service for hipsters who only use a couple of filters. Indeed, for many this is enough, but the monkey a thousand of pictures may accidentally turn one, which is not going to change. This picture, which you want to hang on the wall in the room. And you can even earn money if other people will like this work and they ordered it on a real canvas. The idea apparently was in the air, because in the West the Internet there are at least two services that offer this service — print photos from Instagram on canvas. Both services pay compensation to the photographers whose work was printed. Instacanv.as prints of paintings in three sizes: 50x50 cm ($80), 40x40 cm ($60) and 30x30 cm ($40). Shipping in the US and Western Europe is free shipping the rest of the world costs $49 for first picture and $25 for the follow up. Photographers are invited to create their own galleries on the website with a personal URL, they get rewarded 20% of the c

"Runet today", 2 July 2012. Experts of issue: Andrey Fadeyev, Fyodor Krasnov

In the Studio "Finam FM" — Andrey Fadeev, founder and CEO of Progrestar, and Fedor Krasnov, Director of the project office the Virtual SKOLKOVO program. Together with the lead, Maxim Spiridonov, they speak about research in the area of financing of Internet companies, the intention of RBC to get rid of its own payment system on the conceptual changes that occurred with major video service on the Internet, and some of the legislative amendments proposed by the Ministry of communications. 1. The Fast Line Ventures Fund has published a report on major transactions in the Russian Internet market in 2010-2011. How accurate are these results? — Comment: investment analyst Fast Lane Ventures Andrey Kulikov. 2. Media company RosBusinessConsulting is negotiating the sale of its 74% stake in e-payment system RBK Money. — How this transaction may affect the e-money market? — Comment: General Director of holding of RBC Sergei Lavrukhin. 3. Video portal Rut

Transport Tycoon Deluxe / Emscripten part 2

Изображение
Transport Tycoon (Transport tycoon) is pretty old, but still enjoyable, especially the maniacs, the game is in the genre of RTS. /.../ There is also OpenTTD, outdoor product manyatta iPhoto, resulting from the game can not be distracted even in the toilet and underground, setting her on the Communicator or PDA. lurkmore I can honestly say: I killed a huge amount of time playing Transport Tycoon Deluxe. I'm just a fan of this game. So when on Habre the article appeared about how the guys from mozilla have ported Doom, I hit on the idea – to migrate one of my favorite games here on the Internet. By the way, the article was scarce, but I learned the main thing – the porting can be done using emscripten . Since the inception of the thought of the possibility of such a project was not less than a year (my first attempt crashed on the rocks of misunderstanding). And now I'm in a hurry to please you all: I did it! Now to sit ass playing TTD you can be located anywhere con

Open start-up School SumIT from 21 July

Изображение
From 21 July to 31 August in St. Petersburg will host the largest event in the field of innovative entrepreneurship — Open start-up School SumIT . SumIT is a open a six-week educational program , during which startups in the fields of IT and biotechnology are educational course on turning ideas into business model, as well as adopt the experience and knowledge from professionals, investors and representatives of venture capital funds. Each team is attached to your mentor, and at the end of the course, our partners provide the best investment start-UPS. Ten projects involved in the Startup School is free (the most interesting will be selected after consideration of all projects). These teams will receive a free co-working, active support of our team, the ability to speak in front of investors and get an invitation to the accelerator iDealMachine. And absolutely everything will be available to the public part of the program. Over the past two season our School S

When the basin is small, or it's time to choose VPS server

Изображение
Recommendations for the analysis of the characteristics and proper the choice of VDS hosting . Is intended to read the users who need to make a decision on the expediency of transferring web projects with a large load on the web server (forum, media portal, online store) hosting virtual dedicated server. the 1. When the Internet project has outgrown shared hosting the 1.1. What is VDS Virtual dedicated server — VDS (virtual or VPS private server) is created with the help of special programs and technology mini-server, limited in resources, but much more than moschny web hosting fully private and controlled by its owner. the 1.2. Signs of increased load on the hosting In the process of development of the Internet project comes one of three possible situations: the When the site starts to open more than 4 seconds, every day becomes unavailable, and from a technical hosting support come the angry letters about the excess load on the CPU and memory on the web se

Today started a free online database of blood donors AnyBlood.ru

Despite the existence in each city of Russia the blood, again and again, perhaps in the very moment as you read this article, someone's life hangs in the balance — and she's about ready to break off because fails time and to the extent necessary to deliver in a particular medical institution with the blood of a certain group or blood products. This is partly due to the indifference of the people, partly with the absence of such a centralized database of potential donors. July 30 began the work AnyBlood.ru , which aims to set up a national database of potential blood donors in a free and voluntary basis. This site will never have ads or profanity. Registration in the database will take you less than a minute and you are free to specify only those contact details that you see fit. If urgent, to save someone's life, you will need your blood group and rhesus factor, you will be contacted and informed about this comfortable way. You will be free to decide ano

The curriculum online. History version startup Schoodle

Изображение
This post will cover my experience and the experience of our team in the production and promotion of service Schoodle.ru . The theme of the curriculum – it is beaten. By automating their drafting written tens of thousands of theses peacefully resting in the archives of hundreds of universities. Creating a universal tool for scheduling purposes if technically possible, to make this economically successful project, in my view is practically impossible (I agree with the author of the post Program scheduling classes in high school ). But to solve the problem of comfortable accommodation schedule online with some extra Goodies (with a focus on end users students) I was considered quite feasible. About myself I am 33 years old and I live and work in a small town in Ukraine. Ten years of my life I've worked as a Manager of software company specializing in the production of desktop applications in construction. After the dismissal in June 2011, I bravely decided to go to the entr