PDF Build Your Own Redis with C C James Smith download
PDF Build Your Own Redis with C C James Smith download
com
https://textbookfull.com/product/build-your-own-redis-with-
c-c-james-smith/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/build-your-own-redis-with-c-c-james-
smith-2/
textboxfull.com
https://textbookfull.com/product/build-your-own-database-from-scratch-
james-smith/
textboxfull.com
https://textbookfull.com/product/build-your-own-ai-investor-damon-lee/
textboxfull.com
The Complete Build Your Own PC Manual 2020 Black Dog
https://textbookfull.com/product/the-complete-build-your-own-pc-
manual-2020-black-dog/
textboxfull.com
https://textbookfull.com/product/create-computer-games-design-and-
build-your-own-game-patrick-mccabe/
textboxfull.com
https://textbookfull.com/product/sew-your-own-wardrobe-more-
than-80-techniques-1st-edition-alison-smith/
textboxfull.com
https://textbookfull.com/product/diy-lithium-batteries-how-to-build-
your-own-battery-packs-micah-toll/
textboxfull.com
https://textbookfull.com/product/100-weight-loss-bowls-build-your-own-
calorie-controlled-diet-plan-heather-whinney/
textboxfull.com
Build Your Own Redis with
C/C++
James Smith
2023-01-31
Build Your Own Redis with
C/C++
Set
13. 12. The Event Loop and Timers
the TTL
15. 14. The Thread Pool &
Asynchronous Tasks
16. A1: Hints to Exercises
1. Title Page
2. Cover
3. Table of Contents
Build Your Own Redis with
C/C++
01. Introduction
A couple of points:
https://build-your-
own.org/redis/src.tgz
https://build-your-own.org
02. Introduction to Sockets
fd = socket()
bind(fd, address)
listen(fd)
while True:
conn_fd = accept(fd)
do_something_with(conn_fd)
close(conn_fd)
fd = socket()
connect(fd, address)
do_something_with(fd)
close(fd)
int val = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val,
sizeof(val));
// listen
rv = listen(fd, SOMAXCONN);
if (rv) {
die("listen()");
}
while (true) {
// accept
struct sockaddr_in client_addr = {};
socklen_t socklen = sizeof(client_addr);
int connfd = accept(fd, (struct sockaddr
*)&client_addr, &socklen);
if (connfd < 0) {
continue; // error
}
do_something(connfd);
close(connfd);
}
$ ./client
server says: world
03_client.cpp
03_server.cpp
04. Protocol Parsing
+-----+------+-----+------+--------
| len | msg1 | len | msg2 | more...
+-----+------+-----+------+--------
The protocol consists of 2 parts: a 4-
byte little-endian integer indicating
the length of the following request,
and a variable length request.
while (true) {
// accept
struct sockaddr_in client_addr = {};
socklen_t socklen = sizeof(client_addr);
int connfd = accept(fd, (struct sockaddr
*)&client_addr, &socklen);
if (connfd < 0) {
continue; // error
}
A woman ... [says Martin Hume] whose saintly devotion to her Faith blinded her
eyes to human things, and whose anxiety to please the God of Mercy made her
merciless to those she thought His enemies.
The reign of Ferdinand and Isabel [says Mariéjol] may be summarized in a few
words. They had enjoyed great power and they had employed it to the utmost
advantage both for themselves and the Spanish nation. Royal authority had been in
their hands an instrument of prosperity. Influence abroad,—peace at home,—these
were the first fruits of the absolute monarchy.
A. Contemporary.
Bernaldez (Andrés) (Curate of Los Palacios), Historia de Los
Reyes.
Carvajal (Galindez), Anales Breves.
Castillo (Enriquez del), Crónica del Rey Enrique IV.
Martyr (Peter), Opus Epistolarum.
Pulgar (Hernando de), Crónica de Los Reyes Católicos.
—— Claros Varones.
Siculo (Lucio Marineo), Sumario de la ... Vida ... de Los
Católicos Reyes.
Zurita, Anales de Aragon, vols. v. and vi.
B. Later Authorities.
Altamira, Historia de España, vol. ii.
Bergenroth, Calendar of State Papers, vol. i.
Butler Clarke, “The Catholic Kings,” (Cambridge Modern
History, vol. i.).
—— Spanish Literature.
Clemencin, Elogio de La Reina Isabel.
Flores, Reinas Católicas.
Hume (Martin), Queens of Old Spain.
Irving (Washington), Conquest of Granada.
—— Life of Christopher Columbus.
Lafuente, Historia de España, vols. vi. and vii.
Lea, History of the Inquisition in Spain. 4 v.
Mariéjol, L’Espagne sous Ferdinand et Isabelle.
Prescott, History of the Reign of Ferdinand and Isabella.
Sabatini (Rafael), Torquemada and the Spanish Inquisition.
Thacher (John Boyd), Christopher Columbus. 3 v.
Ticknor, History of Spanish Literature, v. i.
Young (Filson), Life of Christopher Columbus. 2 v.
Some Additional Authorities Consulted.
Volumes xiv., xxxix., lxxxviii., and others of the Documentos
Inéditos.
Volume lxii. and others of the Boletin de La Real Academia.
Amador de los Rios, Historia de Madrid.
Armstrong (E.), Introduction to Spain, Her Greatness and
Decay, by Martin Hume.
Berwick and Alba, Correspondencia de Fuensalida.
Colmenares, Historia de Segovia.
Diary of Roger Machado.
Fitzmaurice-Kelly, History of Spanish Literature.
Mariéjol, Pierre Martyr d’Anghera: Sa vie et ses œuvres.
Memoirs of Philip de Commines.
INDEX
A
Abraham “El Gerbi,” 211, 213
Aguilar, Alonso de, 177, 180, 182, 281–3
Ajarquia, 176, 181
Alcabala, 384, 394, 395
Alcalá de Henares, University of, 402
Alexander VI. (Rodrigo Borgia), 85, 236, 239, 248, 261, 306, 353,
354, 360, 363
Alfonso V. of Aragon, 24, 25, 35, 115–119, 350
Alfonso of Castile, brother of Isabel, 22, 35, 46, 52, 56, 60, 64, 65
Alfonso II. of Naples, 350, 353, 354, 356
Alfonso V. of Portugal, 52, 70, 96, et seq.; 107, et seq.
Alfonso, son of John II. of Portugal, 223, 337
Alfonso, Archbishop of Saragossa, 244, 330
Alhama, 165, 170
Aliator, 176, 181, 182
Aljubarrota, Battle of, 30
Almeria, 161, 204, 216, 220, 280
Alpujarras, The, 278, 280
Alvaro, Don, of Portugal, 212
Amadis de Gaula, 414
Anne of Beaujeu, 340
Anne of Brittany, 340
Aranda, Council of, 239
Aranda, Pedro de, 261
Architecture, Castilian, 419–420
Arras, Cardinal of, 73, 81
Arthur, Prince of Wales, 373, 374
Atella, capitulation of, 362
“Audiences” in Seville, 136
Auto-de-Fe, 256
Ayora, Gonsalvo de, 192
Azaator, Zegri, 274
B
Baeza, 216, 217, 219, 220, 223, 280
Bahamas, discovery of, 304
Barbosa, Arias, 406
Barcelona, 38, 39, 40, 50, 75, 305, 328, 352
Bernaldez, Andres, Curate of Los Palacios, 168, 263, 412
Berri, Charles, Duke of (later of Guienne), 72, 81, 83
Biscay, Province of, 100, 101, 112, 117
Blanche of Navarre, 26
Blanche, dau. of John II. of Aragon, 27, 28, 43, 44
Boabdil, 172, 181, et seq.; 198, 203, et seq.; 208, 221–223, 227, et seq.
Bobadilla, Beatriz de (Marchioness of Moya), 62, 74, 84, 85, 212, 213,
298
Bobadilla, Francisco de, 314
Borgia, Cæsar, 364. (See also Alexander VI.)
Burgos, 54, 55, 60, 103, 106;
Bishop of, 72, 74
C
Cabrera, Andres de (later Marquis of Moya), 83, 86, 112, 114, 298
Cadiz, Marquis of, 136, 139, 140, 165 et seq.; 175, 177, 180, 183, 200,
201, 209, 212, 216
Cancionero General, 410
Carcel de Amor, 415
Cardenas, Alonso de, 153, 176;
Gutierre de, 88, 217, 229
Carrillo, Archbishop, 58, 59, 60, 63, 64, 68, 76, 78, 79, 80, 85, 89,
90, 94, 96, 100, 105, 108, 109, 111, 232, 239, 240
Castillo, Enriquez del, 87, 411
Catherine of Aragon, 334, 372, 374
Celestina, 416
Charles of Austria, son of Archduke Philip, 378, 384, 390, 396, 408
Charles, The Bold, 116, 117
Charles VIII. of France, 186, 340, 347, 348, 351, et seq.; 363
Charles of Viana, 26, 36, et seq.
Church, Castilian, 13, et seq.; 104, 231, et seq.; 249, 250
Cid Haya, 216, 220, 223
Cifuentes, Count of, 177, 180
Cisneros, Ximenes de, 242, et seq.; 273, et seq.; 402, 403
Claude, dau. of Louis XII., 378
Columbus, Bartholomew, 289, 315
Columbus, Christopher, early life, 286;
nautical theories, 291;
appears at Spanish Court, 295;
character, 294, 298, 300, 302, 314;
appearance, 295;
prepares to leave Spain, 299;
first voyage, 303, 305;
reception at Barcelona, 305;
second voyage, 307;
views on slavery, 310;
third voyage, 314;
arrest, 315;
fourth voyage, 316;
devotion to Queen Isabel, 298, 313, 317;
death, 317
Columbus, Diego, 294, 299, 317
Commines, Philip de, 48
Conversos, The, 251, 252, 253
Coplas de Manrique, 408
Coplas de Mingo Revulgo, 417
Cordova, Gonsalvo de, 189, 206, 280, 361, 367, 371
Cortes, the Castilian, 18
Cota, Rodrigo, 417
Cueva, Beltran de La (Count of Ledesma, Duke of Alburquerque), 32,
33, 45, 48, 51, 52, 54, 57, 62, 64, 89, 151
D
D’Aubigny, Stuart, 361
Davila, Juan Arias, 261
De Puebla, 374
Diaz, Bartholomew, 289
E
Edict of Grace, 255
Egypt, Sultan of, 219, 278
Eleanor, dau. of John II. of Aragon, 43, 44, 359
Emmanuel of Portugal, 273, 338, 343, 372
Enriquez, Fadrique, Admiral of Castile, 36, 58, 59, 60, 74
Enzina, Juan del, 417, 418
Escalas, Conde de, 205, 206, 207
Española, 305, 309, 313, 314, 316
Estella, 49, 51
Estepar, El Feri Ben, 281, 282
F
Fadrique (the younger), 155
Federigo of Naples, 355, 364, 370
Ferdinand of Aragon (The Catholic) character, 2, 69, 174, 210, 324,
325, 330, 332, 370, 371, 387, 391;
appearance, 89;
diplomacy, 346, 352, 358, 359, 364, 372, 375;
birth, 26;
becomes heir to throne of Aragon, 40;
alliance with Isabel, 35, 69, 77, et seq.;
meeting with Isabel, 208;
reconciliation with Henry IV., 86;
becomes King of Aragon, 118;
attempted assassination of, 328;
military measures, 102, 103, 166, et seq.; 112, 168, 175, 191, 196,
201, 216, 219, 280, 379;
attitude to Jews, 264, 265, 271;
to Mudejares, 283;
to the Inquisition, 249, 255, 258;
to Roman See, 235, 239, 254;
to his children, 335;
to Columbus, 296, 297, 313;
foreign policy of, 335;
receives submission of Boabdil, 229;
second marriage, 388;
regent of Castile, 390;
estimate of his work, 422
Ferdinand, son of Archduke Philip, 379
Ferrante I. of Naples, 36, 349, 350, 353, 356
Ferrante II., 354, 356, 361, 364, 369
Fez, King of, 221, 229
Florence, 349, 350, 353
Foix, Catherine de, 339
Foix, Gaston de, 43, 75
Foix, Gaston de (the younger), 43
Foix, Germaine de, 388, 390
Fonseca, Alonso de, 30, 240
Fornovo, battle of, 361
Francis Phœbus of Navarre, 111, 339
Fuenterrabia, meeting of, 48
G
Galicia, settlement of, 133
Galindo, Beatriz de, 332, 407
Genoa, 25
Geraldino, Alessandro, 299, 333
Giron, Pedro, Master of Calatrava, 36, 60, 62, 63
Granada, City of, 215, 224, 227, et seq.;
Kingdom of, 160, 188;
partition Treaty of, 365, 366
Guadix, 173, 206, 216, 220, 221, 223, 224, 280
Guejar, 280
Guiomar, Doña, 31, 233
Guipuzcoa, 100, 106, 112, 117
Guzman, Ramir Nuñez de, 155, 156
H
Hamet, “El Zegri,” 199, 200, 201, 202, 206, 210, 211, 213, 214
Haro, Count of, 101, 129
Henry IV. of Castile (Prince of Asturias), 23, 27, 28;
(King), 24, 36, 39, 44, 54, 55, 56, 70, 71, 80, et seq.; 158, 160, 253
Henry VII. of England, 373
Henry, “The Navigator,” of Portugal, 289
I
Inquisition in Castile, 249, 253–261
Isabel of Castile, character, 1, 4, 5, 131, 233, 319, 324, 327, 328, 336;
love of her Faith, 325;
attitude to her confessors, 241, 242, 243, 326, 327, 329;
love of learning, 332, 333, 400 et seq.;
devotion to Ferdinand, 329;
her magnificence, 321, 323, 399;
her justice, 130, 135, 136, et seq.; 155;
birth, 22;
childhood, 34, 46, 52, 67;
suggested alliances, 35, 39, 53, 62, 68, 70, 72, 73;
marriage with Ferdinand, 69, 74, 76, 77, et seq.;
joins her brother Alfonso, 65;
reconciliation with Henry IV., 84, 85, 86;
accession, 88, 91, 92;
appeals to Archbishop Carrillo, 100;
celebrates battle of Toro, 109;
quells riot in Segovia, 112, et seq.;
visits Seville, 115, 136;
disputes with Ferdinand, 186;
legislation and reforms of, 147, 150, 153, 392, et seq.;
military measures of, 106, 168, 187, et seq.; 192, 194, et seq.; 218;
visits camps, 207, 211, 226;
entry into Granada, 230;
attitude to the Castilian Church, 234, 235, 236, 247, 248;
to the Inquisition, 249, 254, 255, 258;
to the Jews, 264, 265, 271;
to the Mudejares, 273, 279, 280, 284;
to the Roman See, 235–239, 254;
to Columbus, 285, 295, 297, 298, 303, 315;
to slavery, 312–313;
to her children, 331, 334, 377, 380, 381;
her will, 383;
her death, 384;
survey of her reign, 421.
Isabel, mother of Isabel of Castile, 33, 34
Isabel, dau. of Isabel of Castile, 82, 207, 223, 337, 338, 343, 344, 345
Isabella, the city, 313
Ismail, Sultan, 162
J
James IV. of Scotland, 374, 375
Jews, 6, 250, 252, 263, et seq.
Joanna, “La Beltraneja,” 45, 46, 81–83, 93, 94, 99, 119, 120, 336
Joanna of Portugal, wife of Henry IV., 30, 31, 32, 33, 44, 45, 52
Joanna of Aragon, dau. of Isabel of Castile, 334, 341, 342, 375, et
seq.; 390
Joanna (Queen of Aragon), 26, 27, 40, 41, 42, 75
John II. of Aragon, 24, 25, 26, 28, 36, 40, 101, 364
John II. of Castile, 22, 23, 27
John II. of Portugal, 107, 108, 118, 289, 292, 307, 338
John, son of Ferdinand and Isabel, 115, 216, 223, 331, 332, 339, 344
L
Lebrija, Antonio de, 406
Lerin, Count of, 280
Lisbon, Treaty of, 118, 336
Literature, Castilian, 407, et seq.
Loja, 175, 176, 201, 205
Lopera, battle of, 200
Louis XI. of France, 42, 43, 47, et seq.; 81, 100, 106, 110, 115, 116, 117,
118, 186, 339, 346, 347
Louis XII. of France (Duke of Orleans), 355, 357;
(King), 363, 365, 388, 389
Lucena, 181
Ludovico, “Il Moro,” 348, et seq.; 364
M
Machado, Roger, 321, 323, 373
Madeleine, sister of Louis XI., 43, 339
Madrigal, Cortes of, 124
Malaga, 173, 204, 208, 209, et seq.
Margaret of Austria, 340–344
Maria, dau. of Ferdinand and Isabel, 338, 372
Marineo, Lucio, 405
Marriage-settlement of Ferdinand and Isabel, 79
Martyr, Peter, 195, 219, 385, 404–405
Mary of Burgundy, 83, 117
Maximilian, King of the Romans, 340, 358
Medina-Celi, Duke of, 295
Medina del Campo, Concord of, 56, 253;
Junta of, 57
Medina-Sidonia, Duke of, 136, 140, 168, 189, 190
Mendoza, family of, 52, 76, 82, 84, 89;
Diego Hurtado de, 246;
Pedro Gonsalez de (Bishop of Calahorra), 62;
(Bishop of Siguenza), 67;
(Cardinal of Spain), 84, 89, 90, 108, 150, 154, 187, 229, 232, 233,
234, 240, 243, 244, 255, 299, 404
Merlo, Diego de, 165, 169
Miguel, grandson of Ferdinand, 345
Military Orders, 10, et seq., 152, 154
Moclin, 207
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com