Skip to content

About

Structured Concurrency in Kotlin using Arrow's parMap

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

This document is the example project for the following blog post: Structured Concurrency in Kotlin using Arrow's parMap.

Arrow Example: Structured Concurrency with parMap

Overview

This project is a Kotlin-based application that showcases examples of structured concurrency with Arrow.

Building the Project

To build the project, you need to have Gradle installed. You can build the project using the following command:

./gradlew build

Running the Tests

To run the tests, use the following command:

./gradlew test

Project Structure

Main Classes

  • UserService: A service class that simulates API calls to fetch user details and user posts. It includes methods to fetch a user and their posts with simulated network delays.

Data Classes

  • User: Represents a user with an ID and a name.
  • UserPosts: Represents a user's posts with a user ID and a list of posts.
  • EnrichedUser: Represents an enriched user with user details and their posts.

Test Classes

  • UserServiceTest: A test class that uses Kotest to test the UserService class. It includes a test case to verify the generation of user IDs and concurrent processing of users with parMap.

License

This project is licensed under the MIT License.

About

Structured Concurrency in Kotlin using Arrow's parMap

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages