Mikio Hirabayashi

Total Page:16

File Type:pdf, Size:1020Kb

Mikio Hirabayashi IntroductionIntroduction toto TokyoTokyo ProductsProducts Mikio Hirabayashi <[email protected]> TokyoTokyo ProductsProducts •• TokyoTokyo CabinetCabinet – database library Tokyo Tyrant applications •• Tokyo Tyrant Prome database server nade – custom storage Tyrant Dystopia •• TokyoTokyo DystopiaDystopia Cabinet – full-text search engine file system •• TokyoTokyo PromenadePromenade – content management system •• openopen sourcesource – released under LGPL •• powerful,powerful, portable,portable, practicalpractical – written in the standard C, optimized to POSIX TokyoTokyo CabinetCabinet -- databasedatabase librarylibrary -- FeaturesFeatures •• modernmodern implementationimplementation ofof DBMDBM – key/value database • e.g.) DBM, NDBM, GDBM, TDB, CDB, Berkeley DB – simple library = process embedded – Successor of QDBM • C99 and POSIX compatible, using Pthread, mmap, etc... • Win32 porting was abolished (inherited to KC) •• highhigh performanceperformance – insert: 0.4 sec/1M records (2,500,000 qps) – search: 0.33 sec/1M records (3,000,000 qps) •• highhigh concurrencyconcurrency – multi-thread safe – read/write locking by records •• highhigh scalabilityscalability – hash and B+tree structure = O(1) and O(log N) – no actual limit size of a database file (to 8 exabytes) •• transactiontransaction – write ahead logging and shadow paging – ACID properties •• variousvarious APIsAPIs – on-memory list/hash/tree – file hash/B+tree/array/table •• scriptscript languagelanguage bindingsbindings – Perl, Ruby, Java, Lua, Python, PHP, Haskell, Erlang, etc... TCHDB:TCHDB: HashHash DatabaseDatabase •• staticstatic hashinghashing bucket array – O(1) time complexity •• separateseparate chainingchaining key value – binary search tree key value – balances by the second hash key value •• freefree blockblock poolpool key value – best fit allocation key value – dynamic defragmentation key value •• combinescombines mmapmmap andand key value pwrite/preadpwrite/pread key value key value – saves calling system calls key value •• compressioncompression key value – deflate(gzip)/bzip2/custom TCBDB:TCBDB: B+B+ TreeTree DatabaseDatabase •• B+B+ treetree key value – O(log N) time complexity B tree index key value key value •• pagepage cachingcaching key value – LRU removing – speculative search key value key value •• standsstands onon hashhash DBDB key value – records pages in hash DB key value – succeeds time and space key value efficiency key value •• customcustom comparisoncomparison key value functionfunction key value – prefix/range matching key value key value •• cursorcursor key value – jump/next/prev key value TCFDB:TCFDB: FixedFixed --lengthlength DatabaseDatabase •• arrayarray ofof fixedfixed -- lengthlength elementselements array – O(1) time complexity value value value value – natural number keys value value value value – addresses records by value value value value multiple of key value value value value •• mostmost effectiveeffective value value value value value value value value – bulk load by mmap value value value value no key storage per – value value value value record value value value value extremely fast and – value value value value concurrent TCTDB:TCTDB: TableTable DatabaseDatabase •• columncolumn basedbased – the primary key and named columns – stands on hash DB bucket array •• flexibleflexible structurestructure – no data scheme, no data type primary key name value name value name value – various structure for each record primary key name value name value name value •• queryquery mechanismmechanism primary key name value name value name value – various operators matching column values primary key name value name value name value – lexical/decimal orders by column values primary key name value name value name value •• columncolumn indexesindexes – implemented with B+ tree primary key name value name value name value – typed as string/number – inverted index of token/q-gram column index – query optimizer OnOn --memorymemory StructuresStructures •• TCXSTR:TCXSTR: extensibleextensible stringstring – concatenation, formatted allocation •• TCLIST:TCLIST: arrayarray listlist (( dequeuedequeue )) – random access by index – push/pop, unshift/shift, insert/remove •• TCMAP:TCMAP: mapmap ofof hashhash tabletable – insert/remove/search – iterator by order of insertion •• TCTREE:TCTREE: mapmap ofof orderedordered treetree – insert/remove/search – iterator by order of comparison function OtherOther MechanismsMechanisms •• abstractabstract databasedatabase – common interface of 6 schema • on-memory hash, on-memory tree • file hash, file B+tree, file array, file table – decides the concrete scheme in runtime •• remoteremote databasedatabase – network interface of the abstract database – yes, it's Tokyo Tyrant! •• miscellaneousmiscellaneous utilitiesutilities – string processing, filesystem operation – memory pool, encoding/decoding ExampleExample CodeCode #include < tcutil.h > #include < tchdb.h > #include <stdlib.h> #include <stdbool.h> #include <stdint.h> int main(int argc, char **argv){ TCHDB *hdb; int ecode; char *key, *value; /* create the object */ hdb = tchdbnew (); /* open the database */ if(! tchdbopen (hdb, "casket.hdb", HDBOWRITER | HDBOCREAT)){ ecode = tchdbecode(hdb); /* traverse records */ fprintf(stderr, "open error: %s¥n", tchdberrmsg(ecode)); tchdbiterinit (hdb); } while((key = tchdbiternext2(hdb)) != NULL){ value = tchdbget2 (hdb, key); /* store records */ if(value){ if(! tchdbput2 (hdb, "foo", "hop") || printf("%s:%s¥n", key, value); !tchdbput2 (hdb, "bar", "step") || free(value); !tchdbput2 (hdb, "baz", "jump")){ } ecode = tchdbecode(hdb); free(key); fprintf(stderr, "put error: %s¥n", tchdberrmsg(ecode)); } } /* close the database */ /* retrieve records */ if(! tchdbclose (hdb)){ value = tchdbget2 (hdb, "foo"); ecode = tchdbecode(hdb); if(value){ fprintf(stderr, "close error: %s¥n", tchdberrmsg(ecode)); printf("%s¥n", value); } free(value); } else { /* delete the object */ ecode = tchdbecode(hdb); tchdbdel (hdb); fprintf(stderr, "get error: %s¥n", tchdberrmsg(ecode)); } return 0; } TokyoTokyo TyrantTyrant -- databasedatabase serverserver -- FeaturesFeatures •• networknetwork serverserver ofof TokyoTokyo CabinetCabinet – client/server model – multi applications can access one database – effective binary protocol •• compatiblecompatible protocolsprotocols – supports memcached protocol and HTTP – available from most popular languages •• highhigh concurrency/performanceconcurrency/performance – resolves "c10k" with epoll/kqueue/eventports – 17.2 sec/1M queries (58,000 qps) •• highhigh availabilityavailability – hot backup and update log – asynchronous replication between servers •• variousvarious databasedatabase schemaschema – using the abstract database API of Tokyo Cabinet •• effectiveeffective operationsoperations – no-reply updating, multi-record retrieval – atomic increment •• LuaLua extensionextension – defines arbitrary database operations – atomic operation by record locking •• purepure scriptscript languagelanguage interfacesinterfaces – Perl, Ruby, Java, Python, PHP, Erlang, etc... AsynchronousAsynchronous ReplicationReplication master and slaves dual master (load balancing) (fail over) write query master server client client database query if the master is dead query read query standby master update log with load balancing active master database database replicate the difference slave server slave server update log update log replicate the difference database database update log update log ThreadThread PoolPool ModelModel epoll/kqueue listen accept the client connection if the event is about the listener queue first of all, the listening socket is enqueued into the epoll queue accept epoll_ctl(add) queue back if keep-alive epoll_wait task manager epoll_ctl(del) queue enqueue move the readable client socket from the epoll queue to the task queue deque worker thread worker thread do each task worker thread LuaLua ExtentionExtention •• definesdefines DBDB operationsoperations asas LuaLua functionsfunctions – clients send the function name and record data – the server returns the return value of the function •• optionsoptions aboutabout atomicityatomicity – no locking / record locking / global locking front end request back end - function name - key data Tokyo Tyrant - value data Clients Tokyo Cabinet Lua processor response - result data script database user-defined operations case:case: TimestampTimestamp DBDB atat mixi.jpmixi.jp 20 million records •• 20 million records mod_perl – each record size is 20 bytes home.pl update •• moremore thanthan 10,00010,000 TT (active) show_friend.pl updatesupdates perper sec.sec. database view_diary.pl – keeps 10,000 connections search.pl •• dualdual mastermaster replication other pages replicationreplication TT (standby) each server is only one – database •• memcachedmemcached list_friend.pl fetch compatiblecompatible protocolprotocol list_bookmark.pl – reuses existing Perl clients case:case: CacheCache forfor BigBig StoragesStorages • worksworks asas proxyproxy • clients 1. inserts to the storage – mediates insert/search 2. inserts to the cache – write through, read through •• LuaLua extensionextension Tokyo Tyrant MySQL/hBase – atomic operation by record atomic insert locking database Lua – uses LuaSocket to access the storage database • properproper DBDB schemescheme atomic search • Lua – TCMDB: for generic cache database – TCNDB: for biased access TCHDB: for large records cache – database such as image 1. retrieves from the cache if found, return – TCFDB: for small records 2.
Recommended publications
  • Linux from Scratch 版本 R11.0-36-中⽂翻译版 发布于 2021 年 9 ⽉ 21 ⽇
    Linux From Scratch 版本 r11.0-36-中⽂翻译版 发布于 2021 年 9 ⽉ 21 ⽇ 由 Gerard Beekmans 原著 总编辑:Bruce Dubbs Linux From Scratch: 版本 r11.0-36-中⽂翻译版 : 发布于 2021 年 9 ⽉ 21 ⽇ 由 由 Gerard Beekmans 原著和总编辑:Bruce Dubbs 版权所有 © 1999-2021 Gerard Beekmans 版权所有 © 1999-2021, Gerard Beekmans 保留所有权利。 本书依照 Creative Commons License 许可证发布。 从本书中提取的计算机命令依照 MIT License 许可证发布。 Linux® 是Linus Torvalds 的注册商标。 Linux From Scratch - 版本 r11.0-36-中⽂翻译版 ⽬录 序⾔ .................................................................................................................................... viii i. 前⾔ ............................................................................................................................ viii ii. 本书⾯向的读者 ............................................................................................................ viii iii. LFS 的⽬标架构 ............................................................................................................ ix iv. 阅读本书需要的背景知识 ................................................................................................. ix v. LFS 和标准 ..................................................................................................................... x vi. 本书选择软件包的逻辑 .................................................................................................... xi vii. 排版约定 .................................................................................................................... xvi viii. 本书结构 .................................................................................................................
    [Show full text]
  • Basic Performance Measurements of the Intel Optane DC Persistent Memory Module
    Basic Performance Measurements of the Intel Optane DC Persistent Memory Module Or: It’s Finally Here! How Fast is it? Joseph Izraelevitz Jian Yang Lu Zhang Juno Kim Xiao Liu Amirsaman Memaripour Yun Joon Soh Zixuan Wang Yi Xu Subramanya R. Dulloor Jishen Zhao Steven Swanson* Computer Science & Engineering University of California, San Diego arXiv:1903.05714v3 [cs.DC] 9 Aug 2019 *Correspondence should be directed to [email protected]. Copyright © 2019 the authors. 1 2019-08-09 7041bc9 Abstract After nearly a decade of anticipation, scalable nonvolatile memory DIMMs are finally commercially available with the release of the Intel® Optane™ DC Persistent Memory Module (or just “Optane DC PMM”). This new nonvolatile DIMM supports byte-granularity accesses with access times on the order of DRAM, while also providing data storage that survives power outages. This work comprises the first in-depth, scholarly, performance review of Intel’s Optane DC PMM, exploring its capabilities as a main memory device, and as persistent, byte-addressable memory exposed to user-space applications. For the past several months, our group has had access to machines with Optane DC memory and has investigated the Optane DC PMM’s performance characteristics. This report details the chip’s performance under a number of modes and scenarios, and across a wide variety of both micro- and macro-scale benchmarks. In total, this report represents approximately 330 hours of machine time. Optane DC memory occupies a tier in-between SSDs and DRAM. It has higher latency (346 ns) than DRAM but lower latency than an SSD. Unlike DRAM, its bandwidth is asymmetric with respect to access type: for a single Optane DC PMM, its max read bandwidth is 6.6 GB/s, whereas its max write bandwidth is 2.3 GB/s.
    [Show full text]
  • Object Storage on Berkeley DB1
    Object Storage on Berkeley DB1 Casey Marshall University of California, Santa Cruz CMPS 229: Storage Systems Abstract took one person less than three months to write a fairly stable and efficient object store, the benefits We have implemented an object storage system, of using an existing, stable system are quite clear. intended to simulate the operation of an Object We also believe that robust, simple, and scalable Storage Device (OSD), on Berkeley DB, a simple storage systems built on top of database systems database library distributed by Oracle Corporation such as Berkeley DB are feasible. (formerly Sleepycat Software) [1]. This object storage layer is used in the Ceph [2] distributed file system as an alternative to the EBOFS object 2 Implementation storage system. Our results indicate that object The implementation of our object store is as an storage systems built on Berkeley DB provide implementation of the C++ class ObjectStore, good performance for many small objects, and that Ceph uses internally for its object storage. competitive performance for large objects; inte- The ObjectStore interface provides a simple grating this system into Ceph has revealed a few set of commands that emulate the command set of performance problems. the T10 object storage specification [3]. These commands fall into the following logical groups: 1 Introduction 1. Object storage commands. These include ba- Ceph is an advanced, distributed, scalable file sys- sic operations for reading, writing, and query- tem being developed at UCSC. Ceph uses smart ing objects. Objects are plain byte sequences, object storage devices managed by an object dis- and are referenced by 128-bit object identifi- tribution and lookup layer called RADOS (reli- ers.
    [Show full text]
  • LFS-BOOK.Pdf
    Linux From Scratch Версия 7.3 Автор Gerard Beekmans Редакторы Matthew Burgess и Bruce Dubbs Перевод Иван Лабутин Linux From Scratch: Версия 7.3 by Автор Gerard Beekmans, Редакторы Matthew Burgess и Bruce Dubbs, Перевод Иван Лабутин Copyright © 1999-2013 Gerard Beekmans Copyright © 1999-2013, Gerard Beekmans Все права защищены. Эта книга выпущена под лицензией Creative Commons License. Команды для компьютера могут быть извлечены из книги под лицензией MIT License. Linux® зарегистрированная торговая марка Linus Torvalds. Linux From Scratch - Версия 7.3 Содержание Пролог ......................................................................................................................... viii i. Предисловие ........................................................................................................ viii ii. Кому адресована эта книга? ............................................................................... ix iii. Целевые архитектуры LFS .................................................................................. x iv. LFS и стандарты .................................................................................................. x v. Пояснения к выбранным пакетам ..................................................................... xii vi. Необходимые знания ....................................................................................... xvii vii. Требования к хост-системе ........................................................................... xviii viii. Соглашения, используемые в книге .............................................................
    [Show full text]
  • Model Based Fuzzing of the WPA3 Dragonfly
    Humboldt-Universität zu Berlin Mathematisch-Naturwissenschaftliche Fakultät Institut für Informatik Model based fuzzing of the WPA3 Dragonfly handshake Masterarbeit zur Erlangung des akademischen Grades Master of Science (M. Sc.) eingereicht von: Nikolai Philipp Tschacher geboren am: 1. Mai 1991 geboren in: Tübingen Gutachter/innen: Prof. Dr. Jens-Peter Redlich Prof. Dr. Björn Scheuermann eingereicht am: verteidigt am: Contents 1 Introduction1 1.1 Motivation..................................1 1.2 Objectives..................................2 1.3 WPA3....................................3 1.4 Fuzzing Methodology............................5 1.4.1 Fuzzing Strategy.......................... 10 1.5 Related Work................................. 11 2 Cryptographic Fundamentals 14 2.1 Public-key Cryptosystems based on the Discrete Logarithm Problem. 14 2.2 Elliptic Curve Cryptosystems....................... 20 3 The SAE Handshake 23 3.1 SAE is a PAKE Scheme.......................... 23 3.2 Dragonfly.................................. 24 3.3 Deriving the Password Element...................... 28 3.4 Commit Exchange............................. 28 3.5 Confirm Exchange............................. 30 3.6 Security................................... 30 3.7 Practical Attacks against SAE....................... 31 4 Fuzzing Environment 36 4.1 Kernel 802.11 Architecture......................... 37 4.2 Using Virtualization and Emulation Software............... 37 4.3 Virtual Wi-Fi radios with mac80211_hwsim ............... 42 4.3.1 WPA3-SAE with mac80211_hwsim
    [Show full text]
  • Oracle® Exadata Database Machine Error Message Reference Guide
    Oracle® Exadata Database Machine Error Message Reference Guide 21.2 F29253-03 June 2021 Oracle Exadata Database Machine Error Message Reference Guide, 21.2 F29253-03 Copyright © 2019, 2021, Oracle and/or its affiliates. Primary Author: Peter Fusek This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the
    [Show full text]
  • LFS-BOOK-10.1.Pdf
    Linux From Scratch Version 10.1 Published March 1st, 2021 Created by Gerard Beekmans Managing Editor: Bruce Dubbs Linux From Scratch: Version 10.1 : Published March 1st, 2021 by Created by Gerard Beekmans and Managing Editor: Bruce Dubbs Copyright © 1999-2021 Gerard Beekmans Copyright © 1999-2021, Gerard Beekmans All rights reserved. This book is licensed under a Creative Commons License. Computer instructions may be extracted from the book under the MIT License. Linux® is a registered trademark of Linus Torvalds. Linux From Scratch - Version 10.1 Table of Contents Preface ......................................................................................................................................................................... viii i. Foreword ............................................................................................................................................................ viii ii. Audience ........................................................................................................................................................... viii iii. LFS Target Architectures .................................................................................................................................. ix iv. Prerequisites ........................................................................................................................................................ x v. LFS and Standards .............................................................................................................................................
    [Show full text]
  • Building Key-Value Stores Using Fragmented Log-Structured Merge
    PebblesDB: Building Key-Value Stores using Fragmented Log-Structured Merge Trees Pandian Raju Rohan Kadekodi University of Texas at Austin University of Texas at Austin Vijay Chidambaram Ittai Abraham University of Texas at Austin and VMware Research VMware Research ABSTRACT Key-value stores such as LevelDB and RocksDB offer excel- lent write throughput, but suffer high write amplification. The write amplification problem is due to the Log-Structured Merge Trees data structure that underlies these key-value stores. To remedy this problem, this paper presents a novel data structure that is inspired by Skip Lists, termed Frag- mented Log-Structured Merge Trees (FLSM). FLSM intro- Figure 1: Write Amplification. The figure shows the duces the notion of guards to organize logs, and avoids total write IO (in GB) for different key-value stores rewriting data in the same level. We build PebblesDB, a high- when 500 million key-value pairs (totaling 45 GB) are performance key-value store, by modifying HyperLevelDB inserted or updated. The write amplification is indi- to use the FLSM data structure. We evaluate PebblesDB us- cated in parenthesis. ing micro-benchmarks and show that for write-intensive ACM Reference Format: workloads, PebblesDB reduces write amplification by 2.4-3× Pandian Raju, Rohan Kadekodi, Vijay Chidambaram, and Ittai Abra- compared to RocksDB, while increasing write throughput by ham. 2017. PebblesDB: Building Key-Value Stores using Fragmented 6.7×. We modify two widely-used NoSQL stores, MongoDB Log-Structured Merge Trees. In Proceedings of ACM Symposium and HyperDex, to use PebblesDB as their underlying storage on Operating Systems Principles (SOSP’17).
    [Show full text]
  • Ait 513 Advanced Programming in Bioinformatics 3 (1+2)
    AIT 513 ADVANCED PROGRAMMING IN BIOINFORMATICS 3 (1+2) Objective: Looking to volume and complexity of biological data, advanced programming skills are required for researchers in order to get the most out of their data analyses. This course will provide the expanded programming skills necessary to develop software that can exploit the complex information landscape of bioinformatics. Theory: UNIT I Introduction to Molecular Biology, Central Dogma, Sequencing technologies, etc., Introduction to different programming languages used in biological sciences,Perl , Python, R, Ruby etc. UNIT II Unix/Linux shell programming, Perl: Introduction, Scalar Data, Arrays and list Data, Control Structures harhes, Regular Expressions; Suboutines, File handles and file tests; Function;formats, Directory Access, Process management, Other data Transfomation; Finding a sub string, Extracting and replacing a sub string. Bio-Perl: Introduction, Architecture, Uses of bioperl ,: Introduction to python/ Bio-Python UNIT III R: open-source language and environment for statistical computing and graphics. UNIT IV Bioconductor - open-source software for the analysis of biomedical andgenomic data, mainly R packages.Analysis of microarray data, Next Generation Sequencing (NGS) data etc. UNIT V Parallel programming/ Computing – MapReduce , Interfaces with other languages: C, Java, Perl, Python, XML,etc. – Omega Project (www.omegahat.org) ,Formatting Data: sorting, Trasliteration Database manipulation:DBM Databases and DBM Harshes, Opening and closing DBM Harshes, Fixed-Length Random –Access Databases, Variable-Length (Text) Databases, Win32 Databases Interfaces. Practical: 1. Unix/Linux shell scripting 2. Active perf- 3. R, Map reduce Reference Books: 1. The R Project for Statistical Computing [http://www.R-project.org/]. 2. Perl.org [http://www.perl.org/].
    [Show full text]
  • An Overview of Attacks and Defences on Intelligent Connected Vehicles
    1 An Overview of Attacks and Defences on Intelligent Connected Vehicles Mahdi Dibaei, Xi Zheng, Member, IEEE, Kun Jiang, Member, IEEE, Sasa Maric, Robert Abbas, Member, IEEE, Shigang Liu, Member, IEEE, Yuexin Zhang, Member, IEEE, Yao Deng, Sheng Wen, Member, IEEE, Jun Zhang, Member, IEEE, Yang Xiang, Senior Member, IEEE, and Shui Yu, Senior Member, IEEE, Abstract—Cyber security is one of the most significant chal- policies are not followed by the industry standards for in- lenges in connected vehicular systems and connected vehicles vehicle and vehicular communications because of hardware are prone to different cybersecurity attacks that endanger pas- constraints and differences in network configuration [1], [2]. sengers’ safety. Cyber security in intelligent connected vehicles is composed of in-vehicle security and security of inter-vehicle Previous reports have illustrated highly practical wireless communications. Security of Electronic Control Units (ECUs) and attacks on core functions of vehicles and disengaging the the Control Area Network (CAN) bus are the most significant engine and the brakes [3], [4], [5], [6]. For instance, by parts of in-vehicle security. Besides, with the development of 4G hijacking the steering and brakes of a Ford Escape and a LTE and 5G remote communication technologies for vehicle-to- Toyota Prius, Miller and Valasek indicated that a vehicle everything (V2X) communications, the security of inter-vehicle communications is another potential problem. After giving a system is not just a simple machine of glass and steel [3]. short introduction to the architecture of next-generation vehicles In contrast, it is important to realize that it is also a hackable including driverless and intelligent vehicles, this review paper network of computers.
    [Show full text]
  • Data Persistence, Object Serialization, Dbm Package
    Data Persistence, object Serialization, dbm Package Gaurav Kr. suman MIT14 The word ‘persistence’ means "the continuance of an effect after its cause is removed". The term data persistence means it continues to exist even after the application has ended. Thus, data stored in a non-volatile storage medium such as, a disk file is a persistent data storage. Python's built-in file object returned by Python's built-in open() function has one important shortcoming. When opened with 'w' mode, the write() method accepts only the string object. That means, if you have data represented in any non-string form, the object of either in built-in classes (numbers, dictionary, lists or tuples) or other user-defined classes, it cannot be written to file directly. Before writing, you need to convert it in its string representation. numbers=[10,20,30,40] file=open('numbers.txt','w') file.write(str(numbers)) file.close() For a binary file, argument to write() method must be a byte object. For example, the list of integers is converted to bytes by bytearray() function and then written to file. numbers=[10,20,30,40] data=bytearray(numbers) file.write(data) file.close() To read back data from the file in the respective data type, reverse conversion needs to be done. file=open('numbers.txt','rb') data=file.read() print (list(data)) This type of manual conversion, of an object to string or byte format (and vice versa) is very cumbersome and tedious. It is possible to store the state of a Python object in the form of byte stream directly to a file, or memory stream and retrieve to its original state.
    [Show full text]
  • Installation Guide
    IBM Spectrum Protect for Linux Version 8.1.10 Installation Guide IBM Note: Before you use this information and the product it supports, read the information in “Notices” on page 191. This edition applies to version 8, release 1, modification 10 of IBM Spectrum® Protect (product numbers 5725-W98, 5725-W99, 5725-X15), and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 1993, 2020. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this publication..........................................................................................vii Who should read this guide........................................................................................................................vii Installable components............................................................................................................................. vii Publications .............................................................................................................................................. viii What's new.......................................................................................................... ix Part 1. Installing and upgrading the server.............................................................1 Chapter 1. Planning to install the IBM Spectrum Protect server................................................................3 What you should
    [Show full text]