Go Agent, Go
Discuss on Hacker News 10gen introduced MongoDB Backup Service in early May. Creating a backup service for MongoDB was a new challenge, and we used the opportunity to explore new technologies for our stack. The final implementation of the
Discuss on Hacker News
10gen introduced MongoDB Backup Service in early May. Creating a backup service for MongoDB was a new challenge, and we used the opportunity to explore new technologies for our stack. The final implementation of the MongoDB Backup Service agent is written in Go, an open-source, natively executable language initiated and maintained by Google.
Why did we Go with Go?
The Backup Service started as a Java project, but as the project matured, the team wanted to move to a language that compiled natively on the machine. After considering a few options, the team decided that Go was the best fit for its C-like syntax, strong standard library, the resolution of concurrency problems via goroutines, and painless multi-platform distribution.
mgo
As an open-source company, 10gen is fortunate to work with MongoDB developers around the world who build open-source tools for new and emerging languages to provide users with a breadth of options to access MongoDB. One of the MongoDB Masters, Gustavo Niemeyer, has spent over two years building mgo, the MongoDB driver for Go. In that time he’s developed a great framework for accessing MongoDB through Go and Gustavo has been a valuable resource as we’ve built out the Backup Service. In his own words:
“It’s great to see not only 10gen making good use of the Go language for first-class services, but contributing to that community of developers by providing its support for the development of the Go driver in multiple ways.”
Programming the backup agent in Go and the mgo driver has been extremely satisfying. Between the lightweight syntax, the first-class concurrency and the well documented, idiomatic libraries such as mgo, Go is a great choice for writing anything from small scripts to large distributed applications.
Starting a Java project often begins with a group debate: “Maven or Ant? JUnit or TestNG? Spring or Guice?” Go has a number of conventions through which Go team has created a sensible, uniform development experience with the holy trinity of tools: go build, test and fmt.
-
The organization of source code and libraries is standardized to allow using the
go build
tool. See details here -
Name test files as XXX_test.go with functions named TestXXX can be run automatically with
go test
-
Braces are required on if statements and the first brace goes along with the if condition. E.g.
if x { doSomething() }
instead of:
if x { doSomething() }
- Methods that end with an f (e.g. Printf, Fatalf) means a string formatted method will be validated in
go vet
that the number of substitutions (e.g. %v) matches the number of inputs to the function.
mgo is a real pleasure to use with high-quality code, thorough documentation and an API that is a thoughtful, natural blend of idiomatic Go and MongoDB.?Our team owes a lot of thanks to Gustavo for his hard work on this project.
There are other Go projects being explored at the moment and we hope to see more people using mgo in production going forward.
By the 10gen Backup Team
原文地址:Go Agent, Go, 感谢原作者分享。

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











최근 푸단대학교 자연어 처리팀(FudanNLP)은 LLM 기반 에이전트에 대한 리뷰 논문을 출시했습니다. 전체 텍스트는 86페이지에 달하며 600개 이상의 참고 자료가 있습니다. 저자들은 AIAgent의 역사를 시작으로 LLM 기반 에이전트의 배경, 구성, 적용 시나리오, 최근 주목받고 있는 에이전트 사회 등 대규모 언어 모델 기반 지능형 에이전트 현황을 종합적으로 정리했다. 동시에, 저자들은 관련 분야의 미래 개발 트렌드에 큰 가치를 지닌 Agent와 관련된 미래지향적이고 개방적인 이슈에 대해 논의했습니다. 논문 링크: https://arxiv.org/pdf/2309.07864.pdfLLM-basedAgent 논문 목록:

보안 회사인 PeckShield는 해커가 규제되지 않은 암호화폐 믹서인 Tornado Cash로 1,155 Ether를 인출했다고 밝혔습니다. 이 플랫폼은 암호화 방법을 사용하여 거래를 쉽게 추적할 수 없도록 합니다.

JavaAgent 기술 소개 JavaAgent는 문자 그대로 Java 에이전트로 번역되며 Java 프로브 기술이라고도 합니다. JavaAgent는 JDK1.5에서 도입되었으며 Java 바이트코드를 동적으로 수정할 수 있는 기술이다. Java의 클래스는 JVM에 의해 실행되는 바이트코드를 형성하기 위해 컴파일됩니다. JVM은 이러한 바이트코드를 실행하기 전에 이러한 바이트코드의 정보를 얻고 프로세스를 완료하기 위해 바이트코드 변환기를 통해 이러한 바이트코드를 수정합니다. JavaAgent는 독립적으로 실행될 수 없는 jar 패키지입니다. 대상 프로그램에 연결된 JVM 프로세스를 통해 작동합니다. 시작할 때 Cla를 추가하려면 대상 프로그램의 시작 매개변수에 -javaagent 매개변수만 추가하면 됩니다.

안녕하세요 여러분 라오두입니다. 어제는 회사 내 칭화대 지능산업연구소에서 공유하는 AI병원타운 이야기를 들었습니다. 그림: 이것은 가상 세계입니다. 모든 의사, 간호사 및 환자는 LLM이 주도하는 에이전트이며 독립적으로 상호 작용할 수 있습니다. 그들은 진단 및 치료의 전체 과정을 시뮬레이션했으며, 주요 호흡기 질환을 다루는 MedQA 데이터 세트의 하위 집합에서 93.06%의 최첨단 정확도를 달성했습니다. 뛰어난 지능형 에이전트는 뛰어난 디자인 패턴과 불가분의 관계입니다. 이 사례를 읽은 후 Andrew Ng 씨가 최근 발표한 4가지 주요 에이전트 디자인 패턴을 빠르게 읽었습니다. Andrew Ng은 인공 지능 및 기계 학습 분야에서 세계에서 가장 권위 있는 학자 중 한 명입니다. 그런 다음 신속하게 편집하여 모든 사람과 공유했습니다. 모드 1. 반사

이번 주 미국 정부 지갑에서 약 2,200만 달러 상당의 암호화폐를 약탈한 해커가 자금의 대부분을 반환한 것으로 보입니다.

아캄 인텔리전스(Arkham Intelligence)에 따르면 '0xc9E'로 시작하는 해커의 지갑은 자금을 미국 정부의 지갑으로 돌려보냈다.

최근 발생한 이번 사건은 디지털 자산 보안의 취약성을 강조합니다. 이는 또한 Web3 도메인에서 사이버 범죄 피해자가 증가하는 광범위한 추세를 보여줍니다.

Microsoft의 Xbox Cloud Gaming 서비스는 PC, 휴대폰, 일부 TV를 포함한 다양한 장치에서 사용할 수 있습니다. 이제 Microsoft와 Amazon의 협력 덕분에 Fire TV Sticks를 통해 훨씬 더 많은 사용자가 이 서비스를 사용할 수 있게 되었습니다.
