MongoDB/devcenter-articles huggingface dataset:
# Developer Day Jakarta

Welcome to MongoDB Developer Day! Below you can find all the resources you will need for the day.

## Data Modeling and Design Patterns

* Slides
* Library application
* System requirements

### Hands-on exercises setup and troubleshooting
* Self-paced content -- Atlas cluster creation and loading sample data.
* Data import tool
* If CodeSpaces doesn't work, try downloading the code.
* Import tool not working? Try downloading the dataset, and ask an instructor for help on importing the data.

### Additional resources
* Library management system code
* MongoDB data modeling book
* Data Modeling course on MongoDB University
* MongoDB for SQL Pros on MongoDB University

## Aggregation Pipelines Lab
* Aggregations hands-on exercises
* Slides

## Search Lab
* Slides
* Search lab hands-on content

### Dive deeper
Do you want to learn more about Atlas Search? Check these out.
* Atlas Search Workshop: An in-depth workshop that uses the more advanced features of Atlas Search
# Developer Day Kuala Lumpur

Welcome to MongoDB Developer Day! Below you can find all the resources you will need for the day.

## Data Modeling and Design Patterns

* Slides
* Library application
* System requirements

### Hands-on exercises setup and troubleshooting
* Self-paced content -- Atlas cluster creation and loading sample data.
* Data import tool
* If CodeSpaces doesn't work, try downloading the code.
* Import tool not working? Try downloading the dataset, and ask an instructor for help on importing the data.

### Additional resources
* Library management system code
* MongoDB data modeling book
* Data Modeling course on MongoDB University
* MongoDB for SQL Pros on MongoDB University

## Aggregation Pipelines Lab
* Aggregations hands-on exercises
* Slides

## Search Lab
* Slides
* Search lab hands-on content

### Dive deeper
Do you want to learn more about Atlas Search? Check these out.
* Atlas Search Workshop: An in-depth workshop that uses the more advanced features of Atlas Search
# Migrate From an RDBMS to MongoDB With the Help of AI: An Introduction to Query Converter

Migrating your applications between databases and programming languages can often feel like a chore. You have to export and import your data, transfer your schemas, and make potential application logic changes to accommodate the new programming language or database syntax. With MongoDB and the Relational Migrator tool, these activities no longer need to feel like a chore and instead can become more automated and streamlined.

 tool as it contains sample schemas that will work for experimentation. However, if you want to play around with your own data, you can connect to one of the popular relational database management systems (RDBMS).

## Generate MongoDB queries with the help of AI

Open Relational Migrator and choose to create a new project. For the sake of this article, we'll click "Use a sample schema" to play around. Running queries and looking at data is not important here. We only want to know our schema, our SQL queries, and what we'll end our adventure with query-wise.

.

  [1]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt4df0d0f28d4b9b30/66294a9458ce883a7ec30a80/query-converter-animated.gif
  [2]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blte5216ae48b0c15c1/66294aad210d90a3c53a53dd/relational-migrator-new-project.png
  [3]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blte7b77b8c7e1ca080/66294ac4fb977c24fa36b921/relational-migrator-erd-model.png
  [4]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/bltc0f9b2fa7b1434d7/66294adffb977c441436b929/relational-migrator-query-converter-tab.png
# Google Developer Day Philadelphia

Welcome to Google Developer Day Philadelphia! Below you can find all the resources you will need for the day.

## Michael's Slide Deck
* Slides

## Search Lab
* Slides
* Intro Lab
* Search lab: hands-on exercises
* Survey

## Resources
* Try Atlas
* Try Compass
* Try Relational Migrator
* Try Vector Search

## Full Developer Day Content
### Data Modeling and Design Patterns
* Slides
* Library application
* System requirements

### MongoDB Atlas Setup: Hands-on exercises setup and troubleshooting
* Intro lab: hands-on exercises
* Data import tool

### Aggregation Pipelines Lab
* Slides
* Aggregations lab: hands-on exercises

### Search Lab
* Slides
* Search lab: hands-on exercises

### Additional resources
* Library management system code
* MongoDB data modeling book
* Data Modeling course on MongoDB University
* MongoDB for SQL Pros on MongoDB University
* Atlas Search Workshop: An in-depth workshop that uses the more advanced features of Atlas Search

## Join the Community
Stay connected, and join our community:
* Join the New York MongoDB User Group!
* Sign up for the MongoDB Community Forums.
# Concurrency and Gracefully Closing the MDB Client

# Concurrency and Gracefully Closing the MDB Client

In the previous article and the corresponding video, we learned to persist the data that was exchanged with our HTTP server using MongoDB. We used the MongoDB driver for Go to access a **free** MongoDB Atlas cluster and use instances of our data directly with it.

In this article, we are going to focus on a more advanced topic that often gets ignored: how to properly shut down our server. This can be used with the `WaitGroups` provided by the `sync` package, but I decided to do it using goroutines and channels for the sake of getting to cover them in a more realistic but understandable use case.

In the latest version of the code of this program, we had set a way to properly close the connection to the database. However, we had no way of gracefully stopping the web server. Using Control+C closed the server immediately and that code was never executed.

## Use custom multiplexer

1.  Before we are able to customize the way our HTTP server shuts down, we need to organize the way it is built. First, the routes we created are added to the `DefaultServeMux`. We can create our own router instead, and add the routes to it (instead of the old ones).
    
    ```go
    router := http.newservemux()
    router.handlefunc("get /", func(w http.responsewriter, r *http.request) {
            w.write(]byte("HTTP caracola"))
    })
    router.handlefunc("post /notes", createNote)
    ```
2.  The router that we have just created, together with other configuration parameters, can be used to create an `http.Server`. Other parameters can also be set: Read the [documentation for this one.
    
    ```go
    server := http.Server{
            Addr: serverAddr,
            Handler: router,
    }
    ```
3.  Use this server to listen to connections, instead of the default one. Here, we don't need parameters in the function because they are provided with the `server` instance, and we are invoking one of its methods.
    
    ```go
    log.Fatal(server.ListenAndServe())
    ```
4.  If you compile and run this version, it should behave exactly the same as before.
5.  The `ListenAndServe()` function returns a specific error when the server is closed with a `Shutdown()`. Let's handle it separately.
    
    ```go
    if err := server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
            log.Fatalf("HTTP server error %v\n", err)
    }
    ```

## Use shutdown function on signal interrupt
 has all the code for this series so you can follow along. The topics covered in it are the foundations that you need to know to produce full-featured REST APIs, back-end servers, or even microservices written in Go. The road is in front of you and we are looking forward to learning what you will create with this knowledge.

Stay curious. Hack your code. See you next time!

  [1]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt6825b2a270c9bd36/664b2922428432eba2198f28/signal.jpg