Skip to content

dbrsnko/Extensible-Parser-with-goroutines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 Extensible Parser with Goroutines

🚀 Getting Started

To run this application, navigate to its root directory and execute the following command: go run .

💡 Idea

The goal is to make the solution as extensible and flexible as possible, even beyond common sense. Here’s what it should be:

1. File Input

Read multiple files, each containing JSON object of the following structure, ending with a newline like this: {"message":"test","timestamp":"2023-03-15T21:54:42.123Z"}

2. Parsing and Output

Parse each line. Wait for a random number of seconds (less than 5). Write the parsed data to the console and the corresponding output file.

3. Error Handling

If parsing or writing fails, gracefully stop all goroutines and print the error to the terminal: Important: Panic, os.Exit, etc., are forbidden. All successfully processed lines prior to the error will be saved to the appropriate file and displayed in the terminal.

4. Concurrency

Execute steps 1, 2, and 3 concurrently to maximize efficiency.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages