All Projects → pronghorn-tech → coroutines

pronghorn-tech / coroutines

Licence: Apache-2.0 license
A Kotlin framework for development of high performance, IO-driven applications.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to coroutines

Multi-Module-Nextflix-Composable
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow..
Stars: ✭ 195 (+490.91%)
Mutual labels:  coroutines
NoMansWallpaperApp
Looking for your next No Man's Sky wallpaper?
Stars: ✭ 35 (+6.06%)
Mutual labels:  coroutines
callback-ktx
Extension functions over Android's callback-based APIs which allows writing them in a sequential way within coroutines or observe multiple callbacks through kotlin flow.
Stars: ✭ 171 (+418.18%)
Mutual labels:  coroutines
kotlin-kafka-and-kafka-streams-examples
Kafka with KafkaReactor and Kafka Streams Examples in Kotlin
Stars: ✭ 33 (+0%)
Mutual labels:  coroutines
AvengersChat
💙 Android sample Avengers chat application using Stream Chat SDK based on MVVM (ViewModel, Coroutines, Room, Hilt, Repository) architecture.
Stars: ✭ 350 (+960.61%)
Mutual labels:  coroutines
kotlin-coroutines-android
Useful extensions for coroutines. AutoDispose + MainScope
Stars: ✭ 84 (+154.55%)
Mutual labels:  coroutines
SuspendActivityResult
A lightweight library for requesting and consuming Activity Results using coroutines.
Stars: ✭ 71 (+115.15%)
Mutual labels:  coroutines
FirebaseFlowExample
A sample android application which demonstrates use of Kotlin Coroutines Flow with Firebase Cloud Firestore.
Stars: ✭ 50 (+51.52%)
Mutual labels:  coroutines
FoodApp
Proof of concept for food app [JetPack + Coroutines + Flow + MockK + JaCoCo coverage + SonarQube]
Stars: ✭ 25 (-24.24%)
Mutual labels:  coroutines
Sunset-hadith
Islamic app written with Kotlin, using KTOR + coroutines + flow + MVVM + Android Jetpack + Navigation component. Old version using RxJava + Retrofit + OKHttp
Stars: ✭ 26 (-21.21%)
Mutual labels:  coroutines
floppy
🧩 Handling and maintain your UI view component easily
Stars: ✭ 55 (+66.67%)
Mutual labels:  coroutines
DemOS
Free, simple, extremely lightweight, stackless, cooperative, co-routine system (OS) for microcontrollers
Stars: ✭ 18 (-45.45%)
Mutual labels:  coroutines
Android-Assignment
This assignment gives you basically a post list and its detail with comments.🚀
Stars: ✭ 32 (-3.03%)
Mutual labels:  coroutines
StarWarsSearch-MVI
Star wars sample android project showcasing the use of View components for rendering UI in Fragments and Activities. Uses Android Jetpack, clean architecture with MVI (Uni-directional data flow), dagger hilt, and kotlin coroutines with StateFlow
Stars: ✭ 189 (+472.73%)
Mutual labels:  coroutines
moko-network
Network components with codegeneration of rest api for mobile (android & ios) Kotlin Multiplatform development
Stars: ✭ 107 (+224.24%)
Mutual labels:  coroutines
algoliasearch-client-kotlin
⚡️ A fully-featured and blazing-fast Kotlin/Android API client to interact with Algolia.
Stars: ✭ 45 (+36.36%)
Mutual labels:  coroutines
ResDelivery-Hilt-Coroutines-Mvvm-Single-Activity
This is a Sample Single Activity App (Multi Fragments) that uses Dagger-Hilt, Coroutines Flows, Paging 3 & Mvvm Clean Architecture
Stars: ✭ 28 (-15.15%)
Mutual labels:  coroutines
ComposeNotes
Notes app with full jetpack compose architecture (UI + navigation). Uses MVVM, Room, Kotlin Flows & LiveData
Stars: ✭ 32 (-3.03%)
Mutual labels:  coroutines
Shuttle
Shuttle provides a modern, guarded way to pass large Serializable objects with Intents or saving them in Bundle objects to avoid app crashes from TransactionTooLargeExceptions.
Stars: ✭ 39 (+18.18%)
Mutual labels:  coroutines
qcoro
C++ Coroutines for Qt
Stars: ✭ 150 (+354.55%)
Mutual labels:  coroutines

Pronghorn Coroutine Framework

The Pronghorn Coroutine Framework is a Kotlin framework for development of high performance, IO-driven applications. It is opinionated about its threading model, and currently does not support blocking operations.

Note: Pronghorn is still considered early in development. As such, documentation is minimal and APIs may change. Pronghorn is actively being used by a private project, and so it will continue being developed. If you are interested it is recommended that you follow the project for updates. Documentation will be forthcoming when the API stabilizes.

Use Cases

This framework is best suited for IO-driven applications where high performance is critical. For instance, a web server.

Usage

Pronghorn is available via Maven Central. The current version is 0.2.1.

Overview

Applications built with the framework consist of one or more services each running on a set of workers, typically one worker per thread. Shared data is minimized between workers allowing each worker's services to function without synchronization mechanisms.

Getting Started

The following is a simple Hello World example of a Pronghorn Coroutine Framework application.

class ExampleApplication(workerCount: Int): CoroutineApplication<ExampleWorker>() {
    override val workers: Set<ExampleWorker> = (0 until workerCount).map { ExampleWorker() }.toSet()
}

Let's start by defining an ExampleApplication class that extends the CoroutineApplication abstract class. This generic class takes a type parameter declaring what type of worker this application will use. In addition, the number of workers to spawn, and a method that produces new workers must be defined.

class ExampleWorker : CoroutineWorker(){
    override val initialServices = listOf(ExampleService(this))
}

Next, an ExampleWorker class worker extends the CoroutineWorker abstract class, and at a minimum must define a list of services to run.

class ExampleService(override val worker: CoroutineWorker) : IntervalService(Duration.ofSeconds(1)){
    override fun process() {
        println("${Date().toInstant()} : Hello World from worker ${worker.workerID}")
    }
}

This ExampleService is an IntervalService, one of several available service types. This one runs its process() function on the requested interval.

fun main(args: Array<String>) {
    val workerCount = Runtime.getRuntime().availableProcessors()
    val app = ExampleApplication(workerCount)
    app.start()
}

Finally, we'll instantiate the application, and start it. Since the workerCount here is defined by the number of available processors, on a dual core machine this would produce output similar to : v

2017-09-14T02:41:47.734Z : Hello World from worker 1
2017-09-14T02:41:47.734Z : Hello World from worker 2
...
2017-09-14T02:41:48.734Z : Hello World from worker 2
2017-09-14T02:41:48.734Z : Hello World from worker 1
...
2017-09-14T02:41:49.734Z : Hello World from worker 2
2017-09-14T02:41:49.734Z : Hello World from worker 1

Releases

This section will be populated in the future.

ServiceTypes

This section will be populated in the future.

License

Copyright 2017 Pronghorn Technology LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].