Call remote tasks of service workspace #75

Closed
winter-yuki wants to merge 25 commits from winter-yuki/distributed into 0.6
4 changed files with 6 additions and 71 deletions
Showing only changes of commit 114d310fdc - Show all commits

View File

@ -1,6 +1,7 @@
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
package space.kscience.dataforge.distributed
import io.ktor.utils.io.core.*
import io.lambdarpc.coding.coders.JsonCoder
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
import io.lambdarpc.dsl.LibService
import io.lambdarpc.dsl.def
import io.lambdarpc.dsl.j
@ -13,10 +14,8 @@ import space.kscience.dataforge.context.gather
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
import space.kscience.dataforge.data.DataSet
import space.kscience.dataforge.data.DataTree
altavir commented 2022-06-22 18:53:14 +03:00 (Migrated from github.com)
Review

I do not see, why we need it in the API on the server side the connection should be closeable, not the workspace. Maybe you should rename it to connection and remove inheritance from a workspace?

I do not see, why we need it in the API on the server side the connection should be closeable, not the workspace. Maybe you should rename it to connection and remove inheritance from a workspace?
import space.kscience.dataforge.distributed.serialization.DataSetPrototype
import space.kscience.dataforge.distributed.serialization.MetaCoder
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
import space.kscience.dataforge.distributed.serialization.NameCoder
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
import space.kscience.dataforge.distributed.serialization.TaskRegistryCoder
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
import space.kscience.dataforge.meta.Meta
import space.kscience.dataforge.meta.MetaSerializer
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.asName
import space.kscience.dataforge.workspace.SerializableResultTask
@ -114,6 +113,9 @@ public class ServiceWorkspace(
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
public companion object {
internal val serviceId = ServiceId("d41b95b1-828b-4444-8ff0-6f9c92a79246")
internal val execute by serviceId.def(NameCoder, MetaCoder, TaskRegistryCoder, j<DataSetPrototype>())
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
internal val execute by serviceId.def(
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
JsonCoder(Name.serializer()), JsonCoder(MetaSerializer), j<TaskRegistry>(),
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
j<DataSetPrototype>()
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
)
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
}
}

altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:28:34 +03:00 (Migrated from github.com)
Review

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.

DataTree builder will be non-suspending in the next version, but it should be possible to create it without suspending now.
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:17 +03:00 (Migrated from github.com)
Review

Need to think about better naming

Need to think about better naming
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
altavir commented 2022-05-24 12:29:54 +03:00 (Migrated from github.com)
Review

Why not suspended?

Why not suspended?
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:01:55 +03:00 (Migrated from github.com)
Review

I thought about WorkspaceNode or WorkerWorkspace. There is also DistributedWorkspace but it is not truly distributed itself.
Also ServiceWorkpace is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.

I thought about `WorkspaceNode` or `WorkerWorkspace`. There is also `DistributedWorkspace` but it is not truly distributed itself. Also `ServiceWorkpace` is good enought to my opinion. "Service" here means that this workspace should be run on some endpoint to be available.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.
winter-yuki commented 2022-05-25 18:04:12 +03:00 (Migrated from github.com)
Review

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

Because it is blocking in the google gRPC implementation. It can be made suspend and block separate thread but I do not see any reasons to do so.

View File

@ -1,23 +0,0 @@
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
package space.kscience.dataforge.distributed.serialization
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import io.lambdarpc.coding.Coder
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import io.lambdarpc.coding.CodingContext
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import io.lambdarpc.transport.grpc.Entity
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import io.lambdarpc.transport.serialization.Entity
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import io.lambdarpc.transport.serialization.RawData
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import kotlinx.serialization.json.Json
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import space.kscience.dataforge.meta.Meta
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import space.kscience.dataforge.meta.MetaSerializer
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
import java.nio.charset.Charset
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
internal object MetaCoder : Coder<Meta> {
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
override suspend fun decode(entity: Entity, context: CodingContext): Meta {
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
val string = entity.data.toString(Charset.defaultCharset())
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
return Json.decodeFromString(MetaSerializer, string)
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
}
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
override suspend fun encode(value: Meta, context: CodingContext): Entity {
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
val string = Json.encodeToString(MetaSerializer, value)
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
return Entity(RawData.copyFrom(string, Charset.defaultCharset()))
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
}
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.
}
altavir commented 2022-05-24 12:31:49 +03:00 (Migrated from github.com)
Review

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?

Is it possible to replace manual 'Coder's with KSerializer or IOFormat? Or make converters?
winter-yuki commented 2022-05-25 18:04:38 +03:00 (Migrated from github.com)
Review

Yes, it already exist, I just forgot about it.

Yes, it already exist, I just forgot about it.

View File

@ -1,22 +0,0 @@
package space.kscience.dataforge.distributed.serialization
import io.lambdarpc.coding.Coder
import io.lambdarpc.coding.CodingContext
import io.lambdarpc.transport.grpc.Entity
import io.lambdarpc.transport.serialization.Entity
import io.lambdarpc.transport.serialization.RawData
import kotlinx.serialization.json.Json
import space.kscience.dataforge.names.Name
import java.nio.charset.Charset
internal object NameCoder : Coder<Name> {
override suspend fun decode(entity: Entity, context: CodingContext): Name {
val string = entity.data.toString(Charset.defaultCharset())
return Json.decodeFromString(Name.serializer(), string)
}
override suspend fun encode(value: Name, context: CodingContext): Entity {
val string = Json.encodeToString(Name.serializer(), value)
return Entity(RawData.copyFrom(string, Charset.defaultCharset()))
}
}

View File

@ -1,22 +0,0 @@
package space.kscience.dataforge.distributed.serialization
import io.lambdarpc.coding.Coder
import io.lambdarpc.coding.CodingContext
import io.lambdarpc.transport.grpc.Entity
import io.lambdarpc.transport.serialization.Entity
import io.lambdarpc.transport.serialization.RawData
import kotlinx.serialization.json.Json
import space.kscience.dataforge.distributed.TaskRegistry
import java.nio.charset.Charset
internal object TaskRegistryCoder : Coder<TaskRegistry> {
override suspend fun decode(entity: Entity, context: CodingContext): TaskRegistry {
val string = entity.data.toString(Charset.defaultCharset())
return Json.decodeFromString(TaskRegistry.serializer(), string)
}
override suspend fun encode(value: TaskRegistry, context: CodingContext): Entity {
val string = Json.encodeToString(TaskRegistry.serializer(), value)
return Entity(RawData.copyFrom(string, Charset.defaultCharset()))
}
}