Tag:serialize

  • Canal dynamically monitors mysql, parses the binlog log log, and sends the collected data to Kafka

    Time:2020-11-19

    The producer needs to convert the data sent into byte array before it can be launched to Kafka through the network. For some simple data, Kafka comes with some serialization tools. //Create producer instance private static Producer<String , String> createProducer(){ Properties properties = new Properties(); properties.put(“metadata.broker.list” , GlobalConfigUtil.kafkaBootstrap); properties.put(“zookeeper.connect” , GlobalConfigUtil.kafkaZookeeper); properties.put(“serializer.class” , StringEncoder.class.getName()); return […]

  • Use of bitcoin serialization Library

    Time:2020-11-19

    Bitcoin serialization function is mainly implemented inserialize.hFile, the whole code is mainly aroundstreamAnd types that participate in serialization deserializationTopen.   Stream this template parameter expression hasread(char**, size_t)and write(char**, size_t) Method, similar to golang’s io.reader , io.writer 。 Simple use example: #include <serialize.h> #include <streams.h> #include <hash.h> #include <test/test_bitcoin.h> #include <stdint.h> #include <memory> #include <boost/test/unit_test.hpp> BOOST_FIXTURE_TEST_SUITE(serialize_tests, […]

  • Flink source code | custom format to consume Maxwell CDC data

    Time:2020-11-18

    Hive streaming, the most important feature of Flink 1.11, has been shared with you before. Today I’d like to talk about another particularly important feature, CDC. CDC overview What is CDC? Change data capture to record the operations of adding, modifying and deleting in the database. A long time ago, the trigger was used to […]

  • A transaction is a transfer of ownership

    Time:2020-11-13

    If you want to get to the top, start at the lowest level. When it comes to bitcoin, we hear various descriptions: “bitcoin is a database in which transactions are stored.” “Bitcoin is a virtual machine that can execute scripts.” “Bitcoin is a distributed ledger” and so on. In fact, when describing a new thing, […]

  • First level and second level cache of mybatis

    Time:2020-11-12

    First level cache Mybatis supports caching, but by default, it only turns on level 1 caching, which is only relative to the same sqlsession. Therefore, when the parameters and SQL are exactly the same, we use the same sqlsession object to call a mapper method, and usually execute SQL only once, because after the first […]

  • Mysql database — transaction isolation level and lock relationship

    Time:2020-11-9

    MySqldatabase——Transaction isolation level and lock relation learning   introduction: For transactions, there are four levels of isolation. In this paper, through the understanding and summary of multiple blogs, plus the actual effect display and personal understanding, theMySqlFour transaction isolation levels and locks are analyzed.   One.Transaction isolation level: Transaction hasThe higher the isolation level of […]

  • Building blockchain based on Java language (3) — persistence & command line

    Time:2020-11-7

    The final content is subject to the original texthttps://wangwei.one/posts/35c… introduction LastIn this paper, we implement the proof of work mechanism (POW) of blockchain to realize mining as much as possible. However, there are still many important features that have not been implemented from the real blockchain application. Today, we will implement the storage mechanism of […]

  • Java foundation — serialization

    Time:2020-11-5

    1. Why serialization? From Java programming ideas When the object is created, it can be obtained during the running of the program, but when the program is terminated, all the objects will be cleared, and we can’t get any more. Of course, you can do this by writing information to a file or database. But […]

  • Several common types of content type

    Time:2020-11-2

    1、application/x-www-form-urlencoded 1) Browser’s native form form form 2) The submitted data is encoded in the way of key1 = val1 & key2 = val2, and both key and val are URL transcoded 3) The data is encoded as name / value pairs. This is the standard code case 2、multipart/form-data When you need to upload files […]

  • Swoole 4.5.6 supports zero copy JSON or PHP deserialization

    Time:2020-11-1

    In the latest4.5.6In the development branch, the bottom layer has been added2Special functions: swoole_substr_json_decode swoole_substr_unserialize Why add these two functions here? There is such a scene. useSwoole\ServerrealizationRPCService, inEOFIn protocol or length protocol communication mode, a packet may have3Part composition. $packet = $header + $body + $footer usually$headerand$footerRelatively small, and$bodyRelatively large,$bodyMay useJSONorPHPSerialization format. If you want […]

  • Springboot2.3.4 integrates redis to implement caching

    Time:2020-11-1

    Main contents of the article 1、 Introduction to springcache 2、 Springcache annotation 3、 Redis caching by annotation (redis for Windows) 4、 Redisutils tool class implements redis cache in native mode (redis for Windows) 1、 Introduction to springcache Official document address:https://docs.spring.io/spring… In spring boot, the cache management storage of data depends on the cache related org.springframework.cache […]

  • The version 4.5.6 of swoole was released, adding zero copy JSON or PHP deserialization

    Time:2020-10-30

    Swoole v4.5.6 has been released, and two special functions have been added at the bottom swoole_substr_json_decode swoole_substr_unserialize What’s the point? seeSwoole 4.5.6 supports zero copy JSON or PHP deserialization This article only describes the update log: New API newly addedswoole_substr_unserializeandswoole_substr_json_decode (#3762) (@matyhtf) enhance modifyCoroutineHttpServerOfonAcceptMethod is private (dfcc83b) (@ matyhtf) repair Fix the problem of coverage […]