Tag:Read data

  • Data transfer under [go] TCP service

    Time:2021-2-23

    To implement a TCP service in go, the first thing is to listen to the port and receive requests. This place will be blocked and waitingWhen a client connects, a growtine will be opened to process the TCP connection of the client, so multiple connections can be processed at the same time In the connection, […]

  • [flutter tool] is probably the simplest local data storage scheme on flutter

    Time:2021-2-15

    brief introduction local_cache_syncIt’s a very simple and easy to use oneFlutterLocal repository, suitable for storing a list of lightweight data locally (for example, the configuration of a series of Bluetooth devices saved locally by users, or caching a series of user information) local_cache_syncAll methods, including save and read, aresynchronizationYes, notasynchronousYes. Synchronous accessIt means you don’t […]

  • Go to write an intranet penetration tool

    Time:2021-2-6

    system architecture The system is divided into two parts, client and server. The client runs in the intranet server and the server runs in the public network server. When we want to access the services in the intranet, we do a relay through the public network server. Now is the time to show my soul […]

  • On database transaction isolation

    Time:2021-2-5

    Transaction isolation is mainly aimed at the transaction isolation in acidIBefore understanding these kinds of database transactions, we need to understand several important concepts: Dirty reading-Transaction 1 (read) accessed the uncommitted transaction of transaction 2 (write) Illusory reading-A transaction reads twice, and the result is different Not repeatable-A transaction reads the same record twice, and […]

  • sync.Map And concurrent map

    Time:2021-2-3

    1. sync.Map 1.1. Map concurrency is not secure After go1.6, map has a concurrent security check, so if you read and write map in a concurrent environment, you will report an error func unsafeMap() { //Create a map object m := make(map[int]int) go func() { for { //Attempt to read data _ = m[1] } […]

  • Spring boot2 (3): using spring boot2 to integrate redis cache

    Time:2021-2-1

    Learn the second chapter of integrating mybatis with springboot, and learn about the built-in caching mechanism of mybatis. You have stepped through some pitfalls during deployment. Let’s record and share the caching function of mybatis. The source code of this article is at the end of the article What is query caching Mybatis has a […]

  • [go] go wait to read the data content of the last line

    Time:2021-1-28

    This code is based on the video tutorial of MOOC, mainly F. seek (0, os.SEEK_ End) is moved to the end, but there is a small problem. When the open file is emptied again and the content is emptied, the data can no longer be read. For example, when the echo ” > 1.log is […]

  • Read and write millions of data of spark SQL to MySQL in batches

    Time:2021-1-27

    How to read MySQL by spark SQL Spark SQL also includes a data source that can read data from other databases using JDBC. Compared with using jdbcrdd, this function should be used preferentially. This is because the results are returned as dataframes, which can be easily processed in spark SQL or connected to other data […]

  • How to change dapper to sqlsugar ORM

    Time:2021-1-16

    Why write this article I see that although many people use sqlsugar, they also use dapper. Because sqlsugar is compatible with all dapper APIs, since you use sqlsugar, there is no need to use two orm in the same project So this article is for friends who use or want to use sqlsugar   Dapper […]

  • Source code analysis of spool — stream mode of server module

    Time:2021-1-6

    swReactorThread_dispatchsend data reactorThe thread will passswReactorThread_dispatchSend data when usingstreamWhen sending data, it will callswStream_newnewly buildstream, usingswStream_sendSend data. int swReactorThread_dispatch(swConnection *conn, char *data, uint32_t length) { … if (serv->dispatch_mode == SW_DISPATCH_STREAM) { swStream *stream = swStream_new(serv->stream_socket, 0, SW_SOCK_UNIX_STREAM); if (stream == NULL) { return SW_ERR; } stream->response = swReactorThread_onStreamResponse; stream->session_id = conn->session_id; swListenPort *port = swServer_get_port(serv, […]

  • Use of Uber JVM profiler

    Time:2020-11-30

    background uber jvm profilerIt is used to collect JVM related indicators in distributed monitoring, such as CPU / memory / Io / GC information install Make sure to install Maven and JDK > = 8, directly MVN clean package java application explain It can be used directly by Java agent deployment use java -javaagent:jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.KafkaOutputReporter,brokerList=’kafka1:9092′,topicPrefix=demo_,tag=tag-demo,metricInterval=5000,sampleInterval=0 -cp […]

  • MySQL lock mechanism

    Time:2020-11-15

    Interior lock MySQL performs internal locking within its own server to manage contention for table content by multiple sessions. Internal lock can be divided into row lock and table lock. External lock MySQL provides options for client sessions to explicitly acquire table locks to prevent other sessions from accessing tables. You can use the lock […]