Archive for the 'Software Development' Category

Network Programming with TCPIP UNIX

Sockets

  • developed for Berkeley UNIX : recall early Berkeley TCP/IP implementation, first delivered with BSD 2.1
  • central features: central abstraction - the socket - an end-point like an electrical connector, not TCP/IP specific (e.g. UNIX named pipes), uses normal read/write system calls, sockets associated with UNIX file descriptors but some not for normal I/O, some extra system calls
  • sits more comfortably with TCP than with UDP because of byte-stream nature of UNIX I/O
  • special UDP functions e.g., recv(…) – accepts a UDP datagram
  • additional non-socket functions e.g., gethostbyname(…) – domain name server

Establishing a TCP Connection
Initial State

  • TCP is connection based … establishing it is a complex multistage process
  • initially all machines are the same
  • no special ‘server’ machines
  • the difference is all in the software

Passive Open

  • server process does a ‘passive’ open on a port

Object-Oriented Programming with Visual Basic .NET

The .NET Framework
The objects you construct with VB.NET will live out their lives within the .NET Framework, which is a platform used to develop applications. The platform was designed from the ground up by using open standards and protocols like XML, HTTP, and SOAP. It contains a rich standard library that provides services available to any language running under its protection.

The impetus behind its creation was the desire to develop a platform for building, deploying, and running web-based services. In spite of this goal, the framework is ideal for developing all types of applications, regardless of the design. The .NET Framework makes child’s play of some of programming’s most sophisticated concepts, giving you the ability to take advantage of today’s cutting-edge architectures:

  • Distributed computing using open Internet standards and protocols such as HTTP, XML, and SOAP
  • Enterprise services such as object pooling, messaging, security, and transactions

Scalable Network Programming

The fork-and-do-something latency on my notebook on Linux 2.6 is 200
microseconds. That means my notebook can create 5.000 processes per second. Thus my notebook can handle about 13 billion forks per month. My Athlon XP 2000+ desktop can do 10.000 processes per second, or 26 billion per month. Heise Online, the biggest German site, had 118 million page impressions in September.

Scheduling
Why does the fork benchmark include writing to the pipe? Because having many processes not only makes creating more processes more difficult, it also makes choosing which process to run more difficult. The part of the operating system that chooses which process to run next is called the scheduler. A typical workload is having two dozen processes, with one or two of them actually having something to do (they are runnable).

Tutorial for MySQL An Introduction to Java Programming

Using MySQL
By default, the server contains two databases named mysql and test. You can see these two databases displayed in Figure 1.3 using the command show databases. The show databases command displays all available databases in the MySQL database server.

<side remark: create database>
The mysql database contains the tables that store the information about the server and its users. This database is intended for the server administrator to use. For example, the administrator can use it to create users and grant or revoke user privileges. Since you are the owner of the server installed on your system, you have full access to the mysql database. However, you should not create user tables in the mysql database. You can use the test database to store data or create new databases. You can also create a new database using the command create database databasename or drop an existing database using the command drop database databasename.

Native Queries for Persistent Objects A Design White Paper

A final and thorough specification of native queries will only be possible after practical experience. Therefore, this section is speculative. We would like to point out where we see choices and issues with the native query approach and how they might be resolved.

Optimization
Regarding the API alone, native queries are not new. Without optimizations, we have merely provided \the simplest concept possible to run all instances of a class against a method that returns a boolean value”. Such interfaces are well-known: Smalltalk 80 includes methods to select items from a collection based on a predicate [5, 2].

Optimization is the key new component of native queries. Users should be able to write native query expressions and the database should execute them with performance on par with the string-based queries that we described in the introduction to this paper.

The OpenGL ES 2.0 Programming Guide

Porting the Sample Code to the iPhone
The process of porting the sample code from the book to the iPhone highlights some of the unique features of the iPhone. In particular, some of the unique features of the development environment include:

  • The use of Objective C
  • The process of creating an EGL rendering context using the EAGLContext.
  • Detection of device capabilities and creating an OpenGL ES 2.0 context
  • The use of a framebuffer object as the primary rendering surface

Once you have created and setup a rendering context, programming with OpenGL ES 2.0 on the iPhone is identical to any other platform. However, there are some unique aspects of the platform that are worth understanding before jumping into the code.